CN117495751A - Image brightness equalization processing method and device and electronic equipment - Google Patents

Image brightness equalization processing method and device and electronic equipment Download PDF

Info

Publication number
CN117495751A
CN117495751A CN202311455065.0A CN202311455065A CN117495751A CN 117495751 A CN117495751 A CN 117495751A CN 202311455065 A CN202311455065 A CN 202311455065A CN 117495751 A CN117495751 A CN 117495751A
Authority
CN
China
Prior art keywords
image
brightness
sub
processed
adjusting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311455065.0A
Other languages
Chinese (zh)
Other versions
CN117495751B (en
Inventor
王彬生
杨帆
杨克中
周志辉
刘翠立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kaiduo Intelligent Technology Shanghai Co ltd
Original Assignee
Kaiduo Intelligent Technology Shanghai Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kaiduo Intelligent Technology Shanghai Co ltd filed Critical Kaiduo Intelligent Technology Shanghai Co ltd
Priority to CN202311455065.0A priority Critical patent/CN117495751B/en
Publication of CN117495751A publication Critical patent/CN117495751A/en
Application granted granted Critical
Publication of CN117495751B publication Critical patent/CN117495751B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

The invention provides an image brightness equalization processing method, an image brightness equalization processing device and electronic equipment, which comprise the following steps: acquiring an image to be processed; adjusting the brightness of the image to be processed based on preset brightness adjustment parameters to obtain a preprocessed image; traversing the preprocessed image through sliding windows with preset sizes, and calculating the pixel brightness average value of the sub-image corresponding to each sliding window; and adjusting the contrast and the brightness of the corresponding sub-image according to the pixel brightness average value of each sub-image to obtain the processed image. According to the method, the brightness of the image to be processed is integrally adjusted through the preset brightness adjustment parameters, the pre-processed image is traversed through the sliding window, and the contrast and the brightness of the image in the window range are adjusted, so that the brightness and the contrast of the image are uniformly adjusted, the phenomena that the contrast is not in accordance with the standard and the processing efficiency is low in the existing brightness balance processing method of the image are relieved, the processing efficiency is improved, and the brightness of the processed image is in accordance with the use standard.

Description

Image brightness equalization processing method and device and electronic equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image brightness equalization processing method and apparatus, and an electronic device.
Background
The conventional image luminance equalization method mainly includes HE (Histogram Equalization ) and AHE (Adaptive Histogram Equalization, adaptive histogram equalization). The brightness distribution of the image is adjusted, so that the brightness of the image is more uniform.
Industrial imaging is mostly bright in the middle and dark in the periphery due to illumination. The above histogram equalization causes too high contrast in processing industrial imaging, and the adaptive histogram equalization has high computational complexity, which is not suitable for real-time processing.
As a whole, the image processed by the conventional image brightness equalization processing method has problems that the contrast does not meet the use standard and the processing efficiency is low.
Disclosure of Invention
The invention aims to provide an image brightness balance processing method, an image brightness balance processing device and electronic equipment, so as to relieve the phenomena that the contrast ratio does not meet the standard and the processing efficiency is low in the existing image brightness balance processing method, improve the processing efficiency and enable the brightness of the processed image to meet the use standard.
The first method, the embodiment of the invention provides an image brightness equalization processing method, which comprises the following steps: acquiring an image to be processed; adjusting the brightness of the image to be processed based on preset brightness adjustment parameters to obtain a preprocessed image; traversing the preprocessed images through sliding windows with preset sizes, and calculating the pixel brightness average value of the sub-images corresponding to each sliding window; the sub-image is an image within a window range of the sliding window; and adjusting the contrast and the brightness of the corresponding sub-image according to the pixel brightness average value of each sub-image to obtain the processed image.
In a preferred embodiment of the present invention, the step of adjusting the brightness of the image to be processed based on a preset brightness adjustment parameter to obtain a preprocessed image includes: and adjusting the brightness of the image to be processed based on the preset gray value offset and the preset gray value scaling to obtain a preprocessed image.
In a preferred embodiment of the present invention, the step of adjusting the brightness of the image to be processed to obtain the preprocessed image based on the preset gray value offset and the preset gray value scaling includes: the brightness of the image to be processed is adjusted through the following formula, so that a preprocessed image is obtained: pix_new=mul, pix+add, where pix_new is the gray value of the preprocessed image, add is the preset gray value offset, mul is the preset gray value scaling, and pix is the gray value of the preprocessed image.
In a preferred embodiment of the present invention, the step of calculating the pixel brightness average value of the sub-image corresponding to each sliding window includes: calculating the pixel brightness average value of the sub-image corresponding to each sliding window according to the following formula:wherein mean is the average value of the brightness of the pixels, and n is n pixel points on the sub-image; i is the i-th pixel point and pix on the sub-image i The gray value of the ith pixel point on the sub-image.
In a preferred embodiment of the present invention, the step of adjusting the contrast and brightness of the corresponding sub-image according to the pixel brightness average value of each sub-image to obtain the processed image includes: according to the pixel brightness average value of each sub-image, the contrast of the corresponding sub-image is adjusted to obtain a processed first sub-image; adjusting the brightness of each first sub-image based on a preset brightness reference parameter to obtain a processed second sub-image; and obtaining a processed image according to the second sub-image.
In a preferred embodiment of the present invention, the step of adjusting the contrast of the corresponding sub-image according to the pixel brightness average value of each of the sub-images to obtain the processed first sub-image includes: the contrast of the corresponding sub-image is adjusted through the following formula, and a processed first sub-image is obtained: pix_new= (pix-mean) ×compare+mean, where pix_new is the gray value of the first sub-image after the processing, pix is the gray value of the sub-image, mean is the pixel brightness average of the sub-image, and compare is a preset scaling factor for adjusting contrast.
In a preferred embodiment of the present invention, the step of adjusting the brightness of each of the first sub-images based on a preset brightness reference parameter to obtain a processed second sub-image includes: and adjusting the brightness of the first sub-image through the following formula to obtain a processed second sub-image: pix_new 0=pix0×pix0_base/mean0, wherein pix0_new0 is the luminance of the second sub-image, pix0 is the luminance of the first sub-image, pix0_base is the luminance reference parameter, and mean0 is the luminance average of the first sub-image.
In a second aspect, an embodiment of the present invention further provides a luminance equalization processing device, including: the image acquisition module is used for acquiring an image to be processed; the brightness adjustment module is used for adjusting the brightness of the image to be processed based on preset brightness adjustment parameters to obtain a preprocessed image; the brightness average value calculation module is used for traversing the preprocessed images through sliding windows with preset sizes and calculating the pixel brightness average value of the sub-image corresponding to each sliding window; the sub-image is an image within a window range of the sliding window; and the sub-image adjusting module is used for adjusting the contrast and the brightness of the corresponding sub-image according to the pixel brightness average value of each sub-image to obtain the processed image.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes a processor and a memory, where the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the brightness equalization processing method.
In a fourth aspect, an embodiment of the present invention further provides a computer storage medium storing a computer program, where the computer program includes program instructions, which when executed by a processor, cause the processor to execute the image brightness equalization processing method.
The embodiment of the invention has the following beneficial technical effects:
the embodiment of the invention provides an image brightness equalization processing method, an image brightness equalization processing device and electronic equipment, which comprise the following steps: acquiring an image to be processed; adjusting the brightness of the image to be processed based on preset brightness adjustment parameters to obtain a preprocessed image; traversing the preprocessed images through sliding windows with preset sizes, and calculating the pixel brightness average value of the sub-images corresponding to each sliding window; the sub-image is an image within a window range of the sliding window; and adjusting the contrast and the brightness of the corresponding sub-image according to the pixel brightness average value of each sub-image to obtain the processed image. The method carries out integral adjustment on the brightness of the image to be processed through the preset brightness adjustment parameters, and the phenomenon of excessively high contrast ratio is avoided. Furthermore, the method traverses the preprocessing image through the sliding window, and adjusts the contrast and brightness of the image in the window range, so that the brightness and the contrast of the image are uniformly adjusted, the phenomena that the contrast is not in accordance with the standard and the processing efficiency is low in the existing brightness balance processing method of the image are relieved, the processing efficiency is improved, and the brightness of the processed image is in accordance with the use standard.
Additional features and advantages of the present embodiments will be set forth in the description which follows, or in part will be obvious from the description, or may be learned by practice of the techniques of the present disclosure.
The foregoing objects, features and advantages of the disclosure will be more readily apparent from the following detailed description of the preferred embodiments taken in conjunction with the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of an image brightness equalization processing method according to an embodiment of the present invention;
fig. 2 is a flowchart of another image brightness equalization processing method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an image brightness equalization processing device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Icon: 11-an image acquisition module; 12-a brightness adjustment module; 13-a brightness average calculation module; 14-a sub-image adjustment module; 21-a memory; a 22-processor; a 23-bus; 24-communication interface.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Industrial imaging is mostly bright in the middle and dark in the periphery due to illumination. The above histogram equalization causes too high contrast in processing industrial imaging, and the adaptive histogram equalization has high computational complexity, which is not suitable for real-time processing. As a whole, the image processed by the conventional image brightness equalization processing method has problems that the contrast does not meet the use standard and the processing efficiency is low.
Based on the above, the embodiment of the invention provides a brightness equalization processing method, a device and an electronic device, which are used for relieving the phenomena that the contrast ratio is not in accordance with the standard and the processing efficiency is low in the existing brightness equalization processing method of the image, so that the processing efficiency is improved and the brightness of the processed image is in accordance with the use standard. For the sake of understanding the embodiments of the present invention, a detailed description is first given of a luminance equalization processing method disclosed in the embodiments of the present invention.
Example 1
The embodiment of the invention provides a brightness equalization processing method. Fig. 1 is a flow chart of a brightness equalization processing method according to an embodiment of the present invention.
As seen in fig. 1, the above method includes:
step S101: and acquiring an image to be processed.
In this embodiment, the image to be processed is an industrial image. For example, images taken of industrial equipment.
Step S102: and adjusting the brightness of the image to be processed based on a preset brightness adjustment parameter to obtain a preprocessed image.
In this embodiment, the preset brightness adjustment parameters include: and parameters such as a preset gray value offset and a preset gray value scaling ratio.
Step S103: traversing the preprocessed images through sliding windows with preset sizes, and calculating the pixel brightness average value of the sub-images corresponding to each sliding window; the sub-image is an image within a window range of the sliding window.
Step S104: and adjusting the contrast and the brightness of the corresponding sub-image according to the pixel brightness average value of each sub-image to obtain the processed image.
Here, the present embodiment traverses the above-described preprocessed image by sliding a window, and performs adjustment of contrast and brightness on the image within the window range, thereby uniformly adjusting the brightness and contrast of the image.
The embodiment of the invention provides an image brightness equalization processing method, which comprises the following steps: acquiring an image to be processed; adjusting the brightness of the image to be processed based on preset brightness adjustment parameters to obtain a preprocessed image; traversing the preprocessed images through sliding windows with preset sizes, and calculating the pixel brightness average value of the sub-images corresponding to each sliding window; the sub-image is an image within a window range of the sliding window; and adjusting the contrast and the brightness of the corresponding sub-image according to the pixel brightness average value of each sub-image to obtain the processed image. The method carries out integral adjustment on the brightness of the image to be processed through the preset brightness adjustment parameters, and the phenomenon of excessively high contrast ratio is avoided. Furthermore, the method traverses the preprocessing image through the sliding window, and adjusts the contrast and brightness of the image in the window range, so that the brightness and the contrast of the image are uniformly adjusted, the phenomena that the contrast is not in accordance with the standard and the processing efficiency is low in the existing brightness balance processing method of the image are relieved, the processing efficiency is improved, and the brightness of the processed image is in accordance with the use standard.
Example 2
On the basis of the above embodiment, fig. 2 is a flowchart of another image brightness equalization processing method according to an embodiment of the present invention.
As seen in fig. 2, the method comprises:
step S201: and acquiring an image to be processed.
In this embodiment, the image to be processed is an industrial image.
Step S202: and adjusting the brightness of the image to be processed based on the preset gray value offset and the preset gray value scaling to obtain a preprocessed image.
The step of adjusting the brightness of the image to be processed based on the preset gray value offset and the preset gray value scaling to obtain a preprocessed image comprises the following steps: the brightness of the image to be processed is adjusted through the following formula, so that a preprocessed image is obtained:
pix_new=mul*pix+add
wherein pix_new is the gray value of the pre-processed image, add is the offset of the preset gray value, mul is the scaling of the preset gray value, and pix is the gray value of the image to be processed.
Step S203: traversing the preprocessed images through sliding windows with preset sizes, and calculating the pixel brightness average value of the sub-images corresponding to each sliding window; the sub-image is an image within a window range of the sliding window.
The step of calculating the pixel brightness average value of the sub-image corresponding to each sliding window includes: calculating the pixel brightness average value of the sub-image corresponding to each sliding window according to the following formula:
wherein mean is the average value of the brightness of the pixels, and n is n pixel points on the sub-image; i is the i-th pixel point and pix on the sub-image i The gray value of the ith pixel point on the sub-image.
Step S204: and adjusting the contrast and the brightness of the corresponding sub-image according to the pixel brightness average value of each sub-image to obtain the processed image.
In one embodiment, the step S204 includes the following steps A1-A3:
step A1: and adjusting the contrast of the corresponding sub-image according to the pixel brightness average value of each sub-image to obtain a processed first sub-image.
Here, the step A1 includes: the contrast of the corresponding sub-image is adjusted through the following formula, and a processed first sub-image is obtained: pix_new= (pix-mean) ×con+mean
Wherein pix0_new is the gray value of the first sub-image after the processing, pix is the gray value of the sub-image, mean is the pixel brightness average value of the sub-image, and contast is a preset scaling factor for adjusting contrast.
Step A2: and adjusting the brightness of each first sub-image based on a preset brightness reference parameter to obtain a processed second sub-image.
Here, the step A2 includes: and adjusting the brightness of the first sub-image through the following formula to obtain a processed second sub-image:
pix_new0=pix0*pix0_base/mean0
wherein pix_new0 is the luminance of the second sub-image, pix0 is the luminance of the first sub-image, pix0_base is the luminance reference parameter, and mean0 is the luminance average value of the first sub-image.
Step A3: and obtaining a processed image according to the second sub-image.
The embodiment of the invention provides an image brightness equalization processing method, which comprises the following steps: acquiring an image to be processed; adjusting the brightness of the image to be processed based on the preset gray value offset and the preset gray value scaling to obtain a preprocessed image; traversing the preprocessed images through sliding windows with preset sizes, and calculating the pixel brightness average value of the sub-images corresponding to each sliding window; the sub-image is an image within a window range of the sliding window; and adjusting the contrast and the brightness of the corresponding sub-image according to the pixel brightness average value of each sub-image to obtain the processed image. According to the method, the brightness of the image to be processed is integrally adjusted through the preset gray value offset and the preset gray value scaling, and the phenomenon of excessively high contrast is avoided. Furthermore, the method traverses the preprocessing image through the sliding window, and adjusts the contrast and brightness of the image in the window range, so that the brightness and the contrast of the image are uniformly adjusted, the phenomena that the contrast is not in accordance with the standard and the processing efficiency is low in the existing brightness balance processing method of the image are relieved, the processing efficiency is improved, and the brightness of the processed image is in accordance with the use standard.
Example 3
Fig. 3 is a schematic structural diagram of an image brightness equalization processing device according to an embodiment of the present invention.
As can be seen in fig. 3, the device comprises:
an image acquisition module 11, configured to acquire an image to be processed.
The brightness adjustment module 12 is configured to adjust the brightness of the image to be processed based on a preset brightness adjustment parameter, so as to obtain a preprocessed image.
The brightness average value calculation module 13 is configured to traverse the preprocessed images through sliding windows with preset sizes, and calculate a pixel brightness average value of a sub-image corresponding to each sliding window; the sub-image is an image within a window range of the sliding window.
The sub-image adjustment module 14 is configured to adjust the contrast and brightness of the corresponding sub-image according to the pixel brightness average value of each sub-image, so as to obtain a processed image.
The image acquisition module 11, the brightness adjustment module 12, the brightness average calculation module 13, and the sub-image adjustment module 14 are sequentially connected.
In one embodiment, the brightness adjustment module 12 is further configured to adjust the brightness of the image to be processed based on the preset gray-scale offset and the preset gray-scale scaling, so as to obtain a preprocessed image.
In one embodiment, the brightness adjustment module 12 is further configured to adjust the brightness of the image to be processed by the following formula, to obtain a preprocessed image: pix_new=mul, pix+add, where pix_new is the gray value of the preprocessed image, add is the preset gray value offset, mul is the preset gray value scaling, and pix is the gray value of the preprocessed image.
In one embodiment, the luminance average calculating module 13 is further configured to calculate a pixel luminance average of the sub-image corresponding to each sliding window according to the following formula:wherein mean is the average value of the brightness of the pixels, and n is n pixel points on the sub-image; i is the ith pixel point on the sub-image, and pixi is the gray value of the ith pixel point on the sub-image.
In one embodiment, the sub-image adjustment module 14 is further configured to adjust the contrast of the corresponding sub-image according to the pixel brightness average value of each sub-image, to obtain a processed first sub-image; adjusting the brightness of each first sub-image based on a preset brightness reference parameter to obtain a processed second sub-image; and obtaining a processed image according to the second sub-image.
In one embodiment, the sub-image adjustment module 14 is further configured to adjust the contrast of the corresponding sub-image by the following formula, to obtain the processed first sub-image: pix_new= (pix-mean) ×clusters+mean, where pix_new is the gray value of the first sub-image after the processing, pix is the gray value of the sub-image, mean is the pixel brightness average of the sub-image, and cluster is a preset scaling factor for adjusting contrast.
In one embodiment, the sub-image adjustment module 14 is further configured to adjust the brightness of the first sub-image to obtain the processed second sub-image by the following formula: pix_new 0=pix0×pix0_base/mean0, where pix_new0 is the luminance of the second sub-image, pix0 is the luminance of the first sub-image, pix0_base is the luminance reference parameter, and mean0 is the luminance average of the first sub-image.
The brightness equalization processing device provided by the embodiment of the invention has the same technical characteristics as the brightness equalization processing method provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved. It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding process in the foregoing method embodiment for the specific working process of the apparatus described above, which is not described herein again.
Example 4
The present embodiment provides an electronic device including a processor and a memory storing computer-executable instructions executable by the processor to perform steps of a brightness balance processing method.
The present embodiment provides a computer-readable storage medium in which a computer program is stored which, when executed by a processor, implements the steps of an image luminance balance processing method.
Referring to fig. 4, a schematic structural diagram of an electronic device includes: the image brightness equalization processing device comprises a memory 21 and a processor 22, wherein the memory 21 stores a computer program which can be run on the processor 22, and the processor realizes the steps provided by the image brightness equalization processing method when executing the computer program.
As shown in fig. 4, the apparatus further includes: a bus 23 and a communication interface 24, the processor 22, the communication interface 24 and the memory 21 being connected by the bus 23; the processor 22 is arranged to execute an executable model, such as a computer program, stored in the memory 21.
The memory 21 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. The communication connection between the system network element and at least one other network element is implemented via at least one communication interface 24 (which may be wired or wireless), which may use the internet, a wide area network, a local network, a metropolitan area network, etc.
The bus 23 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 4, but not only one bus or type of bus.
The memory 21 is configured to store a program, and the processor 22 executes the program after receiving an execution instruction, and any of the embodiments of the present invention discloses that the method executed by the dual brightness equalization processing device may be applied to the processor 22 or implemented by the processor 22. The processor 22 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware or instructions in software in the processor 22. The processor 22 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal processor (Digital Signal Processing, DSP for short), application specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software models in a decoding processor. The software model may be located in a state-of-the-art storage medium such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 21 and the processor 22 reads the information in the memory 21 and in combination with its hardware performs the steps of the method described above.
Further, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by the processor 22, cause the processor 22 to implement the above-described image brightness balance processing method.
The electronic equipment and the computer readable storage medium provided by the embodiment of the invention have the same technical characteristics, so that the same technical problems can be solved, and the same technical effects can be achieved.
In addition, in the description of embodiments of the present invention, unless explicitly stated and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.

Claims (10)

1. An image brightness equalization processing method, characterized by comprising the following steps:
acquiring an image to be processed;
adjusting the brightness of the image to be processed based on preset brightness adjustment parameters to obtain a preprocessed image;
traversing the preprocessed images through sliding windows with preset sizes, and calculating pixel brightness average values of sub-images corresponding to each sliding window; the sub-image is an image in a window range of the sliding window;
and adjusting the contrast and the brightness of the corresponding sub-image according to the pixel brightness average value of each sub-image to obtain the processed image.
2. The image brightness equalization processing method according to claim 1, wherein the step of adjusting the brightness of the image to be processed based on a preset brightness adjustment parameter to obtain a preprocessed image comprises:
and adjusting the brightness of the image to be processed based on the preset gray value offset and the preset gray value scaling to obtain a preprocessed image.
3. The image brightness equalization processing method according to claim 2, wherein the step of adjusting the brightness of the image to be processed based on the preset gray value offset and the preset gray value scaling to obtain the preprocessed image comprises:
the brightness of the image to be processed is adjusted through the following formula, and a preprocessed image is obtained:
pix_new=mul*pix+add
wherein pix_new is the gray value of the preprocessed image, add is the preset gray value offset, mul is the preset gray value scaling, and pix is the gray value of the image to be processed.
4. The luminance equalizing method according to claim 1, wherein the step of calculating the pixel luminance average value of the sub-image corresponding to each of the sliding windows comprises:
calculating the pixel brightness average value of the sub-image corresponding to each sliding window through the following formula:
wherein mean is the average value of the pixel brightness, and n is n pixel points on the sub-image; i is the ith pixel point on the sub-image, pix i And the gray value of the ith pixel point on the sub-image.
5. The method according to claim 1, wherein the step of adjusting the contrast and brightness of the corresponding sub-image according to the pixel brightness average value of each sub-image to obtain the processed image comprises:
according to the pixel brightness average value of each sub-image, the contrast of the corresponding sub-image is adjusted, and a processed first sub-image is obtained;
adjusting the brightness of each first sub-image based on a preset brightness reference parameter to obtain a processed second sub-image;
and obtaining a processed image according to the second sub-image.
6. The method according to claim 5, wherein the step of adjusting the contrast of the corresponding sub-image according to the pixel brightness average value of each sub-image to obtain the processed first sub-image comprises:
the contrast of the corresponding sub-image is adjusted through the following formula, and a processed first sub-image is obtained: pix_new= (pix-mean) ×con+mean
Wherein pix_new is the gray value of the first processed sub-image, pix is the gray value of the sub-image, mean is the pixel brightness average value of the sub-image, and const is a preset scaling factor for adjusting contrast.
7. The image brightness equalization processing method of claim 6, wherein the step of adjusting the brightness of each of the first sub-images based on a preset brightness reference parameter to obtain a processed second sub-image comprises:
adjusting the brightness of the first sub-image through the following formula to obtain a processed second sub-image:
pix_new0=pix0*pix0_base/mean0
wherein pix_new0 is the luminance of the second sub-image, pix0 is the luminance of the first sub-image, pix0_base is the luminance reference parameter, and mean0 is the luminance average value of the first sub-image.
8. An image brightness equalization processing device, characterized by comprising:
the image acquisition module is used for acquiring an image to be processed;
the brightness adjustment module is used for adjusting the brightness of the image to be processed based on preset brightness adjustment parameters to obtain a preprocessed image;
the brightness average value calculation module is used for traversing the preprocessed images through sliding windows with preset sizes and calculating the pixel brightness average value of the sub-images corresponding to each sliding window; the sub-image is an image in a window range of the sliding window;
and the sub-image adjusting module is used for adjusting the contrast and the brightness of the corresponding sub-image according to the pixel brightness average value of each sub-image to obtain the processed image.
9. An electronic device comprising a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the image brightness equalization processing method of any of claims 1-7.
10. A computer storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the image brightness equalization processing method according to any one of claims 1 to 7.
CN202311455065.0A 2023-11-02 2023-11-02 Image brightness equalization processing method and device and electronic equipment Active CN117495751B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311455065.0A CN117495751B (en) 2023-11-02 2023-11-02 Image brightness equalization processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311455065.0A CN117495751B (en) 2023-11-02 2023-11-02 Image brightness equalization processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN117495751A true CN117495751A (en) 2024-02-02
CN117495751B CN117495751B (en) 2024-05-03

Family

ID=89675780

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311455065.0A Active CN117495751B (en) 2023-11-02 2023-11-02 Image brightness equalization processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN117495751B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101923823A (en) * 2009-06-15 2010-12-22 海尔集团公司 Method and device for adjusting image display
WO2021088639A1 (en) * 2019-11-07 2021-05-14 中兴通讯股份有限公司 Image brightness processing method and apparatus, and image processing method and apparatus
WO2022174428A1 (en) * 2021-02-20 2022-08-25 Oppo广东移动通信有限公司 Image brightness adjustment method, image brightness adjustment apparatus, and electronic device
CN115496668A (en) * 2021-06-18 2022-12-20 武汉Tcl集团工业研究院有限公司 Image processing method, image processing device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101923823A (en) * 2009-06-15 2010-12-22 海尔集团公司 Method and device for adjusting image display
WO2021088639A1 (en) * 2019-11-07 2021-05-14 中兴通讯股份有限公司 Image brightness processing method and apparatus, and image processing method and apparatus
WO2022174428A1 (en) * 2021-02-20 2022-08-25 Oppo广东移动通信有限公司 Image brightness adjustment method, image brightness adjustment apparatus, and electronic device
CN115496668A (en) * 2021-06-18 2022-12-20 武汉Tcl集团工业研究院有限公司 Image processing method, image processing device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN117495751B (en) 2024-05-03

Similar Documents

Publication Publication Date Title
CN108876743B (en) Image rapid defogging method, system, terminal and storage medium
CN109191395B (en) Image contrast enhancement method, device, equipment and storage medium
CN110766639B (en) Image enhancement method and device, mobile equipment and computer readable storage medium
CN109767413B (en) HDR method and device for resisting motion artifacts and portable terminal
CN103854259A (en) Image processing apparatus and method of processing image
CN113781338A (en) Image enhancement method, device, equipment and medium
CN114399442B (en) Nonlinear image enhancement method and system based on parameter self-adaption
CN113450272B (en) Image enhancement method based on sinusoidal variation and application thereof
CN114155173A (en) Image defogging method and device and nonvolatile storage medium
CN111127337A (en) Image local area highlight adjusting method, medium, equipment and device
CN110717864A (en) Image enhancement method and device, terminal equipment and computer readable medium
CN117495751B (en) Image brightness equalization processing method and device and electronic equipment
CN113191986A (en) Image processing method and device
EP3385902B1 (en) Image processing apparatus and program
CN111325680B (en) Image brightening method capable of inhibiting local overexposure
CN115278104B (en) Image brightness adjustment method and device, electronic equipment and storage medium
CN116228574A (en) Gray image processing method and device
CN113808045B (en) Image brightness adjusting method and device
CN113438386B (en) Dynamic and static judgment method and device applied to video processing
US20230162473A1 (en) Image processing method
CN112950515A (en) Image processing method and device, computer readable storage medium and electronic device
CN111986096B (en) Cartoon generation method and cartoon generation device based on edge extraction
CN117041739A (en) Automatic image exposure method, system, equipment and storage medium
CN112862709B (en) Image feature enhancement method, device and readable storage medium
CN116051425B (en) Infrared image processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant