WO2023123927A1 - 图像增强方法、装置、设备和存储介质 - Google Patents

图像增强方法、装置、设备和存储介质 Download PDF

Info

Publication number
WO2023123927A1
WO2023123927A1 PCT/CN2022/100529 CN2022100529W WO2023123927A1 WO 2023123927 A1 WO2023123927 A1 WO 2023123927A1 CN 2022100529 W CN2022100529 W CN 2022100529W WO 2023123927 A1 WO2023123927 A1 WO 2023123927A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
image
original image
correction coefficient
contrast gain
Prior art date
Application number
PCT/CN2022/100529
Other languages
English (en)
French (fr)
Inventor
蒋海峰
Original Assignee
上海闻泰信息技术有限公司
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 上海闻泰信息技术有限公司 filed Critical 上海闻泰信息技术有限公司
Publication of WO2023123927A1 publication Critical patent/WO2023123927A1/zh

Links

Images

Classifications

    • G06T5/94

Definitions

  • the present disclosure relates to an image enhancement method, device, device and storage medium.
  • Image contrast enhancement has important applications in many occasions, such as in the field of ISP (Image Signal Processing, Image Signal Processing) image imaging, because in many scenes there will be problems such as low contrast and no layering. Simply increasing the contrast can easily amplify the noise in the flat area and affect the reading effect of the picture.
  • ISP Image Signal Processing, Image Signal Processing
  • an image enhancement method, device, device, and storage medium are provided.
  • An image enhancement method comprising:
  • Each pixel in the original image is enhanced based on the target contrast gain coefficient to obtain an enhanced target image.
  • the contrast gain coefficient corresponding to the pixel point is reduced by using the floating correction coefficient or increased, including:
  • the contrast gain coefficient corresponding to the pixel point is reduced by using the floating correction coefficient.
  • the determining the contrast gain coefficient corresponding to the pixel point according to a plurality of pixel values in a preset pixel area centered on the pixel point includes:
  • the contrast gain coefficient corresponding to the pixel is determined based on the local standard deviation and a preset gain parameter.
  • the determining the floating correction coefficient corresponding to the pixel point according to a plurality of pixel values in a preset pixel area centered on the pixel point includes:
  • the float correction factor is determined based on the local float correction factor and the global float correction factor.
  • the determining the local floating correction coefficient based on the pixel value corresponding to the pixel point and the first pixel average value includes:
  • the absolute value is used as the local floating correction coefficient corresponding to the pixel.
  • the global floating correction coefficient is a preset constant.
  • the method further includes:
  • a global floating correction coefficient is determined based on the pixel value corresponding to the pixel point and the second pixel average value.
  • the original image is an RGB image; the method further includes:
  • Each pixel in the RGB image is traversed to obtain a grayscale image corresponding to the RGB image.
  • the contrast gain coefficient and floating correction coefficient corresponding to the pixel point are determined according to a plurality of pixel values in a preset pixel area centered on the pixel point, include:
  • a floating correction coefficient corresponding to the pixel is determined according to a plurality of pixel values in a second preset pixel area centered on the pixel.
  • performing enhancement processing on each pixel in the original image based on the target contrast gain coefficient to obtain an enhanced target image includes:
  • Each pixel in the original image is traversed to obtain an enhanced target image.
  • performing filtering processing on the original image to obtain the low-frequency component corresponding to the original image includes:
  • the original image is filtered according to the pixel value range of the filtering process to obtain a low frequency component.
  • the determining the contrast gain coefficient and floating correction coefficient corresponding to the pixel includes:
  • the floating correction coefficient is calculated based on the texture condition corresponding to the pixel point and an absolute difference algorithm.
  • An image enhancement device comprising:
  • An acquisition module configured as a module for acquiring an original image to be image enhanced
  • a determining module configured to determine, for each pixel in the original image, the contrast corresponding to the pixel according to a plurality of pixel values in a preset pixel area centered on the pixel Modules for gain coefficients and floating correction coefficients;
  • the correction module is configured to use the floating correction coefficient to reduce or increase the contrast gain coefficient corresponding to the pixel based on the texture corresponding to the pixel in the original image to obtain a correction After the module of the target contrast gain coefficient;
  • An enhancement module configured to perform enhancement processing on the original image based on the target contrast gain coefficient, and obtain an enhanced target image.
  • the correction module further configures the correction module to use the contrast corresponding to the pixel point by the floating correction coefficient when the pixel point is a texture area A module for increasing the gain coefficient; and a module for reducing the contrast gain coefficient corresponding to the pixel point by using the floating correction coefficient when the pixel point is a flat area.
  • the determining module further configures the determining module to perform filtering processing on the original image to obtain a low-frequency component corresponding to the original image; and, for For each pixel, a module for obtaining a local standard deviation corresponding to the pixel based on the low-frequency component and a plurality of pixel values in the pixel region corresponding to the pixel; and, based on the local standard difference and a preset gain parameter, a module for determining the contrast gain coefficient corresponding to the pixel.
  • the determination module is further configured as a module for obtaining the first pixel average value and the global floating correction coefficient corresponding to the preset pixel area; and, A module for determining a local floating correction coefficient based on the pixel value corresponding to the pixel point and the first pixel average value; and a module for determining the floating correction coefficient based on the local floating correction coefficient and the global floating correction coefficient .
  • the determination module is further configured as a module for calculating the absolute value of the difference between the pixel value corresponding to the pixel point and the first pixel average value and, using the absolute value as a module of the local floating correction coefficient corresponding to the pixel.
  • the determining module is further configured as a module for obtaining a second pixel average value corresponding to the original image; and based on the pixel corresponding to the The pixel value and the second pixel average value determine a global floating correction coefficient module.
  • a computer device comprising a memory and one or more processors, the memory is configured as a module storing computer-readable instructions; when executed by the processor, the computer-readable instructions cause the one or more The processor executes the steps of any one of the image enhancement methods described above.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions, which, when executed by one or more processors, cause one or more processors to perform any of the above-mentioned Steps of an image enhancement method.
  • FIG. 1 is a schematic flowchart of an image enhancement method provided by one or more embodiments of the present disclosure
  • FIG. 2 is an effect diagram of image enhancement provided by one or more embodiments of the present disclosure
  • Fig. 3 is a structural block diagram of an image enhancement device in one or more embodiments of the present disclosure.
  • FIG. 4 is a schematic structural diagram of a computer system in one or more embodiments of the present disclosure.
  • first and second and the like in the specification and claims of the present disclosure are used to distinguish different objects, rather than to describe a specific order of objects.
  • first camera and the second camera are used to distinguish different cameras, not to describe a specific order of the cameras.
  • words such as “exemplary” or “for example” are used as examples, illustrations or illustrations. Any embodiment or design described as “exemplary” or “for example” in the embodiments of the present disclosure shall not be construed as being preferred or advantageous over other embodiments or designs. To be precise, the use of words such as “exemplary” or “for example” is intended to present related concepts in a specific manner. In addition, in the description of the embodiments of the present disclosure, unless otherwise specified, the meaning of "plurality” refers to two one or more.
  • FIG. 1 is a schematic flowchart of an image enhancement method provided by one or more embodiments of the present disclosure.
  • the execution body of the image enhancement method in this embodiment is an image enhancement device, and the image enhancement device can be realized by software and/or hardware, and the image enhancement device in this embodiment can be configured in an electronic device , can also be configured in a server for controlling electronic devices, and the server communicates with the electronic devices to control them.
  • the electronic device in this embodiment may include but not limited to personal computing, platform computer, smart phone and other devices, and this embodiment does not specifically limit the electronic device.
  • the image enhancement method includes:
  • Step 101 acquiring an original image to be enhanced.
  • the original image may be an image acquired through network transmission, or an image acquired through an image acquisition device.
  • the received or collected original image may be an RGB image, an infrared image, or a grayscale image.
  • the original image is further converted into a grayscale image.
  • the component data of the three color channels of R, G and B corresponding to the pixel are respectively obtained, and then according to the preset values of each component, Set the ratio, combine the component data of the three color channels of R, G, and B into the grayscale channel data, so as to obtain the grayscale value corresponding to the pixel, traverse each pixel in the original image, and obtain the grayscale corresponding to the original image degree image.
  • Step 102 for each pixel in the original image, according to a plurality of pixel values in a preset pixel area centered on the pixel, determine a contrast gain coefficient and a floating correction coefficient corresponding to the pixel.
  • the contrast gain coefficient is a coefficient for enhancing high-frequency components of the image, wherein the contrast gain coefficient can be calculated based on the ACE (Automatic Color Equalization, automatic color equalization) algorithm.
  • the floating correction coefficient is the texture condition corresponding to the pixel, where the floating correction coefficient can be calculated based on the absolute difference algorithm.
  • the first preset pixel area corresponding to the pixel can be selected when calculating the contrast gain coefficient corresponding to the pixel
  • the second preset pixel area corresponding to the pixel can be selected when calculating the floating correction coefficient corresponding to the pixel
  • the sizes of the first preset pixel area and the second preset pixel area may be the same or different, and are specifically set according to the calculation requirements of the original image, which are not specifically limited in the present disclosure.
  • Step 103 Based on the texture corresponding to the pixel in the original image, use the floating correction coefficient to reduce or increase the contrast gain coefficient corresponding to the pixel to obtain a corrected target contrast gain coefficient.
  • the contrast gain coefficient corresponding to the pixel point is increased by using the floating correction coefficient to obtain an enhanced target contrast gain coefficient; when the pixel point is a flat area, The contrast gain coefficient corresponding to the pixel is reduced by using the floating correction coefficient to obtain the reduced contrast gain coefficient.
  • Step 104 Perform enhancement processing on each pixel in the original image based on the target contrast gain coefficient to obtain an enhanced target image.
  • the high-frequency component of the image is enhanced using the target contrast gain coefficient, and then the enhanced high-frequency component and the low-frequency component are fused to obtain the enhanced pixel point, and the traversal For each pixel in the original image, the enhanced target image can be obtained.
  • pixel calculation is performed on any pixel in the original image to obtain the corresponding contrast gain coefficient and floating correction coefficient, and then according to the texture of the area where the pixel is located, , use the floating correction coefficient to shrink or increase the contrast gain coefficient, so as to obtain the corrected target contrast gain coefficient, and finally use the target contrast gain coefficient to enhance the pixel points to obtain the enhanced pixel points, and traverse the original image for pixel point enhancement to get the enhanced target image.
  • the image enhancement method proposed by the embodiment of the present disclosure can further enhance the contrast of the texture area and the contrast of the flat area according to the texture of the area where the pixel is located after obtaining the contrast gain coefficient corresponding to the pixel.
  • the enhancement effect is suppressed, so as to effectively improve the contrast enhancement effect of the texture area and improve the human eye's perception of image texture. Images are more natural and clear.
  • determining the contrast gain coefficient of a pixel according to a plurality of pixel values in a preset pixel area centered on the pixel includes: performing filtering processing on the original image to obtain a low frequency component corresponding to the original image ; For each pixel, based on the low-frequency component and multiple pixel values in the pixel area corresponding to the pixel, obtain the local standard deviation corresponding to the pixel; based on the local standard deviation and the preset gain parameter, determine the contrast gain corresponding to the pixel coefficient.
  • an image it usually includes high-frequency components and low-frequency components, where the high-frequency component refers to the part of the image where the brightness or grayscale changes sharply, such as the edge contour or noise of the image, and the details of the image . It should be understood that the high-frequency component is relative to the low-frequency component, and the low-frequency component represents an area in the image where brightness or grayscale changes relatively slowly, that is, a large flat area in the image.
  • low-frequency components of the original image may be obtained by performing low-pass filtering on the original image. Specifically, modify the filtered pixel value range from 0 to the pixel average value of the original image, and then use the filtered pixel value to filter the original image to obtain low frequency components. It should be understood that the high frequency component corresponding to the pixel can be obtained by making a difference between the pixel value corresponding to the pixel point in the original image and the corresponding low frequency component.
  • the size of the pixel area corresponding to the pixel point is a square area of (2n+1)*(2n+1), and n is a positive integer.
  • determine the low-frequency component corresponding to the pixel point (the average value of pixels in the pixel area centered on the pixel point):
  • m x (i, j) is the average value of pixels in the pixel area centered on the pixel point
  • x (i, j) is the pixel value of point (i, j) in the original image
  • the preset gain parameter D is obtained, and the quotient of the preset gain parameter D and the local mean square error is used as the contrast gain coefficient. That is, the contrast gain factor is
  • the contrast gain coefficient is space-adaptive. Specifically, since the contrast gain coefficient is inversely proportional to the local mean square error, the local mean square error is relatively large at the edge of the original image or other places with drastic changes. At this time , the contrast gain coefficient is relatively small, and there will be no ringing effect, and in the flat area, the local mean square error is relatively small. At this time, the contrast gain coefficient is relatively large, which causes noise amplification in the flat area.
  • This disclosure uses the floating correction coefficient The contrast coefficient of the flat area is reduced, which effectively suppresses the noise amplification effect on the flat area.
  • determining the floating correction coefficient corresponding to the pixel point includes: obtaining the first pixel average value and the corresponding value of the preset pixel area The global floating correction coefficient; the local floating correction coefficient is determined based on the pixel value corresponding to the pixel point and the first pixel average value; the floating correction coefficient is determined based on the local floating correction coefficient and the global floating correction coefficient.
  • the acquisition method of the first pixel average value can be the same as the acquisition method of the pixel average value in the contrast gain coefficient, that is, assuming that the size of the pixel area corresponding to the pixel point is a square area of (2n+1)*(2n+1) , n is a positive integer.
  • determine the low-frequency component corresponding to the pixel point (the average value of pixels in the pixel area centered on the pixel point):
  • n the pixel area size (2n+1)*(2n+1) selected when calculating the floating correction coefficient and the pixel area size (2n+1)*(2n+1) selected when calculating the contrast gain coefficient
  • the values of n can be the same or different.
  • determining the local floating correction coefficient based on the pixel value corresponding to the pixel point and the first pixel average value includes: calculating the absolute value of the difference between the pixel value corresponding to the pixel point and the first pixel average value, and using the absolute value as the pixel corresponding to The local floating correction factor of .
  • the local floating correction coefficient can use the following formula:
  • Sad abs[x(i, j)-m x (i, j)]
  • m x (i, j) is the average value of the first pixel
  • x (i, j) is the pixel value of the pixel point
  • Sad is the local floating correction coefficient
  • the flatness of the region where the pixel is located can be determined by the absolute value of the difference between the pixel value corresponding to the pixel and the first pixel average value. Specifically, when a pixel point is in a flat area, the difference between the pixel point and the first pixel average value corresponding to the preset pixel area is small, for example, 0. At this time, the floating correction coefficient determined based on the local floating correction coefficient is also It is very small, or even 0. At this time, the floating correction coefficient acts on the contrast gain coefficient to produce a shrinking effect, thereby effectively suppressing the effect of contrast enhancement in the flat area, and then achieving the purpose of suppressing noise in the flat area in the original image.
  • the difference between the pixel point and the first pixel average value corresponding to the preset pixel area is relatively large, for example greater than 1.
  • the floating correction coefficient determined based on the local floating correction coefficient is also very large, For example, if it is greater than 1, the floating correction coefficient acts on the contrast gain coefficient to produce an increase effect, thereby effectively further enhancing the contrast of the texture area and effectively improving the layering of the image texture area.
  • the floating correction coefficient can be obtained by the following formula:
  • w is the floating correction coefficient
  • k is the global floating correction coefficient
  • Sad is the local floating correction coefficient
  • the global floating correction factor is a preset constant.
  • an appropriate constant can be selected as the global floating correction coefficient to adjust the weight of the floating correction coefficient on the global consideration of the original image.
  • the global floating correction coefficient may be an average value of pixels of the original image, or a constant value determined according to multiple experiments.
  • the method further includes: acquiring a second pixel average value corresponding to the original image; and determining a global floating correction coefficient based on the pixel value corresponding to the pixel point and the second pixel average value.
  • the global floating correction coefficient may be determined according to the average value of the second pixel corresponding to the original image, that is, the global floating correction coefficient is determined by the original image itself.
  • the global floating correction coefficient may be the absolute value of the difference between the pixel point and the second pixel average value of the original image as a whole.
  • the present disclosure uses the local floating correction coefficient and the global floating correction coefficient to comprehensively determine the floating correction coefficient, so that the correction of the contrast enhancement coefficient not only considers the local texture of the pixel, but also considers the original image in the entire image. texture effect.
  • the reduction or increase of the contrast gain coefficient by the floating correction coefficient is corrected by multiplying the floating correction coefficient by the contrast gain coefficient.
  • the product of the floating correction coefficient and the contrast gain coefficient is the target contrast gain coefficient.
  • multiple frames of color original images are obtained, and for each frame of original image, the components of the frame of original image in the three channels of R, G, and B are respectively extracted, and the components of the original image are extracted according to the preset R, G, and B channels.
  • the weight ratio of the R, G and B three channel components are fused into the grayscale image of the original image of the frame.
  • a reasonable preset pixel area size is determined for the grayscale image of the original image of the frame, and according to the preset pixel area, the first pixel average value m x (i, i, j),
  • Sad abs[x(i, j)-m x (i, j)]
  • the ratio of the preset gain parameter to the local mean square error is used as the contrast gain coefficient, and the contrast gain coefficient is used to enhance the high-frequency components in each channel of the original image R, G, and B:
  • the enhanced high-frequency component is corrected by the floating correction coefficient, and the low-frequency component of the pixel is fused to obtain the enhanced pixel value of the pixel:
  • each pixel in the original image of the frame is traversed to obtain an enhanced target image of the original image of the frame. Then, the above process is performed frame by frame to obtain a target image of multiple frames of original images.
  • the contrast enhancement is performed on the image (a) in FIG. 2 through the image enhancement method proposed by the embodiment of the present disclosure, and the enhancement effect of the image (b) is obtained.
  • the image enhancement method proposed by the embodiment of the present disclosure can further enhance the contrast of the textured area and further enhance the contrast of the flat area according to the texture of the area where the pixel is located after obtaining the contrast gain coefficient corresponding to the pixel. Inhibit the contrast enhancement effect of the texture area, so as to effectively improve the contrast enhancement effect of the texture area, improve the human eye's perception of image texture, and at the same time, realize the noise suppression of the flat area, thereby effectively improving the layered contrast of the target image Make the target image more natural and clear.
  • steps in the flow chart of FIG. 1 are displayed sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in Fig. 1 may include multiple sub-steps or multiple stages, these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, the execution of these sub-steps or stages The order is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • the embodiment of the present disclosure also provides an image enhancement device.
  • the embodiment of the device corresponds to the embodiment of the method described above.
  • the details in the examples are described one by one, but it should be clear that the device in this embodiment can correspondingly implement all the content in the foregoing method embodiments.
  • FIG. 3 is a structural block diagram of an image enhancement device in one or more embodiments of the present disclosure.
  • the image enhancement device 10 provided in this embodiment includes:
  • Obtaining module 11 configuring the obtaining module as a module for obtaining an original image to be image enhanced;
  • the determination module 12 is configured to determine, for each pixel in the original image, the value of the contrast gain coefficient and the floating correction coefficient corresponding to the pixel according to a plurality of pixel values in a preset pixel area centered on the pixel. module;
  • the correction module 13 is configured to use the floating correction coefficient to reduce or increase the contrast gain coefficient corresponding to the pixel point based on the texture situation corresponding to the pixel point in the original image, so as to obtain the corrected target contrast gain coefficient;
  • the enhancement module 14 is configured to perform enhancement processing on the original image based on the target contrast gain coefficient to obtain an enhanced target image.
  • the correction module 13 is also configured as a module that uses a floating correction coefficient to increase the contrast gain coefficient corresponding to the pixel when the pixel point is a texture area; And, when the pixel point is a flat area, use the floating correction coefficient to reduce the contrast gain coefficient corresponding to the pixel point.
  • the determination module 12 is further configured to perform filtering processing on the original image to obtain a module corresponding to the low-frequency component of the original image; and, for each pixel, based on A module for obtaining the local standard deviation corresponding to the low-frequency component and multiple pixel values in the pixel area corresponding to the pixel point; and a module for determining the contrast gain coefficient corresponding to the pixel point based on the local standard deviation and the preset gain parameter.
  • the determination module 12 is also configured as a module for obtaining the first pixel average value and the global floating correction coefficient corresponding to the preset pixel area; A module for determining a local floating correction coefficient based on the pixel value of the first pixel and the first pixel average value; and a module for determining a floating correction coefficient based on the local floating correction coefficient and the global floating correction coefficient.
  • the determination module 12 is also configured as a module for calculating the absolute value of the difference between the pixel value corresponding to the pixel point and the first pixel average value; and, the absolute value As a module of the local floating correction coefficient corresponding to the pixel.
  • the determination module 12 is also configured as a module for obtaining the average value of the second pixel corresponding to the original image; and, based on the pixel value corresponding to the pixel point and the second pixel The average value determines the global float correction factor of the module.
  • the units or modules recorded in the image enhancement device 10 correspond to the steps in the method described with reference to FIG. 2 . Therefore, the operations and features described above for the method are also applicable to the image enhancement device 10 and the units contained therein, and will not be repeated here.
  • the image enhancement device 10 may be pre-implemented in the browser of the electronic device or other security applications, and may also be loaded into the browser of the electronic device or its security applications by downloading or other means.
  • the corresponding units in the image enhancement apparatus 10 may cooperate with the units in the electronic device to implement the solutions of the embodiments of the present disclosure.
  • the image enhancement device proposed by the embodiment of the present disclosure can further enhance the contrast of the textured area and further enhance the contrast of the flat area according to the texture of the area where the pixel is located after obtaining the contrast gain coefficient corresponding to the pixel. Inhibit the contrast enhancement effect of the texture area, so as to effectively improve the contrast enhancement effect of the texture area, improve the human eye's perception of image texture, and at the same time, realize the noise suppression of the flat area, thereby effectively improving the layered contrast of the target image Make the target image more natural and clear.
  • the image enhancement device provided in this embodiment can execute the image enhancement method provided in the above method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • Each module in the above-mentioned image enhancement device can be fully or partially realized by software, hardware and a combination thereof.
  • the above-mentioned modules can be embedded in or independent of one or more processors in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that one or more processors can call and execute the above The operation corresponding to the module.
  • FIG. 4 shows a schematic structural diagram of a computer system in one or more embodiments of the present disclosure.
  • the computer system shown in FIG. 4 can be used to realize the electronic device or the server of the embodiments of the present disclosure.
  • the computer system includes a central processing unit (CPU) 401 that can operate according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage section 408 into a random access memory (RAM) 403 Various appropriate actions and processes are performed.
  • ROM read-only memory
  • RAM random access memory
  • various programs and data necessary for system operation commands are also stored.
  • the CPU 401 , ROM 402 , and RAM 403 are connected to each other via a bus 404 .
  • An input/output (I/O) interface 405 is also connected to bus 404 .
  • the following components are connected to the I/O interface 405; an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 408 including a hard disk, etc. and a communication section 409 including a network interface card such as a LAN card, a modem, or the like.
  • the communication section 409 performs communication processing via a network such as the Internet.
  • a drive 410 is also connected to the I/O interface 405 as needed.
  • a removable medium 411 such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is mounted on the drive 410 as needed, so that computer readable instructions read therefrom are installed into the storage section 408 as needed.
  • the process described above with reference to the flowchart FIG. 2 may be implemented as a computer software program.
  • embodiments of the present disclosure include a computer-readable instruction product, which includes computer-readable instructions carried on a computer-readable medium, where the computer-readable instructions include program codes for executing the methods shown in the flowcharts.
  • the computer readable instructions comprise program code for performing the methods shown in the flowcharts.
  • the computer readable instructions may be downloaded and installed from a network via communications portion 409 and/or installed from removable media 411 .
  • the central processing unit (CPU) 401 the above-mentioned functions defined in the system of the present disclosure are performed.
  • a computer device including a memory and one or more processors, the memory is configured as a module storing computer-readable instructions; when the computer-readable instructions are executed by the processor, one or more The processor executes the steps of the image enhancement method in the above method embodiments.
  • the computer device provided in this embodiment can implement the method for displaying a preview image provided in the above method embodiment, and its implementation principle is similar to the technical effect, and will not be repeated here.
  • One or more non-volatile storage media storing computer-readable instructions, when the computer-readable instructions are executed by one or more processors, one or more processors execute the steps of the image enhancement method in the above method embodiments .
  • the computer-readable instructions stored on one or more non-volatile storage media storing computer-readable instructions provided in this embodiment can implement the preview image display method provided in the above-mentioned method embodiments, and its realization principle and technical effect Similar and will not be repeated here.
  • Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory or optical memory, etc.
  • Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory.
  • RAM Random Access Memory
  • SRAM Static Random Access Memory
  • DRAM Dynamic Random Access Memory
  • the image enhancement method provided by the present disclosure can further enhance the contrast of the texture area and the contrast enhancement effect on the flat area according to the texture of the area where the pixel is located after obtaining the contrast gain coefficient corresponding to the pixel in the original image
  • it can suppress noise in the flat area, thereby effectively improving the layered contrast of the target image, making the target image more Natural clarity with strong industrial applicability.

Abstract

本公开实施例提供了一种图像增强方法、装置、设备和存储介质,该方法包括:获取待进行图像增强的原始图像;针对原始图像中的每个像素点,根据以像素点为中心的预设像素区域内的多个像素值,确定像素点对应的对比度增益系数和浮动修正系数;基于像素点在原始图像中对应的纹理情况,利用浮动修正系数对像素点对应的对比度增益系数进行缩小或增大,得到修正后的目标对比度增益系数;基于目标对比度增益系数对原始图像中每个像素点进行增强处理,获取增强后的目标图像,根据像素点在原始图像中对应的纹理情况,有针对性的进行对比度增强或抑制,从而使图像看起来更加清晰自然。

Description

图像增强方法、装置、设备和存储介质
相关交叉引用
本公开要求于2021年12月30日提交中国专利局、申请号为202111680699.7、发明名称为“图像增强方法、装置、设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开涉及图像增强方法、装置、设备和存储介质。
背景技术
图像的对比度增强在很多场合都有着重要的应用,如在ISP(Image Signal Processing,图像信号处理)图像成像领域上,这是因为在很多场景中会出现对比度低,没有层次感等问题。而单纯地增加对比度,又容易将平坦区域的噪声放大,影响图片的阅读效果。
发明内容
(一)要解决的技术问题
在现有技术中,单纯地增加对比度,容易将平坦区域的噪声放大,影响图片的阅读效果。
(二)技术方案
根据本公开公开的各种实施例,提供一种图像增强方法、装置、设备和存储介质。
一种图像增强方法,所述方法包括:
获取待进行图像增强的原始图像;
针对所述原始图像中的每个像素点,根据以所述像素点为中心的预设像素区域内的多个像素值,确定所述像素点对应的对比度增益系数和浮动修正系数;
基于所述像素点在所述原始图像中对应的纹理情况,利用所述浮动修正系数对所述像素点对应的对比度增益系数进行缩小或增大,得到修正后的目标对比度增益系数;
基于所述目标对比度增益系数对所述原始图像中每个所述像素点进行增强处理,获取增强后的目标图像。
作为本公开实施例一种可选的实施方式,所述基于所述像素点在所述原始图像中对应的纹理情况,利用所述浮动修正系数对所述像素点对应的对比度增益系数进行缩小或增大,包括:
在所述像素点为纹理区域时,利用所述浮动修正系数对所述像素点对应的对比度增益系数进行增大;
在所述像素点为平坦区域时,利用所述浮动修正系数对所述像素点对应的对比度增益系数进行缩小。
作为本公开实施例一种可选的实施方式,所述根据以所述像素点为中心的预设像素区域内的多个像素值,确定所述像素点对应的对比度增益系数,包括:
对所述原始图像进行滤波处理,得到所述原始图像对应的低频分量;
针对每个所述像素点,基于所述低频分量和所述像素点对应的所述像素区域内的多个像素值,获取所述像素点对应的局部标准差;
基于所述局部标准差和预设增益参数,确定所述像素点对应的所述对比度增益系数。
作为本公开实施例一种可选的实施方式,所述根据以所述像素点为中心的预设像素区域内的多个像素值,确定所述像素点对应的浮动修正系数,包括:
获取所述预设像素区域对应的第一像素平均值和全局浮动修正系数;
基于所述像素点对应的像素值与所述第一像素平均值确定局部浮动修正系数;
基于所述局部浮动修正系数和所述全局浮动修正系数,确定所述浮动修正系数。
作为本公开实施例一种可选的实施方式,所述基于所述像素点对应的像素值与所述第一像素平均值确定局部浮动修正系数,包括:
计算所述像素点对应的像素值与所述第一像素平均值的差的绝对值;
将所述绝对值作为所述像素点对应的所述局部浮动修正系数。
作为本公开实施例一种可选的实施方式,所述全局浮动修正系数为预设常数。
作为本公开实施例一种可选的实施方式,所述方法还包括:
获取所述原始图像对应的第二像素平均值;
基于所述像素点对应的像素值与所述第二像素平均值确定全局浮动修正系数。
作为本公开实施例一种可选的实施方式,所述原始图像为RGB图像;所述方法还包括:
针对所述RGB图像中的任一像素点,分别获取所述像素点对应的R、G和B三个颜色通道的分量数据;
根据各个所述分量数据的预设比例,将R、G和B三个颜色通道的分量数据组合成灰度通道数据,以得到所述像素点对应的灰度值;
遍历所述RGB图像中的每个像素点,得到所述RGB图像对应的灰度图像。
作为本公开实施例一种可选的实施方式,所述根据以所述像素点为中心的预设像素区域内的多个像素值,确定所述像素点对应的对比度增益系数和浮动修正系数,包括:
根据以所述像素点为中心的第一预设像素区域内的多个像素值,确定所述像素点对应的对比度增益系数;
根据以所述像素点为中心的第二预设像素区域内的多个像素值,确定所述像素点对应的浮动修正系数。
作为本公开实施例一种可选的实施方式,所述基于所述目标对比度增益系数对所述原始图像中每个所述像素点进行增强处理,获取增强后的目标图像,包括:
利用所述目标对比度增益系数对所述原始图像的高频分量进行增 强处理;
将所述增强处理后的高频分量与所述原始图像的低频分量进行融合,得到增强后的像素点;
遍历所述原始图像中的每个像素点,得到增强后的目标图像。
作为本公开实施例一种可选的实施方式,所述对所述原始图像进行滤波处理,得到所述原始图像对应的低频分量,包括:
将滤波处理的像素值范围修改为0至所述原始图像的像素平均值;
根据所述滤波处理的像素值范围对所述原始图像进行滤波,得到低频分量。
作为本公开实施例一种可选的实施方式,所述确定所述像素点对应的对比度增益系数和浮动修正系数,包括:
基于自动色彩均衡算法计算所述像素点对应的对比度增益系数;
基于所述像素点对应的纹理情况以及绝对差值算法计算所述浮动修正系数。
一种图像增强装置,包括:
获取模块,将所述获取模块配置成获取待进行图像增强的原始图像的模块;
确定模块,将所述确定模块配置成针对所述原始图像中的每个像素点,根据以所述像素点为中心的预设像素区域内的多个像素值,确定所述像素点对应的对比度增益系数和浮动修正系数的模块;
修正模块,将所述修正模块配置成基于所述像素点在所述原始图像中对应的纹理情况,利用所述浮动修正系数对所述像素点对应的对比度增益系数进行缩小或增大,得到修正后的目标对比度增益系数的模块;
增强模块,将所述增强模块配置成基于所述目标对比度增益系数对所述原始图像进行增强处理,获取增强后的目标图像的模块。
作为本公开实施例一种可选的实施方式,所述修正模块,还将所述修正模块配置成在所述像素点为纹理区域时,利用所述浮动修正系数对所述像素点对应的对比度增益系数进行增大的模块;以及,在所述像素点为平坦区域时,利用所述浮动修正系数对所述像素点对应的 对比度增益系数进行缩小的模块。
作为本公开实施例一种可选的实施方式,所述确定模块,还将所述确定模块配置成对所述原始图像进行滤波处理,得到所述原始图像对应的低频分量的模块;以及,针对每个所述像素点,基于所述低频分量和所述像素点对应的所述像素区域内的多个像素值,获取所述像素点对应的局部标准差的模块;以及,基于所述局部标准差和预设增益参数,确定所述像素点对应的所述对比度增益系数的模块。
作为本公开实施例一种可选的实施方式,所述确定模块,还将所述确定模块配置成获取所述预设像素区域对应的第一像素平均值和全局浮动修正系数的模块;以及,基于所述像素点对应的像素值与所述第一像素平均值确定局部浮动修正系数的模块;以及,基于所述局部浮动修正系数和所述全局浮动修正系数,确定所述浮动修正系数的模块。
作为本公开实施例一种可选的实施方式,所述确定模块,还将所述确定模块配置成计算所述像素点对应的像素值与所述第一像素平均值的差的绝对值的模块;以及,将所述绝对值作为所述像素点对应的所述局部浮动修正系数的模块。
作为本公开实施例一种可选的实施方式,所述确定模块,还将所述确定模块配置成获取所述原始图像对应的第二像素平均值的模块;以及,基于所述像素点对应的像素值与所述第二像素平均值确定全局浮动修正系数的模块。
一种计算机设备,包括存储器和一个或多个处理器,将所述存储器配置成存储计算机可读指令的模块;所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行上述任一项所述的图像增强方法的步骤。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处 理器执行上述任一项所述的图像增强方法的步骤。
本公开的其他特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本公开而了解。本公开的目的和其他优点在说明书、权利要求书以及附图中所特别指出的结构来实现和获得,本公开的一个或多个实施例的细节在下面的附图和描述中提出。
为使本公开的上述目的、特征和优点能更明显易懂,下文特举可选实施例,并配合所附附图,作详细说明如下。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用来解释本公开的原理。
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本公开一个或多个实施例提供的图像增强方法的流程示意图;
图2为本公开一个或多个实施例提供的图像增强的效果图;
图3为本公开一个或多个实施例中图像增强装置的结构框图;
图4为本公开一个或多个实施例中计算机系统的结构示意图。
具体实施方式
为了能够更清楚地理解本公开的上述目的、特征和优点,下面将对本公开的方案进行进一步描述。需要说明的是,在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本公开,但本公开还可以采用其他不同于在此描述的方式来实施;显然,说明书中的实施例只是本公开的一部分实施例,而不是全部的实施例。
本公开的说明书和权利要求书中的术语“第一”和“第二”等是 用来区别不同的对象,而不是用来描述对象的特定顺序。例如,第一摄像头和第二摄像头是为了区别不同的摄像头,而不是为了描述摄像头的特定顺序。
在本公开实施例中,“示例性的”或者“例如”等词来表示作例子、例证或说明。本公开实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念,此外,在本公开实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。
请参考图1,图1为本公开一个或多个实施例提供的图像增强方法的流程示意图。
其中,需要说明的是,本实施例的图像增强方法的执行主体为图像增强装置,图像增强装置可以由软件和/或硬件的方式实现,该实施例中的图像增强装置可以配置在电子设备中,也可以配置在用于对电子设备进行控制的服务器中,该服务器与电子设备进行通信进而对其进行控制。
其中,本实施例中的电子设备可以包括但不限于个人计算、平台电脑、智能手机等设备,该实施例对电子设备不作具体限定。
如图1所示,该图像增强方法,包括:
步骤101,获取待进行图像增强的原始图像。
其中,原始图像可以为通过网络传输获取的图像,也可以是通过图像采集装置采集的图像。其中,接收或采集得到的原始图像可以是RGB图像、红外图像或灰度图像等图像。
在一个或多个实施例中,获取原始图像后还进一步将原始图像转换为灰度图像。
需要说明的是,获取到RGB图像或红外图像后,针对原始图像中的任一像素点,分别获取该像素点对应的R、G和B三个颜色通道的分量数据,然后根据各分量的预设比例,将R、G和B三个颜色通道的分量数据组合成灰度通道数据,从而得到该像素点对应的灰度值,遍历原始图像中的每个像素点,得到原始图像对应的灰度图像。
步骤102,针对原始图像中的每个像素点,根据以像素点为中心的预设像素区域内的多个像素值,确定像素点对应的对比度增益系数和浮动修正系数。
需要说明的是,在本公开中,对比度增益系数为对图像高频分量进行增强的系数,其中,对比度增益系数可以基于ACE(Automatic Color Equalization,自动色彩均衡)算法计算得到。浮动修正系数为像素点对应的纹理情况,其中,浮动修正系数可基于绝对差值算法计算得到。
可选的,在计算像素点对应的对比度增益系数时可选取与像素点对应的第一预设像素区域,计算像素点对应的浮动修正系数时可选取与像素点对应的第二预设像素区域,其中,第一预设像素区域和第二预设像素区域的大小可以相同也可以不同,具体根据原始图像的计算需求进行设置,本公开不做具体限定。
步骤103,基于像素点在原始图像中对应的纹理情况,利用浮动修正系数对像素点对应的对比度增益系数进行缩小或增大,得到修正后的目标对比度增益系数。
在一个或多个实施例中,在像素点为纹理区域时,利用浮动修正系数对像素点对应的对比度增益系数进行增大,得到增强后的目标对比度增益系数,在像素点为平坦区域时,利用浮动修正系数对像素点对应的对比度增益系数进行缩小,得到缩小后的对比度增益系数。
步骤104,基于目标对比度增益系数对原始图像中每个所述像素点进行增强处理,获取增强后的目标图像。
具体地,在获取到目标对比度增益系数后,先利用目标对比度增益系数对图像的高频分量进行增强处理,然后将增强后的高频分量与低频分量进行融合,得到增强后的像素点,遍历原始图像中的每个像素点,即可得到增强后的目标图像。
具体而言,在获取到待进行图像增强的原始图像之后,对原始图像中的任一像素点进行像素计算,得到对应的对比度增益系数和浮动修正系数,然后根据该像素点所在区域的纹理情况,利用浮动修正系数对对比度增益系数进行缩小或增大,从而得到修正后的目标对比度 增益系数,最后利用目标对比度增益系数对像素点进行增强处理,得到增强后的像素点,遍历原始图像进行像素点增强,得到增强后的目标图像。
由此,本公开实施例提出的图像增强方法,能够在获取到像素点对应的对比度增益系数后,根据像素点所处区域的纹理情况,对纹理区域的对比度进行进一步增强以及对平坦区域的对比度增强效果进行抑制,从而实现对纹理区域的对比度增强效果的有效提升,提高人眼对图像纹理的感知效果,同时,实现对平坦区域进行噪声抑制,进而有效提高目标图像的层次感对比度,使得目标图像更加自然清晰。
在一个或多个实施例中,根据像素点为中心的预设像素区域内的多个像素值,确定像素点的对比度增益系数,包括:对原始图像进行滤波处理,得到原始图像对应的低频分量;针对每个像素点,基于低频分量和像素点对应的像素区域内的多个像素值,获取像素点对应的局部标准差;基于局部标准差和预设增益参数,确定像素点对应的对比度增益系数。
需要说明的是,对于图像而言,通常包括高频分量和低频分量,其中,高频分量是指图像中亮度或灰度剧烈变化的部分,例如图像的边缘轮廓或噪声,以及图像的细节部分。应当理解的是,高频分量是相对于低频分量而言的,低频分量代表图像中亮度或灰度变化较为缓慢的区域,也就是图像中大片平坦的区域。
其中,可通过对原始图像进行低通滤波的方式获取原始图像的低频分量。具体地,将滤波的像素值范围修改为0至原始图像的像素平均值,然后利用滤波的像素值对原始图像进行滤波,得到低频分量。应当理解的是,将原始图像中像素点对应的像素值与其对应的低频分量做差,即可得到该像素点对应的高频分量。
具体而言,假设像素点对应的像素区域的大小为(2n+1)*(2n+1)的方形区域,n为正整数。根据如下公式(1)确定该像素点对应的低频分量(以该像素点为中心的像素区域内的像素平均值):
Figure PCTCN2022100529-appb-000001
其中,m x(i,j)为以该像素点为中心的像素区域内的像素平均值,x(i,j)是原始图像中(i,j)点的像素值。
然后根据以该像素点为中心的像素区域内的像素平均值,利用公式(2)确定该像素点对应的局部标准差:
Figure PCTCN2022100529-appb-000002
其中,
Figure PCTCN2022100529-appb-000003
为该像素点对应的局部标准差。
进一步地,获取预设增益参数D,并将预设增益参数D与局部均方差的商作为对比度增益系数。即,对比度增益系数为
Figure PCTCN2022100529-appb-000004
需要说明的是,对比度增益系数是空间自适应的,具体地,由于对比度增益系数与局部均方差成反比,因此,在原始图像的边缘或者其他变化剧烈的地方,局部均方差比较大,此时,对比度增益系数比较小,不会产生振铃效应,而在平坦区域,局部均方差比较小,此时,对比度增益系数比较大,从而引起了平坦区域的噪声放大,本公开通过利用浮动修正系数对平坦区域的对比度系数进行缩小,有效抑制了对平坦区域的噪声放大效果。
在一个或多个实施例中,根据像素点为中心的预设像素区域内的多个像素值,确定像素点对应的浮动修正系数,包括:获取预设像素区域对应的第一像素平均值和全局浮动修正系数;基于像素点对应的像素值与第一像素平均值确定局部浮动修正系数;基于局部浮动修正系数和全局浮动修正系数,确定浮动修正系数。
其中,第一像素平均值的获取方法可与对比度增益系数中像素平均值的获取方法相同,即,假设像素点对应的像素区域的大小为(2n+1)*(2n+1)的方形区域,n为正整数。根据如下公式(1)确定该像素点对应的低频分量(以该像素点为中心的像素区域内的像素平均值):
Figure PCTCN2022100529-appb-000005
需要说明的是,在计算浮动修正系数时选取的像素区域大小(2n+1)*(2n+1)与计算对比度增益系数时选取的像素区域大小(2n+1)*(2n+1)中n的取值可以相同,也可以不同。
进一步地,基于像素点对应的像素值与第一像素平均值确定局部浮动修正系数,包括:计算像素点对应的像素值与第一像素平均值的差的绝对值,将绝对值作为像素点对应的局部浮动修正系数。
具体地,局部浮动修正系数可采用如下公式:
Sad=abs[x(i,j)-m x(i,j)]
其中,m x(i,j)为第一像素平均值,x(i,j)为该像素点的像素值,Sad为局部浮动修正系数。
应当理解的是,通过像素点对应的像素值与第一像素平均值的差的绝对值,能够确定该像素点所处区域的平坦程度。具体地,当像素点处于平坦区域时,该像素点与预设像素区域对应的第一像素平均值的差较小,例如为0,此时,利用基于局部浮动修正系数确定的浮动修正系数也很小,甚至为0,此时浮动修正系数作用到对比度增益系数上产生缩小的效果,从而有效抑制了平坦区域的对比度增强的效果,进而实现了对原始图像中平坦区域进行噪声抑制的目的。
当像素点处于纹理区域时,该像素点与预设像素区域对应的第一像素平均值的差较大,例如大于1,此时,利用基于局部浮动修正系数确定的浮动修正系数也很大,例如大于1,此时浮动修正系数作用到对比度增益系数上产生增大的效果,从而有效使纹理区域的对比度进一步增强,有效提高图像纹理区域的层次感。
具体地,可通过如下公式获取浮动修正系数:
w=k×Sad
其中,w为浮动修正系数,k为全局浮动修正系数,Sad为局部浮动修正系数。
在一个或多个实施例中,全局浮动修正系数为预设常数。
也就是说,可根据原始图像的参数数据或对比度增强需求,选取合适的常数作为全局浮动修正系数,以调节浮动修正系数对原始图像 的全局考量的权重。
举例来说,全局浮动修正系数可为原始图像的像素平均值,或者根据多次实验确定的常数值。
在一个或多个实施例中,还包括:获取原始图像对应的第二像素平均值;基于像素点对应的像素值与第二像素平均值确定全局浮动修正系数。
也就是说,全局浮动修正系数可以根据原始图像对应的第二像素平均值来确定,即,全局浮动修正系数由原始图像本身决定。
可选的,全局浮动修正系数可以是像素点与原始图像整体的第二像素平均值的差的绝对值。
应当理解的是,本公开利用局部浮动修正系数和全局浮动修正系数综合确定浮动修正系数,使得对对比度增强系数的修正不仅考虑像素点所在局部的纹理情况,还能够考虑原始图像在整幅图像中的纹理效果。
在一个或多个实施例中,通过将浮动修正系数与对比度增益系数相乘,以实现浮动修正系数对对比度增益系数的缩小或增大的修正。其中,浮动修正系数与对比度增益系数的乘积即为目标对比度增益系数。
作为一个具体实施例,获取多帧彩色的原始图像,针对每一帧原始图像,提取该帧原始图像分别在R、G和B三个通道中的分量,并按照预设的R、G和B的权重比例,将R、G和B三个通道中的分量融合成该帧原始图像的灰度图像。
然后,对该帧原始图像的灰度图像确定合理的预设像素区域大小,根据预设像素区域,利用如下公式确定灰度图像中每个像素点对应的第一像素平均值m x(i,j),
Figure PCTCN2022100529-appb-000006
根据第一像素平均值分别计算该像素点预设像素区域对应的局部均方差σ x(i,j)和绝对差值Sad,
Figure PCTCN2022100529-appb-000007
Figure PCTCN2022100529-appb-000008
Sad=abs[x(i,j)-m x(i,j)]
进一步地,将预设增益参数与局部均方差的比值作为对比度增益系数,并利用对比度增益系数对原始图像R、G和B每个通道中的高频分量进行增强处理:
Figure PCTCN2022100529-appb-000009
根据局部浮动修正系数和全局浮动系数,确定浮动修正系数:
w=k×Sad
最后,利用浮动修正系数对增强后的高频分量进行修正,并融合该像素点的低频分量,得到该像素点增强后的像素值:
f(i,j)=m(i,j)+z×w
遍历该帧原始图像中的每个像素点,得到该帧原始图像增强后的目标图像。然后,逐帧执行上述过程,得到多帧原始图像的目标图像。其中,经过本公开实施例提出的图像增强方法对图2中(a)图像进行对比度增强,得到(b)图像的增强效果。
应当注意,尽管在附图中以特定顺序描述了本公开实施例提出的图像增强方法的操作,但是,这并非要求或者暗示必须按照该特定顺序来执行这些操作,或是必须执行全部所示的操作才能实现期望的结果。
综上所述,本公开实施例提出的图像增强方法,能够在获取到像素点对应的对比度增益系数后,根据像素点所处区域的纹理情况,对纹理区域的对比度进行进一步增强以及对平坦区域的对比度增强效果 进行抑制,从而实现对纹理区域的对比度增强效果的有效提升,提高人眼对图像纹理的感知效果,同时,实现对平坦区域进行噪声抑制,进而有效提高目标图像的层次感对比度,使得目标图像更加自然清晰。
应该理解的是,虽然图1的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图1中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
基于同一发明构思,作为对上述方法的实现,本公开实施例还提供了一种图像增强装置,该装置实施例与前述方法实施例对应,为便于阅读,本装置实施例不再对前述方法实施例中的细节内容进行逐一赘述,但应当明确,本实施例中的装置能够对应实现前述方法实施例中的全部内容。
图3为本公开一个或多个实施例中图像增强装置的结构框图,如图3所示,本实施例提供的图像增强装置10包括:
获取模块11,将获取模块配置成获取待进行图像增强的原始图像的模块;
确定模块12,将确定模块配置成针对原始图像中的每个像素点,根据以像素点为中心的预设像素区域内的多个像素值,确定像素点对应的对比度增益系数和浮动修正系数的模块;
修正模块13,将修正模块配置成基于像素点在原始图像中对应的纹理情况,利用浮动修正系数对像素点对应的对比度增益系数进行缩小或增大,得到修正后的目标对比度增益系数的模块;
增强模块14,将增强模块配置成基于目标对比度增益系数对原始图像进行增强处理,获取增强后的目标图像的模块。
作为本公开实施例一种可选的实施方式,修正模块13,还将修正模块13配置成在像素点为纹理区域时,利用浮动修正系数对像素点对 应的对比度增益系数进行增大的模块;以及,在像素点为平坦区域时,利用浮动修正系数对像素点对应的对比度增益系数进行缩小的模块。
作为本公开实施例一种可选的实施方式,确定模块12,还将确定模块12配置成对原始图像进行滤波处理,得到原始图像对应的低频分量的模块;以及,针对每个像素点,基于低频分量和像素点对应的像素区域内的多个像素值,获取像素点对应的局部标准差的模块;以及,基于局部标准差和预设增益参数,确定像素点对应的对比度增益系数的模块。
作为本公开实施例一种可选的实施方式,确定模块12,还将确定模块12配置成获取预设像素区域对应的第一像素平均值和全局浮动修正系数的模块;以及,基于像素点对应的像素值与第一像素平均值确定局部浮动修正系数的模块;以及,基于局部浮动修正系数和全局浮动修正系数,确定浮动修正系数的模块。
作为本公开实施例一种可选的实施方式,确定模块12,还将确定模块12配置成计算像素点对应的像素值与第一像素平均值的差的绝对值的模块;以及,将绝对值作为像素点对应的局部浮动修正系数的模块。
作为本公开实施例一种可选的实施方式,确定模块12,还将确定模块12配置成获取原始图像对应的第二像素平均值的模块;以及,基于像素点对应的像素值与第二像素平均值确定全局浮动修正系数的模块。
应当理解,图像增强装置10中记载的诸单元或模块与参考图2描述的方法中的各个步骤相对应。由此,上文针对方法描述的操作和特征同样适用于图像增强装置10及其中包含的单元,在此不再赘述。图像增强装置10可以预先实现在电子设备的浏览器或其他安全应用中,也可以通过下载等方式而加载到电子设备的浏览器或其安全应用中。图像增强装置10中的相应单元可以与电子设备中的单元相互配合以实现本公开实施例的方案。
在上文详细描述中提及的若干模块或者单元,这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块 或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。
综上所述,本公开实施例提出的图像增强装置,能够在获取到像素点对应的对比度增益系数后,根据像素点所处区域的纹理情况,对纹理区域的对比度进行进一步增强以及对平坦区域的对比度增强效果进行抑制,从而实现对纹理区域的对比度增强效果的有效提升,提高人眼对图像纹理的感知效果,同时,实现对平坦区域进行噪声抑制,进而有效提高目标图像的层次感对比度,使得目标图像更加自然清晰。
本实施例提供的图像增强装置可以执行上述方法实施例提供的图像增强方法,其实现原理与技术效果类似,此处不再赘述。上述图像增强装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的一个或多个处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于一个或多个处理器调用执行以上各个模块对应的操作。
下面参考图4,图4示出了本公开一个或多个实施例中计算机系统的结构示意图。图4所示的计算机系统可以用来实现本公开实施例的电子设备或服务器。
如图4所示,计算机系统包括中央处理单元(CPU)401,其可以根据存储在只读存储器(ROM)402中的程序或者从存储部分408加载到随机访问存储器(RAM)403中的程序而执行各种适当的动作和处理。在RAM403中,还存储有系统的操作指令所需的各种程序和数据。CPU401、ROM402以及RAM403通过总线404彼此相连。输入/输出(I/O)接口405也连接至总线404。
以下部件连接至I/O接口405;包括键盘、鼠标等的输入部分406;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分407;包括硬盘等的存储部分408;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分409。通信部分409经由诸如因特网的网络执行通信处理。驱动器410也根据需要连接至I/O接口405。可拆卸介质411,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据 需要安装在驱动器410上,以便于从其上读出的计算机可读指令根据需要被安装入存储部分408。
特别地,根据本公开的实施例,上文参考流程图图2描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机可读指令产品,其包括承载在计算机可读介质上的计算机可读指令,该计算机可读指令包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机可读指令包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机可读指令可以通过通信部分409从网络上被下载和安装,和/或从可拆卸介质411被安装。在该计算机可读指令被中央处理单元(CPU)401执行时,执行本公开的系统中限定的上述功能。
在一个实施例中,提供了一种计算机设备,包括存储器和一个或多个处理器,将存储器配置成存储计算机可读指令的模块;计算机可读指令被处理器执行时,使得一个或多个处理器执行上述方法实施例中图像增强方法的步骤。
本实施例提供的计算机设备,可以实现上述方法实施例提供的预览图像的显示方法,其实现原理与技术效果类似,此处不再赘述。
一个或多个存储有计算机可读指令的非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述方法实施例中图像增强方法的步骤。
本实施例提供的一个或多个存储有计算机可读指令的非易失性存储介质上存储的计算机可读指令,可以实现上述方法实施例提供的预览图像的显示方法,其实现原理与技术效果类似,此处不再赘述。
本领域普通技术人员可以理解实现上述方法实施例中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成的,计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本公开所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软 盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,比如静态随机存取存储器(Static Random Access Memory,SRAM)和动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上实施例仅表达了本公开的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本公开构思的前提下,还可以做出若干变形和改进,这些都属于本公开的保护范围。因此,本公开专利的保护范围应以所附权利要求为准。
工业实用性
本公开提供的图像增强方法,能够在获取到原始图像中像素点对应的对比度增益系数后,根据像素点所处区域的纹理情况,对纹理区域的对比度进行进一步增强以及对平坦区域的对比度增强效果进行抑制,从而实现对纹理区域的对比度增强效果的有效提升,提高人眼对图像纹理的感知效果,同时,实现对平坦区域进行噪声抑制,进而有效提高目标图像的层次感对比度,使得目标图像更加自然清晰,具有很强的工业实用性。

Claims (20)

  1. 一种图像增强方法,其中,包括以下步骤:
    获取待进行图像增强的原始图像;
    针对所述原始图像中的每个像素点,根据以所述像素点为中心的预设像素区域内的多个像素值,确定所述像素点对应的对比度增益系数和浮动修正系数;
    基于所述像素点在所述原始图像中对应的纹理情况,利用所述浮动修正系数对所述像素点对应的对比度增益系数进行缩小或增大,得到修正后的目标对比度增益系数;
    基于所述目标对比度增益系数对所述原始图像中每个所述像素点进行增强处理,获取增强后的目标图像。
  2. 根据权利要求1所述的方法,其中,所述基于所述像素点在所述原始图像中对应的纹理情况,利用所述浮动修正系数对所述像素点对应的对比度增益系数进行缩小或增大,包括:
    在所述像素点为纹理区域时,利用所述浮动修正系数对所述像素点对应的对比度增益系数进行增大;
    在所述像素点为平坦区域时,利用所述浮动修正系数对所述像素点对应的对比度增益系数进行缩小。
  3. 根据权利要求1或2所述的方法,其中,所述根据以所述像素点为中心的预设像素区域内的多个像素值,确定所述像素点对应的对比度增益系数,包括:
    对所述原始图像进行滤波处理,得到所述原始图像对应的低频分量;
    针对每个所述像素点,基于所述低频分量和所述像素点对应的所述像素区域内的多个像素值,获取所述像素点对应的局部标准差;
    基于所述局部标准差和预设增益参数,确定所述像素点对应的所述对比度增益系数。
  4. 根据权利要求1或2所述的方法,其中,所述根据以所述像素点为中心的预设像素区域内的多个像素值,确定所述像素点对应的浮动修正系数,包括:
    获取所述预设像素区域对应的第一像素平均值和全局浮动修正系数;
    基于所述像素点对应的像素值与所述第一像素平均值确定局部浮动修正系数;
    基于所述局部浮动修正系数和所述全局浮动修正系数,确定所述浮动修正系数。
  5. 根据权利要求4所述的方法,其中,所述基于所述像素点对应的像素值与所述第一像素平均值确定局部浮动修正系数,包括:
    计算所述像素点对应的像素值与所述第一像素平均值的差的绝对值;
    将所述绝对值作为所述像素点对应的所述局部浮动修正系数。
  6. 根据权利要求4所述的方法,其中,所述全局浮动修正系数为预设常数。
  7. 根据权利要求4所述的方法,其中,所述方法还包括:
    获取所述原始图像对应的第二像素平均值;
    基于所述像素点对应的像素值与所述第二像素平均值确定全局浮动修正系数。
  8. 根据权利要求1所述的方法,其中,所述原始图像为RGB图像;所述方法还包括:
    针对所述RGB图像中的任一像素点,分别获取所述像素点对应的R、G和B三个颜色通道的分量数据;
    根据各个所述分量数据的预设比例,将R、G和B三个颜色通道的分量数据组合成灰度通道数据,以得到所述像素点对应的灰度值;
    遍历所述RGB图像中的每个像素点,得到所述RGB图像对应的 灰度图像。
  9. 根据权利要求1所述的方法,其中,所述根据以所述像素点为中心的预设像素区域内的多个像素值,确定所述像素点对应的对比度增益系数和浮动修正系数,包括:
    根据以所述像素点为中心的第一预设像素区域内的多个像素值,确定所述像素点对应的对比度增益系数;
    根据以所述像素点为中心的第二预设像素区域内的多个像素值,确定所述像素点对应的浮动修正系数。
  10. 根据权利要求1所述的方法,其中,所述基于所述目标对比度增益系数对所述原始图像中每个所述像素点进行增强处理,获取增强后的目标图像,包括:
    利用所述目标对比度增益系数对所述原始图像的高频分量进行增强处理;
    将所述增强处理后的高频分量与所述原始图像的低频分量进行融合,得到增强后的像素点;
    遍历所述原始图像中的每个像素点,得到增强后的目标图像。
  11. 根据权利要求3所述的方法,其中,所述对所述原始图像进行滤波处理,得到所述原始图像对应的低频分量,包括:
    将滤波处理的像素值范围修改为0至所述原始图像的像素平均值;
    根据所述滤波处理的像素值范围对所述原始图像进行滤波,得到低频分量。
  12. 根据权利要求1所述的方法,其中,所述确定所述像素点对应的对比度增益系数和浮动修正系数,包括:
    基于自动色彩均衡算法计算所述像素点对应的对比度增益系数;
    基于所述像素点对应的纹理情况以及绝对差值算法计算所述浮动修正系数。
  13. 一种图像增强装置,其中,包括:
    获取模块,用于获取待进行图像增强的原始图像;
    确定模块,用于针对所述原始图像中的每个像素点,根据以所述像素点为中心的预设像素区域内的多个像素值,确定所述像素点对应的对比度增益系数和浮动修正系数;
    修正模块,用于基于所述像素点在所述原始图像中对应的纹理情况,利用所述浮动修正系数对所述像素点对应的对比度增益系数进行缩小或增大,得到修正后的目标对比度增益系数;
    增强模块,用于基于所述目标对比度增益系数对所述原始图像进行增强处理,获取增强后的目标图像。
  14. 根据权利要求13所述的图像增强装置,其中,所述修正模块,还用于在所述像素点为纹理区域时,利用所述浮动修正系数对所述像素点对应的对比度增益系数进行增大;
    在所述像素点为平坦区域时,利用所述浮动修正系数对所述像素点对应的对比度增益系数进行缩小。
  15. 根据权利要求13所述的图像增强装置,其中,所述确定模块,还用于对所述原始图像进行滤波处理,得到所述原始图像对应的低频分量;
    针对每个所述像素点,基于所述低频分量和所述像素点对应的所述像素区域内的多个像素值,获取所述像素点对应的局部标准差;
    基于所述局部标准差和预设增益参数,确定所述像素点对应的所述对比度增益系数。
  16. 根据权利要求13或14所述的图像增强装置,其中,所述确定模块,还用于获取所述预设像素区域对应的第一像素平均值和全局浮动修正系数;
    基于所述像素点对应的像素值与所述第一像素平均值确定局部浮动修正系数;
    基于所述局部浮动修正系数和所述全局浮动修正系数,确定所述浮动修正系数。
  17. 根据权利要求16所述的图像增强装置,其中,所述确定模块, 还用于计算所述像素点对应的像素值与所述第一像素平均值的差的绝对值;
    将所述绝对值作为所述像素点对应的所述局部浮动修正系数。
  18. 根据权利要求16所述的图像增强装置,其中,所述确定模块,还用于获取所述原始图像对应的第二像素平均值;
    基于所述像素点对应的像素值与所述第二像素平均值确定全局浮动修正系数。
  19. 一种计算机设备,包括:存储器和一个或多个处理器,所述存储器中存储有计算机可读指令;所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行权利要求1-12任一项所述的图像增强方法的步骤。
  20. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行权利要求1-12任一项所述的图像增强方法的步骤。
PCT/CN2022/100529 2021-12-30 2022-06-22 图像增强方法、装置、设备和存储介质 WO2023123927A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111680699.7 2021-12-30
CN202111680699.7A CN114298944A (zh) 2021-12-30 2021-12-30 图像增强方法、装置、设备和存储介质

Publications (1)

Publication Number Publication Date
WO2023123927A1 true WO2023123927A1 (zh) 2023-07-06

Family

ID=80975509

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/100529 WO2023123927A1 (zh) 2021-12-30 2022-06-22 图像增强方法、装置、设备和存储介质

Country Status (2)

Country Link
CN (1) CN114298944A (zh)
WO (1) WO2023123927A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116993628A (zh) * 2023-09-27 2023-11-03 四川大学华西医院 一种用于肿瘤射频消融引导的ct图像增强系统

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114298944A (zh) * 2021-12-30 2022-04-08 上海闻泰信息技术有限公司 图像增强方法、装置、设备和存储介质
CN114820397B (zh) * 2022-07-01 2022-09-06 托伦斯半导体设备启东有限公司 基于关注程度的图像增强方法及系统
CN115205163B (zh) * 2022-09-15 2022-12-09 深圳前海量子云码科技有限公司 一种标识图像的处理方法、装置、设备及存储介质
CN115713471B (zh) * 2022-11-23 2023-08-29 珠海视熙科技有限公司 一种图像降噪方法及装置、存储介质、计算机设备
CN115731205B (zh) * 2022-11-28 2024-04-26 北京大学 内窥镜的图像处理装置、方法、电子设备及存储介质
CN116309191B (zh) * 2023-05-18 2023-07-28 山东恒昇源智能科技有限公司 基于图像增强的瓦斯巡检智能显示方法
CN117314795B (zh) * 2023-11-30 2024-02-27 成都玖锦科技有限公司 一种利用背景数据的sar图像增强方法
CN117576597B (zh) * 2024-01-15 2024-04-12 深圳市金飞杰信息技术服务有限公司 一种基于无人机驾驶的视觉识别方法及其系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722864A (zh) * 2012-05-18 2012-10-10 清华大学 一种图像增强方法
US20190287227A1 (en) * 2018-02-20 2019-09-19 Synaptive Medical (Barbados) Inc. System and method for performing local-area contrast enhancement of digital images
CN112116542A (zh) * 2020-09-24 2020-12-22 西安宇视信息科技有限公司 图像对比度增强方法、装置、电子设备和存储介质
CN112419167A (zh) * 2020-09-28 2021-02-26 重庆港宇高科技开发有限公司 图像增强方法、装置及存储介质
CN114298944A (zh) * 2021-12-30 2022-04-08 上海闻泰信息技术有限公司 图像增强方法、装置、设备和存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722864A (zh) * 2012-05-18 2012-10-10 清华大学 一种图像增强方法
US20190287227A1 (en) * 2018-02-20 2019-09-19 Synaptive Medical (Barbados) Inc. System and method for performing local-area contrast enhancement of digital images
CN112116542A (zh) * 2020-09-24 2020-12-22 西安宇视信息科技有限公司 图像对比度增强方法、装置、电子设备和存储介质
CN112419167A (zh) * 2020-09-28 2021-02-26 重庆港宇高科技开发有限公司 图像增强方法、装置及存储介质
CN114298944A (zh) * 2021-12-30 2022-04-08 上海闻泰信息技术有限公司 图像增强方法、装置、设备和存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116993628A (zh) * 2023-09-27 2023-11-03 四川大学华西医院 一种用于肿瘤射频消融引导的ct图像增强系统
CN116993628B (zh) * 2023-09-27 2023-12-08 四川大学华西医院 一种用于肿瘤射频消融引导的ct图像增强系统

Also Published As

Publication number Publication date
CN114298944A (zh) 2022-04-08

Similar Documents

Publication Publication Date Title
WO2023123927A1 (zh) 图像增强方法、装置、设备和存储介质
CN108702496B (zh) 用于实时色调映射的系统和方法
WO2016206087A1 (zh) 一种低照度图像处理方法和装置
US10963995B2 (en) Image processing apparatus and image processing method thereof
US11113795B2 (en) Image edge processing method, electronic device, and computer readable storage medium
US9082171B2 (en) Image processing device for reducing image noise and the method thereof
US9747514B2 (en) Noise filtering and image sharpening utilizing common spatial support
CN106462955B (zh) 具有时间平滑和用户超驰的自动视频质量增强
US9142009B2 (en) Patch-based, locally content-adaptive image and video sharpening
US7983511B1 (en) Methods and apparatus for noise reduction in digital images
US9514525B2 (en) Temporal filtering for image data using spatial filtering and noise history
US10282830B2 (en) Apparatus for image contrast enhancement and method, electronic equipment
US20160037061A1 (en) Dynamic motion estimation and compensation for temporal filtering
US20210368088A1 (en) Systems and methods of image enhancement
WO2020259123A1 (zh) 一种调整图像画质方法、装置及可读存储介质
CN108280836B (zh) 一种图像处理方法及装置
JP2007506321A (ja) ピクセルごとに差分的に準規則的にデジタルイメージを修正するための方法およびシステム
WO2019047409A1 (zh) 图像处理方法、系统、可读存储介质及移动摄像设备
Albu et al. One scan shadow compensation and visual enhancement of color images
US8983187B2 (en) Systems and methods for performing edge enhancement in digital images
WO2021128498A1 (zh) 图像自适应降噪方法及装置
US9374526B2 (en) Providing frame delay using a temporal filter
WO2020113824A1 (zh) 图像处理方法
JP7387917B2 (ja) コンテンツに基づく画像処理
JP2023550352A (ja) 画像におけるボケを除去するためのシステム、装置、および方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22913216

Country of ref document: EP

Kind code of ref document: A1