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

By obtaining the backlight brightness value and partition number of images, the Gaussian convolution kernel filtering model is determined for Gaussian filtering, which solves the problem of segmentation lines or layered traces caused by excessive image contrast, and improves the display effect of the image.

CN114972113BActive Publication Date: 2024-12-20SHENZHEN SKYWORTH RGB ELECTRONICS CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202210720515.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-23
Publication Date
2024-12-20
Estimated Expiration
2042-06-23

AI Technical Summary

Technical Problem

In the prior art, when the contrast ratio of images is too high, obvious segmentation lines or layered traces are prone to appear, resulting in poor image display effect.

Method used

By obtaining the backlight brightness value and number of partitions of each partition of the image to be processed, the Gaussian convolution kernel filtering model is determined, and the Gaussian filtering process is performed to adjust the backlight brightness and reduce the contrast of the image, so that the boundary transition is natural, blurring the segmentation lines or layering trace.

Benefits of technology

Improve the display effect of the image, avoid the problems of segmentation lines or layered traces caused by excessive contrast, and achieve a more natural image boundary transition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114972113B_ABST
    Figure CN114972113B_ABST
Patent Text Reader

Abstract

The present application discloses an image processing method, device, electronic device and readable storage medium, which are applied to the field of image processing technology. The image processing method comprises: obtaining the backlight brightness value of each partition of the image to be processed and the number of partitions; determining a Gaussian convolution kernel filter model according to the number of partitions and each backlight brightness value, wherein the Gaussian convolution kernel filter model comprises the size of the Gaussian convolution kernel filter model and a Gaussian function corresponding to the Gaussian convolution kernel filter model; performing Gaussian filtering on each backlight brightness value according to the Gaussian convolution kernel filter model to obtain a target backlight brightness; adjusting the image to be processed according to the target backlight brightness value. The present application solves the technical problem of poor image display effect.
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, device, electronic device and readable storage medium. Background Art

[0002] With the rapid development of science and technology, image processing technology has become more and more mature. At present, when performing image processing, the contrast of the image is improved to make the difference between light and dark in the image obvious, thereby improving the visual effect of the image. However, when the contrast is too high, obvious dividing lines or layering marks are likely to appear in the image, resulting in poor image display effect. Summary of the invention

[0003] The main purpose of the present application is to provide an image processing method, device, electronic device and readable storage medium, aiming to solve the technical problem of poor image display effect in the prior art.

[0004] To achieve the above object, the present application provides an image processing method, which is applied to an image processing device. The image processing method includes:

[0005] Obtaining the backlight brightness value and the number of partitions of each partition of the image to be processed;

[0006] Determine a Gaussian convolution kernel filter model according to the number of partitions and each of the backlight brightness values, wherein the Gaussian convolution kernel filter model includes a size of the Gaussian convolution kernel filter model and a Gaussian function corresponding to the Gaussian convolution kernel filter model;

[0007] According to the Gaussian convolution kernel filter model, Gaussian filtering is performed on each of the backlight brightness values ​​to obtain a target backlight brightness;

[0008] The image to be processed is adjusted according to the target backlight brightness value.

[0009] To achieve the above object, the present application further provides an image processing device, which is applied to an image processing device, and includes:

[0010] An acquisition module is used to acquire the backlight brightness value and the number of partitions of each partition of the image to be processed;

[0011] A determination module, used to determine Gaussian convolution kernel filter model parameters according to the number of partitions and each of the backlight brightness values, wherein the Gaussian convolution kernel filter model parameters include the size of the Gaussian convolution kernel filter model and the Gaussian function corresponding to the Gaussian convolution kernel filter model;

[0012] A processing module, used for performing Gaussian filtering on each of the backlight brightness values ​​according to the Gaussian convolution kernel filter model parameters to obtain a target backlight brightness;

[0013] The adjustment module is used to adjust the image to be processed according to the target backlight brightness value.

[0014] The present application also provides an electronic device, comprising: a memory, a processor, and a program of the image processing method stored in the memory and executable on the processor. When the program of the image processing method is executed by the processor, the steps of the image processing method described above can be implemented.

[0015] The present application also provides a computer-readable storage medium, on which is stored a program for implementing the image processing method. When the program of the image processing method is executed by a processor, the steps of the image processing method as described above are implemented.

[0016] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned image processing method when executed by a processor.

[0017] The present application provides an image processing method, device, electronic device and readable storage medium. Compared with adjusting the backlight brightness of an image in real time through a local backlight adjustment function to improve the contrast of the image, the present application obtains the backlight brightness value of each partition of the image to be processed and the number of partitions; determines a Gaussian convolution kernel filter model according to the number of partitions and each backlight brightness value, wherein the Gaussian convolution kernel filter model includes the size of the Gaussian convolution kernel filter model and a Gaussian function corresponding to the Gaussian convolution kernel filter model; performs Gaussian filtering on each backlight brightness value according to the Gaussian convolution kernel filter model to obtain a target backlight brightness; adjusts the image to be processed according to the target backlight brightness value, and adjusts the backlight brightness of the image to be processed appropriately to reduce the contrast of the image to be processed, thereby making the boundary transition in the image to be processed natural, thereby blurring the segmentation line or layering traces of the image to be processed, avoiding the technical defect that when the image is enhanced in contrast, obvious segmentation lines or layering traces are easily appeared in the image when the contrast is too high, thereby improving the display effect of the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0020] Figure 1 This is a flowchart of the first embodiment of the image processing method of the present application;

[0021] Figure 2 This is a flow chart of the second embodiment of the image processing method of the present application;

[0022] Figure 3 Schematic diagram of the structure of the image processing method in the embodiment of the present application;

[0023] Figure 4 Schematic diagram of the device structure of the hardware operating environment involved in the image processing method in the embodiment of the present application.

[0024] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0025] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of this application.

[0026] Embodiment 1

[0027] The present application embodiment provides an image processing method. In the first embodiment of the image processing method of the present application, referring to Figure 1 , the image processing method comprises:

[0028] Step S10, obtaining the backlight brightness value and the number of each partition of the image to be processed;

[0029] Step S20, determining a Gaussian convolution kernel filter model according to the number of partitions and each of the backlight brightness values, wherein the Gaussian convolution kernel filter model includes a size of the Gaussian convolution kernel filter model and a Gaussian function corresponding to the Gaussian convolution kernel filter model;

[0030] Step S30, performing Gaussian filtering on each of the backlight brightness values ​​according to the Gaussian convolution kernel filter model to obtain a target backlight brightness;

[0031] Step S40: adjusting the image to be processed according to the target backlight brightness value.

[0032] Exemplarily, steps S10 to S40 include:

[0033] Wherein, in step S20, before the step of determining the Gaussian convolution kernel filter model according to the number of partitions and each of the backlight brightness values, it also includes:

[0034] Step A10, detecting whether the number of partitions is greater than a preset partition number threshold;

[0035] Step A20, when the number of partitions is greater than the preset partition number threshold, the step of: determining a Gaussian convolution kernel filter model according to the number of each partition and each backlight brightness value;

[0036] Step A30, when the number of partitions is not greater than the preset partition number threshold, a mean filtering model is determined according to the number of partitions and each backlight brightness value, and a mean filtering process is performed on each backlight brightness value to obtain a target backlight brightness.

[0037] In this embodiment, it should be noted that the preset partition number threshold is a preset partition number critical value for determining that the number of partitions of the image to be processed is larger; the processing capability of the Gaussian convolution kernel filtering processing is stronger than the processing capability of the mean filtering processing, and the resources occupied by the Gaussian convolution kernel filtering processing are greater than the resources occupied by the mean filtering processing.

[0038] Exemplarily, step A10 to step A30 include: detecting whether the number of partitions is greater than a preset partition number threshold; if the number of partitions is greater than the preset partition number threshold, executing the step: determining a Gaussian convolution kernel filtering model based on the number of each partition and each backlight brightness value; if the number of partitions is not greater than the preset partition number threshold, determining a mean filtering model based on the number of partitions and each backlight brightness value, performing mean filtering on each backlight brightness value to obtain a target backlight brightness, and judging the number of partitions of the image partitions. When there are many image partitions, it indicates that the current image processing requirements are high, and the image is processed by Gaussian convolution kernel filtering to ensure the image processing effect. When there are fewer image partitions, it indicates that the current image processing requirements are low, and the image is processed by mean filtering to reduce resource occupancy, thereby achieving a balance between the resource occupancy of the processing program and the image processing effect, thereby improving the image display effect while ensuring low resource occupancy.

[0039] Wherein, in step S10, the step of obtaining the backlight brightness value of each partition of the image to be processed and the number of partitions includes:

[0040] Step S11, obtaining the grayscale value interval of each pixel in the image to be processed and the number of pixels corresponding to each grayscale value interval, and drawing a grayscale histogram between the grayscale value and the number of pixels;

[0041] Step S12, determining the number of partitions corresponding to the image to be processed according to the number of intervals of the gray value intervals;

[0042] Step S13, determining the backlight brightness value of each subarea of ​​the image to be processed according to each of the grayscale value intervals.

[0043] Exemplarily, steps S11 to S13 include: drawing a grayscale histogram corresponding to the image to be processed based on the grayscale value interval of the pixel points in the image to be processed and the number of pixel points corresponding to each grayscale value interval, partitioning the image to be processed based on the grayscale histogram, and taking the number of grayscale value intervals in the grayscale histogram as the number of partitions corresponding to the image to be processed; based on each grayscale value interval in the drawn histogram, converting each grayscale value interval into a backlight brightness value corresponding to each image partition according to a preset conversion rule, wherein the preset conversion rule may be a preset conversion file, wherein the preset conversion file includes a mapping relationship between a grayscale value interval and a backlight brightness value corresponding to a partition, querying the grayscale value interval in the preset conversion file, and obtaining a mapping value as the backlight brightness value corresponding to the partition; the preset conversion rule may also be a preset conversion formula, substituting any value in the grayscale value interval into the preset conversion formula, and calculating the value as the backlight brightness value corresponding to the partition.

[0044] Among them, in step S20, the step of determining a Gaussian convolution kernel filter model based on the number of partitions and each of the backlight brightness values, wherein the Gaussian convolution kernel filter model includes the size of the Gaussian convolution kernel filter model and the Gaussian function corresponding to the Gaussian convolution kernel filter model includes:

[0045] Step S21, selecting a size corresponding to the Gaussian convolution kernel filter model according to the number of partitions;

[0046] Step S22, selecting function parameters of the Gaussian function according to each of the backlight brightness values;

[0047] Step S23: constructing a Gaussian function corresponding to the Gaussian convolution kernel filter model according to the function parameters.

[0048] In this embodiment, it should be noted that the number of partitions is positively correlated with the size corresponding to the Gaussian convolution kernel filter model, and the size can be 3*3 or 4*4.

[0049] Exemplarily, steps S21 to S23 include: selecting a size corresponding to the Gaussian convolution kernel filter model based on the number of partitions; selecting a function parameter of the Gaussian function based on a deviation value between the backlight brightness value and the backlight brightness value corresponding to the partition, wherein the deviation value is positively correlated with the function parameter; and constructing a Gaussian function corresponding to the Gaussian convolution kernel filter model based on the function parameter.

[0050] Among them, in step S30, the step of performing Gaussian filtering on each of the backlight brightness values ​​according to the Gaussian convolution kernel filter model to obtain the target backlight brightness includes:

[0051] Step S31, calculating a first weight coefficient between each of the backlight brightness values ​​and adjacent backlight brightness values ​​of adjacent partitions according to the Gaussian convolution kernel filter model parameters;

[0052] Step S32: determining the target backlight brightness according to the first weight coefficient and each of the adjacent backlight brightness values.

[0053] Exemplarily, steps S31 to S32 include: obtaining the size of a Gaussian convolution kernel filter model used for Gaussian convolution kernel filtering processing; obtaining the average value and variance between the brightness of each partition, determining the Gaussian function corresponding to the Gaussian convolution kernel filter model based on the average value and variance, and determining the first weight coefficient between the backlight brightness of each partition and the backlight brightness of an adjacent partition based on the Gaussian function; normalizing each of the first weight coefficients so that the sum of the first weight coefficients between the backlight brightness of each partition and the backlight brightness of an adjacent partition is 1, determining the target backlight brightness based on the first weight coefficient and the backlight brightness of each partition, determining the weight coefficient through a Gaussian function, and thereby determining the target backlight brightness, so that the determined target backlight brightness is more accurate, thereby improving the display effect of the image.

[0054] The embodiment of the present application provides an image processing method. Compared with adjusting the backlight brightness of an image in real time through a local backlight adjustment function to improve the contrast of the image, the embodiment of the present application obtains the backlight brightness value of each partition of the image to be processed and the number of partitions; determines a Gaussian convolution kernel filter model based on the number of partitions and each backlight brightness value, wherein the Gaussian convolution kernel filter model includes the size of the Gaussian convolution kernel filter model and a Gaussian function corresponding to the Gaussian convolution kernel filter model; performs Gaussian filtering on each backlight brightness value based on the Gaussian convolution kernel filter model to obtain a target backlight brightness; adjusts the image to be processed based on the target backlight brightness value, and adjusts the backlight brightness of the image to be processed appropriately to reduce the contrast of the image to be processed, thereby making the boundary transition in the image to be processed natural, thereby blurring the segmentation line or layering traces of the image to be processed, avoiding the technical defect that when the image is enhanced in contrast, obvious segmentation lines or layering traces are easily appeared in the image when the contrast is too high, thereby improving the display effect of the image.

[0055] Embodiment 2

[0056] Further, refer to Figure 2 Based on the first embodiment of the present application, in another embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above description and will not be described in detail later. On this basis, in step A30, the mean filter model size determined according to the number of partitions and each backlight brightness value performs mean filtering on each backlight brightness value to obtain the target backlight brightness, including:

[0057] Step A31, determining the size of a mean filter model used for mean filter processing according to the number of partitions;

[0058] Step A32, calculating a second weight coefficient between each of the backlight brightness values ​​and the adjacent backlight brightness values ​​according to the size of the mean filter model and the correlation between each of the backlight brightness values ​​and the adjacent backlight brightness values ​​of the adjacent partitions;

[0059] Step A33: determining the target backlight brightness according to the second weight coefficient and each of the adjacent backlight brightness values.

[0060] In this embodiment, it should be noted that the maximum value of the size range of the mean filter model is smaller than the minimum value of the size range of the Gaussian filter model.

[0061] Exemplarily, steps A31 to A33 include: obtaining a mean filter model size used for mean filtering processing; determining a second weight coefficient between the backlight brightness of each partition and the backlight brightness of an adjacent partition based on the mean filter model size and the difference between the backlight brightness of each partition and the backlight brightness of an adjacent partition; and determining a target backlight brightness based on the second weight coefficient and the backlight brightness of each partition.

[0062] Before the step of determining the Gaussian convolution kernel filter model parameters according to the number of partitions and each of the backlight brightness values, the method further includes:

[0063] Step B10, when the difference in the number of pixels corresponding to two adjacent grayscale value intervals in each grayscale value interval is greater than the preset pixel number threshold, it is determined that there is a brightness level step in the image to be processed, and the step of detecting whether the number of partitions is greater than the preset partition number threshold is executed.

[0064] In this embodiment, the brightness level step is a step that is likely to occur when the difference in brightness levels of adjacent areas in the image to be processed is large. The preset pixel number threshold is a preset critical value of the number of pixels for determining that backlight brightness processing is required, and the pixel number critical value can be the critical value of the sum of the number of pixels in two adjacent gray value intervals, or the critical value of the difference between the number of pixels in two adjacent gray value intervals.

[0065] Exemplarily, step B10 includes: determining whether there exists in each of the gray value intervals a difference in the number of pixels corresponding to two adjacent gray value intervals that is greater than a preset pixel number threshold; if there exists in each of the gray value intervals a difference in the number of pixels corresponding to two adjacent gray value intervals that is greater than the preset pixel number threshold, determining that there is a brightness level step in the image to be processed, and executing the steps: detecting whether the number of partitions is greater than the preset partition number threshold; if there does not exist in each of the gray value intervals a difference in the number of pixels corresponding to two adjacent gray value intervals that is greater than the preset pixel number threshold, determining that there is no brightness level step in the image to be processed, and keeping the backlight brightness of the image to be processed unchanged, thereby achieving the reduction of the phenomenon of segmentation lines or layering marks in the image due to brightness level steps while ensuring the visual effect brought by contrast.

[0066] Optionally, the step of adjusting the image to be processed further includes:

[0067] A brightness level detection model is obtained, wherein the brightness level detection model includes a feature extraction network and a discriminant network; the brightness change degree characteristics for the image to be processed are extracted through the feature extraction network, wherein the brightness change degree characteristics include the image gradient of the image to be processed; the brightness change degree characteristics are input into the discriminant network, and the brightness level steps of the image to be processed are detected to obtain a detection result, wherein the feature dimension of the detection result is equivalent to that of the image to be processed; and the backlight brightness of the image to be processed is adjusted according to the detection result.

[0068] Optionally, the training process of the brightness level detection model includes: obtaining a brightness level detection model to be trained, training samples and a first detection result corresponding to the training samples, wherein the brightness level detection model to be trained includes a feature extraction network to be trained and a discriminant network to be trained; determining a training brightness level change feature based on the training samples and the feature extraction network to be trained; detecting the brightness level step of the training sample by inputting the training brightness level change feature into the discriminant network to be trained to obtain a second detection result; constructing a model loss of the brightness level detection model to be trained based on the second detection result and the first detection result; and iteratively optimizing the brightness level detection model to be trained based on the model loss to obtain a brightness level detection model.

[0069] Optionally, the step of constructing the model loss of the brightness level detection model to be trained includes: calculating the model loss corresponding to the brightness level detection model to be trained based on the difference between the first detection result and the second detection result, and then judging whether the model loss converges; if the model loss converges, using the brightness level detection model to be trained as the brightness level detection model; if the model loss does not converge, updating the brightness level prediction model to be trained by a preset model updating method based on the gradient calculated by the model loss, and returning to the execution step of obtaining training samples and adjustment values ​​corresponding to the training samples, wherein the preset model updating method includes a gradient descent method and a gradient ascent method, etc.

[0070] The embodiment of the present application provides an image processing method. Compared with adjusting the backlight brightness of an image in real time through a local backlight adjustment function to improve the contrast of the image, the embodiment of the present application obtains the backlight brightness value of each partition of the image to be processed and the number of partitions; determines a Gaussian convolution kernel filter model based on the number of partitions and each backlight brightness value, wherein the Gaussian convolution kernel filter model includes the size of the Gaussian convolution kernel filter model and a Gaussian function corresponding to the Gaussian convolution kernel filter model; performs Gaussian filtering on each backlight brightness value based on the Gaussian convolution kernel filter model to obtain a target backlight brightness; adjusts the image to be processed based on the target backlight brightness value, and adjusts the backlight brightness of the image to be processed appropriately to reduce the contrast of the image to be processed, thereby making the boundary transition in the image to be processed natural, thereby blurring the segmentation line or layering traces of the image to be processed, avoiding the technical defect that when the image is enhanced in contrast, obvious segmentation lines or layering traces are easily appeared in the image when the contrast is too high, thereby improving the display effect of the image.

[0071] Embodiment 3

[0072] The present application also provides an image processing device, wherein the image processing device is applied to an image processing device, Figure 3 , the image processing device comprises:

[0073] An acquisition module 10 is used to acquire the backlight brightness value and the number of partitions of each partition of the image to be processed;

[0074] A determination module 20, configured to determine Gaussian convolution kernel filter model parameters according to the number of partitions and each of the backlight brightness values, wherein the Gaussian convolution kernel filter model parameters include the size of the Gaussian convolution kernel filter model and a Gaussian function corresponding to the Gaussian convolution kernel filter model;

[0075] A processing module 30, configured to perform Gaussian filtering on each of the backlight brightness values ​​according to the Gaussian convolution kernel filter model parameters to obtain a target backlight brightness;

[0076] The adjustment module 40 is used to adjust the image to be processed according to the target backlight brightness value.

[0077] Optionally, before the step of determining a Gaussian convolution kernel filter model according to the number of partitions and each of the backlight brightness values, the image processing device is further used to:

[0078] Detecting whether the number of partitions is greater than a preset partition number threshold;

[0079] When the number of partitions is greater than the preset partition number threshold, the steps are performed: determining a Gaussian convolution kernel filter model according to the number of each partition and each backlight brightness value;

[0080] When the number of partitions is not greater than the preset partition number threshold, a mean filtering model is determined according to the number of partitions and each of the backlight brightness values, and mean filtering is performed on each of the backlight brightness values ​​to obtain a target backlight brightness.

[0081] Optionally, the acquisition module 10 is further used for:

[0082] Obtaining the grayscale value interval of each pixel in the image to be processed and the number of pixels corresponding to each grayscale value interval, and drawing a grayscale histogram between the grayscale value and the number of pixels;

[0083] Determining the number of partitions corresponding to the image to be processed according to the number of intervals of the gray value intervals;

[0084] Based on each of the grayscale value intervals, the backlight brightness value of each subarea of ​​the image to be processed is determined.

[0085] Optionally, the determining module 20 is further configured to:

[0086] According to the number of partitions, select a size corresponding to the Gaussian convolution kernel filter model;

[0087] According to each of the backlight brightness values, selecting function parameters of the Gaussian function;

[0088] According to the function parameters, a Gaussian function corresponding to the Gaussian convolution kernel filter model is constructed.

[0089] Optionally, the processing module 30 is further used for:

[0090] Calculating a first weight coefficient between each of the backlight brightness values ​​and adjacent backlight brightness values ​​of adjacent partitions according to the Gaussian convolution kernel filter model parameters;

[0091] The target backlight brightness is determined according to the first weight coefficient and each of the adjacent backlight brightness values.

[0092] Optionally, the processing module 30 is further used for:

[0093] Determining a mean filter model size for mean filter processing according to the number of partitions;

[0094] Calculating a second weight coefficient between each of the backlight brightness values ​​and the adjacent backlight brightness values ​​according to the size of the mean filter model and the correlation between each of the backlight brightness values ​​and the adjacent backlight brightness values ​​of the adjacent partitions;

[0095] The target backlight brightness is determined according to the second weight coefficient and each of the adjacent backlight brightness values.

[0096] Optionally, before the step of determining Gaussian convolution kernel filter model parameters according to the number of partitions and each of the backlight brightness values, the image processing device is further used to:

[0097] When the difference in the number of pixels corresponding to two adjacent grayscale value intervals in each grayscale value interval is greater than a preset pixel number threshold, it is determined that there is a brightness level step in the image to be processed, and the step of detecting whether the number of partitions is greater than the preset partition number threshold is executed.

[0098] The image processing device provided by the present application adopts the image processing method in the above embodiment to solve the technical problem of poor image display effect. Compared with the prior art, the beneficial effects of the image processing device provided by the embodiment of the present application are the same as the beneficial effects of the image processing method provided by the above embodiment, and other technical features in the image processing device are the same as the features disclosed in the above embodiment method, which will not be described in detail here.

[0099] Embodiment 4

[0100] An embodiment of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the image processing method in the above-mentioned embodiment.

[0101] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0102] like Figure 4As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0103] Typically, the following systems can be connected to the I / O interface: input devices including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices including, for example, a magnetic tape, a hard disk, etc.; and communication devices. The communication device can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0104] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0105] The electronic device provided by the present application adopts the image processing method in the above embodiment to solve the technical problem of poor image display effect. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the present application are the same as the beneficial effects of the image processing method provided by the above embodiment, and other technical features in the electronic device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0106] It should be understood that the various parts of the present disclosure can be implemented with hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0107] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0108] Embodiment 5

[0109] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the image processing method in the above embodiment.

[0110] The computer-readable storage medium provided in the embodiment of the present application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a system or a device or used in combination with it. The program code contained on the computer-readable storage medium can be transmitted with any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0111] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0112] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by an electronic device, the electronic device: obtains the backlight brightness value of each partition of the image to be processed and the number of partitions; determines a Gaussian convolution kernel filter model based on the number of partitions and each backlight brightness value, wherein the Gaussian convolution kernel filter model includes the size of the Gaussian convolution kernel filter model and a Gaussian function corresponding to the Gaussian convolution kernel filter model; performs Gaussian filtering on each backlight brightness value based on the Gaussian convolution kernel filter model to obtain a target backlight brightness; and adjusts the image to be processed based on the target backlight brightness value.

[0113] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0114] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0115] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0116] The computer-readable storage medium provided by the present application stores computer-readable program instructions for executing the above-mentioned image processing method, which solves the technical problem of poor image display effect. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment of the present application are the same as the beneficial effects of the image processing method provided by the above-mentioned implementation, and will not be repeated here.

[0117] Embodiment 6

[0118] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned image processing method when executed by a processor.

[0119] The computer program product provided by the present application solves the technical problem of poor image display effect. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as the beneficial effects of the image processing method provided by the above embodiment, which will not be repeated here.

[0120] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. An image processing method, characterized in that: The image processing method comprises: Obtaining the backlight brightness value and the number of partitions of each partition of the image to be processed; Determine a Gaussian convolution kernel filter model according to the number of partitions and each of the backlight brightness values, wherein the Gaussian convolution kernel filter model includes a size of the Gaussian convolution kernel filter model and a Gaussian function corresponding to the Gaussian convolution kernel filter model; According to the Gaussian convolution kernel filter model, Gaussian filtering is performed on each of the backlight brightness values ​​to obtain a target backlight brightness; Adjusting the image to be processed according to the target backlight brightness value; The step of determining a Gaussian convolution kernel filter model according to the number of partitions and each of the backlight brightness values, wherein the Gaussian convolution kernel filter model includes the size of the Gaussian convolution kernel filter model and a Gaussian function corresponding to the Gaussian convolution kernel filter model, comprises: According to the number of partitions, select a size corresponding to the Gaussian convolution kernel filter model; According to each of the backlight brightness values, selecting function parameters of the Gaussian function; According to the function parameters, a Gaussian function corresponding to the Gaussian convolution kernel filter model is constructed.

2. The image processing method according to claim 1, characterized in that: Before the step of determining the Gaussian convolution kernel filter model according to the number of partitions and each of the backlight brightness values, the method further includes: Detecting whether the number of partitions is greater than a preset partition number threshold; When the number of partitions is greater than the preset partition number threshold, the steps are performed: determining a Gaussian convolution kernel filter model according to the number of each partition and each backlight brightness value; When the number of partitions is not greater than the preset partition number threshold, a mean filtering model is determined according to the number of partitions and each of the backlight brightness values, and mean filtering is performed on each of the backlight brightness values ​​to obtain a target backlight brightness.

3. The image processing method according to claim 1, characterized in that: The step of obtaining the backlight brightness value of each partition of the image to be processed and the number of partitions comprises: Obtaining the grayscale value interval of each pixel in the image to be processed and the number of pixels corresponding to each grayscale value interval, and drawing a grayscale histogram between the grayscale value and the number of pixels; Determining the number of partitions corresponding to the image to be processed according to the number of intervals of the gray value intervals; Based on each of the grayscale value intervals, the backlight brightness value of each subarea of ​​the image to be processed is determined.

4. The image processing method according to claim 1, characterized in that: The step of performing Gaussian filtering on each of the backlight brightness values ​​according to the Gaussian convolution kernel filter model to obtain the target backlight brightness includes: Calculating a first weight coefficient between each of the backlight brightness values ​​and adjacent backlight brightness values ​​of adjacent partitions according to the Gaussian convolution kernel filter model parameters; The target backlight brightness is determined according to the first weight coefficient and each of the adjacent backlight brightness values.

5. The image processing method according to claim 2, characterized in that: The step of performing mean filtering on each backlight brightness value according to the number of partitions and the size of the mean filtering model determined for each backlight brightness value to obtain the target backlight brightness includes: Determining a mean filter model size for mean filter processing according to the number of partitions; Calculating a second weight coefficient between each of the backlight brightness values ​​and the adjacent backlight brightness values ​​according to the size of the mean filter model and the correlation between each of the backlight brightness values ​​and the adjacent backlight brightness values ​​of the adjacent partitions; The target backlight brightness is determined according to the second weight coefficient and each of the adjacent backlight brightness values.

6. The image processing method according to claim 3, characterized in that: Before the step of determining the Gaussian convolution kernel filter model parameters according to the number of partitions and each of the backlight brightness values, the method further includes: When the difference in the number of pixels corresponding to two adjacent grayscale value intervals in each grayscale value interval is greater than a preset pixel number threshold, it is determined that there is a brightness level step in the image to be processed, and the step of detecting whether the number of partitions is greater than the preset partition number threshold is executed.

7. An image processing device, characterized in that: The image processing device comprises: An acquisition module is used to acquire the backlight brightness value and the number of partitions of each partition of the image to be processed; A determination module, used to determine Gaussian convolution kernel filter model parameters according to the number of partitions and each of the backlight brightness values, wherein the Gaussian convolution kernel filter model parameters include the size of the Gaussian convolution kernel filter model and the Gaussian function corresponding to the Gaussian convolution kernel filter model; the determination module is also used to select the size corresponding to the Gaussian convolution kernel filter model according to the number of partitions; select the function parameters of the Gaussian function according to each of the backlight brightness values; and construct the Gaussian function corresponding to the Gaussian convolution kernel filter model according to the function parameters; A processing module, used for performing Gaussian filtering on each of the backlight brightness values ​​according to the Gaussian convolution kernel filter model parameters to obtain a target backlight brightness; The adjustment module is used to adjust the image to be processed according to the target backlight brightness value.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the image processing method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program for implementing the image processing method, and the program for implementing the image processing method is executed by a processor to implement the steps of the image processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for improving display brightness uniformity of flat-panel display

    CN101114416A

  • Infrared image processing method and device and computer storage medium

    CN110473209A

  • Local backlight adjusting method and device of display equipment, display equipment and storage medium

    CN113299245A

  • Image fusion method and device, equipment and storage medium

    CN114187213A

  • Industrial image detection method based on improved canny algorithm

    CN114549525A