WO2020173141A1 - 一种线性增强图像对比度的方法及装置 - Google Patents
一种线性增强图像对比度的方法及装置 Download PDFInfo
- Publication number
- WO2020173141A1 WO2020173141A1 PCT/CN2019/118448 CN2019118448W WO2020173141A1 WO 2020173141 A1 WO2020173141 A1 WO 2020173141A1 CN 2019118448 W CN2019118448 W CN 2019118448W WO 2020173141 A1 WO2020173141 A1 WO 2020173141A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- gray value
- interval
- linear transformation
- determined
- value interval
- 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.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
Definitions
- the invention relates to the field of computer technology, in particular to a method and device for linearly enhancing image contrast.
- the image contrast In the process of visible light or infrared imaging, due to the influence of factors such as light, ambient temperature, photoelectric conversion efficiency, etc., the image contrast often appears uneven. Specifically, the brightness of some areas of the image is too high due to high exposure, and some areas are underexposed and low brightness.
- Image enhancement is the most basic method of image processing. Image enhancement methods are generally divided into two categories: spatial domain and transform domain. Histogram equalization is one of the most commonly used algorithms in spatial domain image enhancement. The histogram equalizes and corrects the gray value of pixels in the entire frame of image, so that the number of pixels in the entire frame of image falling in different grayscale intervals is as even as possible, and there are pixels in each grayscale interval, so that the entire frame image has A stronger sense of hierarchy to achieve the purpose of image enhancement.
- the embodiment of the present invention provides a method and device for linearly enhancing the contrast of an image, which can effectively enhance the contrast of the image and retain the edge regions with rich gray value changes in the image.
- an embodiment of the present invention provides a method for linearly enhancing the contrast of an image, the method including: obtaining the gray value of the image to be processed and the frequency of each gray value;
- the gray value of each determined gray value interval to be transformed is linearly transformed by the corresponding linear transformation function to obtain a linearly enhanced image.
- the contrast of the image can be enhanced and the edge regions with rich gray value changes in the image can be preserved.
- an embodiment of the present invention provides an apparatus for linearly enhancing image contrast, which is characterized in that it includes: an acquiring unit configured to acquire the gray value of the image to be processed and the frequency of each gray value;
- the first determining unit is configured to determine m gray value intervals to be transformed to be linearly transformed according to the frequency of each gray value, where m is a positive integer;
- the second determining unit is configured to determine the minimum gray value and maximum gray value of each gray value interval to be transformed, and the minimum gray value after linear transformation of each gray value interval to be transformed And the maximum gray value to determine the linear transformation function corresponding to each segment of the gray value interval to be transformed;
- the linear transformation unit is used to linearly transform the determined gray value of each segment of gray value interval to be transformed through the corresponding linear transformation function to obtain a linearly enhanced image.
- the embodiments of the present invention provide a network device that realizes the function of obtaining the gray value of the image to be processed and the frequency of each gray value in the case, and calculating the linear transformation corresponding to the gray value interval.
- the function of the network device can be implemented by hardware Now, it can also be implemented by hardware executing corresponding software.
- the hardware or software includes at least one module corresponding to the above-mentioned functions.
- the network device includes a transceiver, a memory, and a processor.
- the transceiver is used to receive the image to be processed
- the memory is used to store the linear enhancement image contrast program code
- the processor is used to call the linear enhancement image contrast program code stored in the memory to execute the linear enhancement image contrast method described in the first aspect.
- an embodiment of the present invention provides a computer-readable storage medium having instructions stored on the computer-readable storage medium, which when run on a processor, cause the processor to perform the linear enhancement described in the first aspect.
- Image contrast method In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having instructions stored on the computer-readable storage medium, which when run on a processor, cause the processor to perform the linear enhancement described in the first aspect. Image contrast method.
- Figure 1 is a schematic structural diagram of a network device according to an embodiment of the present invention.
- FIG. 2 is a schematic diagram of a process of linearly enhancing image contrast according to an embodiment of the present invention
- Figure 3 is a schematic diagram of an image gray histogram provided by an embodiment of the present invention.
- FIG. 4 is a schematic diagram of a process of linearly enhancing image contrast according to an embodiment of the present invention.
- Figure 5 is a schematic diagram of an image gray histogram provided by an embodiment of the present invention.
- Fig. 6 is a schematic diagram of a gray histogram after linear transformation provided by an embodiment of the present invention.
- FIG. 7 is a schematic diagram of a gray histogram after linear transformation according to an embodiment of the present invention.
- Fig. 8 is a schematic structural diagram of a device for linearly enhancing image contrast provided by an embodiment of the present invention. detailed description
- the embodiments of the present invention provide a method and device for linearly enhancing the contrast of an image, which can enhance the contrast of the image and preserve the edge regions with rich gray value changes in the image.
- FIG. 1 shows a network device provided by an embodiment of the present invention.
- the network device 100 may include: one or more processors 101, a memory 102, a transmitter 103, a receiver 104, and a network interface 105 . These components can be connected via the bus 105 or in other ways.
- Figure 1 shows the connection via the bus as an example. among them:
- the processor 101 may be a general-purpose processor such as a central processing unit (CPU), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (ASIC), or Is one or more integrated circuits configured to implement embodiments of the invention.
- the processor 101 can process data received through the receiver 104.
- the memory 102 may be coupled with the processor 101 through a bus 105 or an input/output port, and the memory 102 may also be integrated with the processor 101.
- the memory 102 is used to store various software programs and/or multiple sets of instructions.
- the specific / memory 102 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.
- the memory 302 can also store a network communication program, which can be used to communicate with one or more additional devices, one or more terminals, and one or more networks. Network equipment to communicate.
- the receiver 104 can be used to perform receiving processing on the received image.
- the number of the transmitter 103 and the receiver 104 may each be one or more.
- the processor 101 can be used to read and execute computer readable instructions. Specifically, the processor 101 may be used to call data stored in the memory 102. Optionally, when the processor 101 sends any message or data, it specifically drives or controls the transmitter 103 to do the sending. Optionally, when the processor 101 receives any message or data, it specifically drives or controls the receiver 104 to do the reception. Therefore, the processor 101 can be regarded as a control center that performs transmission or reception, and the transmitter 103 and the receiver 104 are specific performers of the transmission and reception operations.
- the network interface 105 is used for the network device 100 to communicate with other network devices.
- the network interface 105 can be a wired connection.
- FIG. 2 is a schematic flowchart of a method for linearly enhancing image contrast according to an embodiment of the present invention.
- a method for linearly enhancing image contrast provided by an embodiment of the present invention may include: S200: Obtain the gray value of the image to be processed and the frequency of each gray value.
- FIG. 3 is a schematic diagram of a gray-scale histogram provided by an embodiment of the present invention.
- the abscissa represents the grayscale value of the image to be processed
- the ordinate represents the frequency of the grayscale value.
- the gray value of the image to be processed and the frequency of each gray value are acquired through MATLAB, Photoshop or other software or hardware devices, which is not limited in the embodiment of the present application.
- the optional determination of m gray value intervals to be transformed to be linearly transformed according to the frequency of occurrence of each gray value includes: dividing the gray value interval on the gray value number axis of the image to be processed; if the target The sum of the gray value appearance frequencies of the gray value interval is greater than the first threshold, and the target gray value interval is determined as the gray value interval to be transformed.
- the target gray value interval is an interval in the divided gray value interval;
- the first threshold value is a threshold value corresponding to the target gray value interval, and the first threshold value is the same as the target gray value interval.
- the threshold value corresponding to the value interval, and the interval length of different target gray value intervals corresponds to different threshold values.
- the gray value interval 100-150 has a first threshold corresponding to the interval
- the gray value interval 150-180 has a first threshold corresponding to the interval.
- determining the m-segment gray value interval to be linearly transformed also includes:
- the formula one is: , Where ceil() is a round-up function, q is the length of the entire gray value interval of the image to be processed, and n is a positive integer.
- the entire gray value interval of the image is divided into 4 segments, namely: 50-90, 90-130, 130 ⁇ 170 and 170 ⁇ 200 o S302. Count the sum of the gray value occurrence frequencies of each gray value interval of the a gray value intervals.
- the total frequency of gray values in the 50 ⁇ 100 range is 0.41
- the total frequency of gray values in the 100 ⁇ 150 range is 0.578
- the total frequency of gray values in the 150-200 range is 0.012.
- each gray value interval determines the _th threshold of each gray value interval according to formula 2.
- the _th threshold of these three gray value interval segments are all 1/3. Since the sum of the gray values in the 50-100 interval is 0.41, the sum of the gray values in the 100-150 interval is 0.578, and the sum of the gray values in the 150-200 interval is 0.012. Therefore, the comparison result is: the sum of the gray value occurrence frequency of the gray value interval 50-100 and the gray value interval 100-150 is greater than the corresponding threshold value of each interval, and the gray value occurrence frequency of the gray value interval 150 ⁇ 200 The sum is less than the first threshold corresponding to the interval.
- the value of Z can be 1- ⁇ 0, that is, the value of z can increase with the increase of q, so that the parameter z can be dynamically selected, and each segment can be determined more flexibly and intelligently.
- the first threshold of the gray value interval can be 1- ⁇ 0, that is, the value of z can increase with the increase of q, so that the parameter z can be dynamically selected, and each segment can be determined more flexibly and intelligently.
- the target gray value interval is determined as the gray value interval to be transformed.
- the gray value interval 50 ⁇ 100 and the gray value interval 100 ⁇ 150 are determined Is the gray value interval to be transformed.
- the first threshold corresponding to each gray value interval is determined according to the length of each gray value interval and the total length of the gray value interval of the image to be processed, which can quickly and accurately find the gray value distribution concentration ratio. High gray value interval, so as to determine the gray value interval for linear transformation.
- the minimum gray value and the maximum gray value after linear transformation of each determined gray value interval to be transformed may be the same or different.
- the minimum gray value after linear transformation in the gray value interval 50-100 is 0 and the maximum gray value is 250; the gray value interval 100-150 after linear transformation is the minimum gray value is 0 and the maximum gray value is 250.
- the minimum gray value after linear transformation in the gray value range 50-100 is 0, and the maximum gray value is 250; the minimum gray value after linear transformation in the gray value range 100 to 150 is 50 and the maximum gray value is 250 .
- the linear transformation functions corresponding to the respective intervals After determining the minimum and maximum gray values after linear transformation in the respective intervals, determine the linear transformation functions corresponding to the respective intervals.
- the minimum gray value after linear transformation in the gray value interval 50-100 is 0, and the maximum gray value is 250; the minimum gray value after linear transformation in the gray value interval 100-150 is 0 and the maximum gray value is 250 as an example to illustrate.
- formula three calculate the slope k of the linear transformation function corresponding to each determined gray value interval, where the formula three is: k is the maximum gray value after linear transformation of each determined gray value interval Degree value,
- M 2 is the maximum gray value of each determined gray value interval
- Mi is each determined gray value The minimum gray value of the interval.
- the slope of the gray value range 50-100 is; the gray value range 100 ⁇ 150
- S500 Perform linear transformation on the determined gray value of each gray value interval to be transformed by the respective corresponding linear transformation function to obtain a linearly enhanced image.
- the determined minimum gray value of each gray value interval after linear transformation is 0, and the maximum gray value of each determined gray value interval after linear transformation is 255.
- the minimum gray value of each gray value in all images is greater than or equal to 0, the maximum gray value is less than or equal to 255. Therefore, the minimum gray value after linear transformation is determined to be 0, and the maximum gray value after linear transformation It is 255, which can make the gray value in the gray value interval as large as possible to be evenly distributed, so as to achieve the effect of enhancing image contrast.
- FIG. 7 is a schematic diagram of a gray histogram after linear transformation provided by an embodiment of the present invention. As shown in Figure 7, after the entire image is linearly transformed, the gray value of the image is evenly distributed on the gray value number axis. Compared with the linearly transformed image, the overall contrast of the linearly transformed image is greatly improved.
- the method further includes:
- the gray value interval in the gray value distribution concentration can be found quickly and accurately.
- Each gray value interval, so that the image to be processed has a stronger sense of hierarchy, in order to achieve the purpose of image enhancement.
- FIG. 8 is a schematic structural diagram of an apparatus for linearly enhancing image contrast provided by an embodiment of the present invention.
- the apparatus 800 for linearly enhancing image contrast includes: an acquisition unit 801, a first determination unit 802, a second determination unit 803, and a linear transformation unit 804.
- the acquiring unit 801 is used to acquire the gray value of the image to be processed and the frequency of each gray value; the first determining unit 802 is used to determine the minimum gray value of each gray value interval to be transformed. And the maximum gray value, and the minimum gray value and the maximum gray value after each linear transformation of each gray value interval to be transformed determine the linear transformation function corresponding to each gray value interval to be transformed; The second determining unit 803 is configured to determine the minimum gray value and maximum gray value of each gray value interval to be transformed, and the minimum gray value and the minimum gray value of each gray value interval to be transformed after linear transformation.
- the maximum gray value determines the linear transformation function corresponding to each gray value interval to be transformed; the linear transformation unit 804 is used to pass the determined gray value of each gray value interval to be transformed through the corresponding linear
- the transformation function performs linear transformation to obtain a linearly enhanced image.
- the first determining unit 802 includes:
- the dividing unit 805 is configured to divide the gray value interval on the gray value number axis of the image to be processed
- the third determining unit 806 is configured to determine the target gray value interval as the gray value interval to be transformed from the divided gray value intervals; wherein the sum of the gray value appearance frequencies of the target gray value interval is greater than the first Threshold, the first threshold is a threshold corresponding to the target gray value interval.
- the device 800 further includes:
- the slope k of the linear transformation function corresponding to the value interval wherein said is the maximum gray value after linear transformation of each determined gray value interval, and said is the linear transformation of each determined gray value interval After the minimum gray value, the M 2 is the maximum gray value of each determined gray value interval, and the Mi is the minimum gray value of each determined gray value interval;
- the device 800 further includes:
- the judging unit 808 is used for the linear transformation unit 804 to linearly transform the determined gray value of each segment of the gray value interval to be transformed by the corresponding linear transformation function, and after obtaining the linearly enhanced image, determine whether there is one a plurality of gray value or gray value interval occurs first threshold value Shu _ sum is greater than the frequency of the one or more gray scale values corresponding to the section
- the i-th unit 805 is configured to, after the judgment unit 808 judges that there are one or more gray value intervals, the sum of the gray value appearance frequencies is greater than the first threshold corresponding to the one or more gray value intervals, according to the one The minimum gray value and the maximum gray value of each or multiple gray value intervals, and the minimum gray value and the maximum gray value of each of the one or more gray value intervals after linear transformation determine the one or more gray value intervals.
- the embodiment of the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium may store a program, and the program includes part or all of the steps of any one of the above method embodiments when executed.
- the embodiment of the present invention also provides a computer program, the computer program including instructions, when the computer program is executed by a computer, the computer can execute part or all of the steps of any vehicle-mounted equipment upgrade method.
- the computer program product includes one or more computer instructions.
- the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
- the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center.
- the readable storage medium may be any available medium that can be accessed by the computer or a data storage device such as a server, data center, etc. integrated with one or more available media.
- the available medium may be a magnetic medium, (for example, a floppy disk, a hard disk, Magnetic tape), optical media (such as digital versatile disc (DVD), semiconductor media (such as solid state disk JSD), etc. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
- the technical solution of the present invention is essentially or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium. It includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present invention.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program code .
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
一种线性增强图像对比度的方法和装置。其中,所述方法包括:获取待处理图像的灰度值,以及每个灰度值出现的频率(S200);根据所述每个灰度值出现的频率确定待线性变换的m段待变换灰度值区间,所述m为正整数(S300);根据确定的每一段待变换灰度值区间各自的最小灰度值和最大灰度值,以及所述每一段待变换灰度值区间各自线性变换后的最小灰度值和最大灰度值确定所述每一段待变换灰度值区间各自对应的线性变换函数(S400);将所述确定的每一段待变换灰度值区间的灰度值通过各自对应的线性变换函数进行线性变换,得到线性增强后的图像(S500)。采用该方法,可以有效增强图像的对比度并且保留图像中丰富灰度值变化的边缘区域。
Description
一种线性增强图像对比度的方法及装置
本申请要求于 2019年 02月 26日提交中国专利局、 申请号为 201910142730.8、 申请名 称为" _种线性增强图像对比度的方法及装置〃 的中国专利申请的优先权,其全部内容通 过引用结合在本申请中。 技术领域
本发明涉及计算机技术领域,尤其涉及一种线性增强图像对比度的方法及装置。
S可见光或者红外线成像的过程中 ,由于受到光照、 环境温度、 光电转化效能等因素 的影响,常出现图像对比度不均衡的现象。 具体表现在图像部分区域由于曝光亮度过高, 部分区域曝光不足而亮度过低。
图像增强是图像处理的最基本手段,图像增强的方法一般分为空间域和变换域两大类, 直方图均衡是空间域图像增强中的最常用的算法之一。 直方图均衡修正整帧图像中的像素 灰度值,使整帧图像中落在不同灰度区间的像素数量尽可能平均、 且每个灰度区间内均有 像素,从而通过使整帧图像具有更强的层次感来达到图像增强的目的。
然而对于整帧图像来说,其包含有丰富灰度值变化的边缘区域、 细节区域,有可能会 由于对整帧图像的灰度值均衡而丢失,导致增强后的图像质量不高。 发明内容
本发明实施例提供一种线性增强图像对比度的方法及装置,可以有效增强图像的对比 度并且保留图像中丰富灰度值变化的边缘区域。
第一方面,本发明实施例提供了一种种线性增强图像对比度的方法,该方法包括: 获取待处理图像的灰度值,以及每个灰度值出现的频率;
根据所述每个灰度值出现的频率确定待线性变换的 m段待变换灰度值区间,所述 m为 正整数;
根据确定的每一段待变换灰度值区间各自的最小灰度值和最大灰度值,以及所述每一 段待变换灰度值区间各自线性变换后的最小灰度值和最大灰度值确定所述每一段待变换灰 度值区间各自对应的线性变换函数;
将所述确定的每一段待变换灰度值区间的灰度值通过各自对应的线性变换函数进行线 性变换,得到线性增强后的图像。
实施本发明例,通过将待处理图像的一段或多段灰度值区间进行线性变换,可以增强 图像的对比度并且保留图像中丰富灰度值变化的边缘区域。
第二方面,本发明实施例提供一种线性增强图像对比度的装置,其中特征在于,包括: 获取单元,用于获取待处理图像的灰度值,以及每个灰度值出现的频率;
第一确定单元,用于根据所述每个灰度值出现的频率确定待线性变换的 m段待变换灰 度值区间,所述 m为正整数;
第二确定单元,用于根据确定的每一段待变换灰度值区间各自的最小灰度值和最大灰 度值,以及所述每一段待变换灰度值区间各自线性变换后的最小灰度值和最大灰度值确定 所述每一段待变换灰度值区间各自对应的线性变换函数;
线性变换单元,用于将所述确定的每一段待变换灰度值区间的灰度值通过各自对应的 线性变换函数进行线性变换,得到线性增强后的图像。
第三方面,本发明实施例提供了一种网络设备,该网络设备实现获取待处理图像的灰 度值和每个灰度值出此案的频率的功能、 计算灰度值区间对应的线性变换函数的功能和将 每段灰度值区间的灰度值进行线性变换的功能。 其中,该网络设备的功能可以通过硬件实
现,也可以通过硬件执行相应的软件实现。 所述硬件或软件包括至少一个与上述功能相对 应的模块。 该网络设备包括收发器,存储器,处理器。 收发器用于接收待处理图像,存储 器用于存储线性增强图像对比度程序代码,处理器用于调用存储器中存储的线性增强图像 对比度程序代码执行上述第一方面所描述的线性增强图像对比度的方法。
第四方面,本发明实施例提供了一种计算机可读存储介质,该计算机可读存储介质上 存储有指令,当其在处理器上运行时,使得处理器执行上述第一方面描述的线性增强图像 对比对度的方法。
本申请附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明 显,或通过本申请的实践了解到。 附图说明
本申请上述的和 /或附加的方面和优点从下面结合附图对实施例的描述中将变得明显 和容易理解,其中:
图 1是本发明实施例提供的一种网络设备的结构示意图;
图 2是本发明实施例提供的一种线性增强图像对比度的流程示意图;
图 3是本发明实施例提供的图像灰度直方图示意图;
图 4是本发明实施例提供的一种线性增强图像对比度的流程示意图;
图 5是本发明实施例提供的图像灰度直方图示意图;
图 6是本发明实施例提供的线性变换后的灰度直方图示意图;
图 7是本发明实施例提供的线性变换后的灰度直方图示意图;
图 8是本发明实施例提供的线性增强图像对比度装置的结构示意图。 具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例进行描述。
本发明实施例提供一种线性增强图像对比度的方法和装置,可以增强图像的对比度并 且保留图像中丰富灰度值变化的边缘区域。
本发明说明书、 权利要求书和附图中出现的术语" 包括〃 和" 具有〃 以及它们任何变 形,意图在于覆盖不排他的包含。 例如包含了一系列步骤或单元的过程、 方法、 系统、 产 品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或 可选地还包括对于这些过程、 方法、 产品或设备固有的其它步骤或单元。 此外,术语 " 第 _〃 、 " 第二〃 和" 第三〃 等是用于区别不同的对象,而并非用于描述特定的顺序。 下面 将结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述。
参见图 1 ,图 1示出了本发明实施例提供的 _种网络设备,该网络设备 100可包括: _个或多个处理器 101、 存储器 102、 发射器 103、 接收器 104和网络接口 105。 这些部件 可通过总线 105或者其他方式连接,图 1以通过总线连接为例。 其中:
处理器 101可以是通用处理器 M列如中央处理器 (central processing unit , CPU),还可以 是数字信号处理器 (digital signal processing , DSP)、 专用集成电路 (application specific integrated circuit , ASIC) ,或者是被配置成实施本发明实施例的一个或多个集成电路。 处理 器 101可处理通过接收器 104接收到的数据。
存储器 102可以和处理器 101通过总线 105或者输入输出端口耦合,存储器 102也可 以与处理器 101集成在一起。 存储器 102用于存储各种软件程序和 /或多组指令。 具体的 / 存储器 102可包括高速随机存取的存储器,并且也可包括非易失性存储器,例如一个或多 个磁盘存储设备、 闪存设备或其他非易失性固态存储设备。 存储器 302还可以存储网络通 信程序,该网络通信程序可用于与一个或多个附加设备,一个或多个终端,一个或多个网
络设备进行通信。
接收器 104可用于对接收的图像进行接收处理。 在网络设备 100中,发射器 103和接 收器 104的数量均可以是一个或者多个。
处理器 101可用于读取和执行计算机可读指令。 具体的,处理器 101可用于调用存储 于存储器 102中的数据。 可选地,当处理器 101发送任何消息或数据时,其具体通过驱动 或控制发射器 103做所述发送。 可选地,当处理器 101接收任何消息或数据时,其具体通 过驱动或控制接收器 104做所述接收。 因此,处理器 101可以被视为是执行发送或接收的 控制中心,发射器 103和接收器 104是发送和接收操作的具体执行者。
网络接口 105用于网络设 100与其他网络设备进行通信,网络接口 105可以是有线接
□。
结合图 1所示的网络设备,本发明实施例提供了一种线性增强图像对比度的方法,参 见图 2 ,图 2为本发明的一个实施例提供的一种线性增强图像对比度的方法的流程示意图。 其中,如图 2所示,本发明的一个实施例提供的一种线性增强图像对比度方法可以包括: S200 ,获取待处理图像的灰度值,以及每个灰度值出现的频率。
以灰度直方图举例来进行说明,参见图 3 ,图 3 为本发明实施例提供的灰度直方图示 意图。如图 3所示,该待处理图像对应的灰度直方图中,横坐标代表待处理图像的灰度值, 纵坐标代表灰度值出现的频率。
可以理解的是,获取待处理图像的灰度值以及每个灰度值出现的频率的方式可以是多 种的。 例如,通过 MATLAB、 Photoshop或者其他软件、 硬件设备获取图像的灰度值以及 每个灰度值出现的频率,本申请实施例对此不做限定。
5300 ,根据每个灰度值出现的频率确定待线性变换的 m段待变换灰度值区间, m为正 整数
= °可选的 艮据每个灰度值出现的频率确定待线性变换的 m段待变换灰度值区间,包括: 在该待处理图像的灰度值数轴上划分灰度值区间;若目标灰度值区间的灰度值出现频 率的总和大于第一阈值,则将所述目标灰度值区间确定为待变换灰度值区间。 其中,该目 标灰度值区间为划分出来的灰度值区间中的区间;所述第一阈值为与所述目标灰度值区间 对应的阈值,所述第一阈值为与所述目标灰度值区间对应的阈值,不同的目标灰度值区间 的区间长度对应不同的阈值。
参见图 3 ,例如,灰度值区间 100-150有该区间对应的第一阈值,灰度值区间 150~180 有该区间对应的第一阈值。
参见图 4 ,图 4为本发明实施例提供的一种线性增强图像对比度的方法的流程示意图。 如图 4所示,确定待线性变换的 m段灰度值区间还包括:
5301 ,将待处理图像的灰度值数轴分为成 a个灰度值区间, a为正整数。
参见 5 ,图 5为本发明实施例提供的图像灰度直方图示意图。 如图 5所示,该图像的整个 灰度值区间分布在 50-200 ,所以该图像的整个灰度值区间长度为 150。 以 n取 50为例来进 行说明,根据公式一计算 a的值, a = ceil = 30 因此,该图像整个灰度值区间分为 3
段,分别为: 50-100, 100~150和 150~200o
图像整个灰度值区间分为 4段,分别为: 50-90, 90-130, 130~170和 170~200o
5302 ,统计所述 a个灰度值区间的每一个灰度值区间灰度值出现频率的总和。
以 n取 50为例来进行说明,统计 3段灰度值区间灰度值出现频率的总和。 50~100区 间灰度值出现频率的总和为:0.41 , 100~150区间灰度值出现频率的总和为:0.578 , 150-200 区间灰度值出现频率的总和为: 0.012。
5303 ,比较所述每一个灰度值区间灰度值出现频率的总和与所述每一段灰度值区间对 应的第一阈值的大小。
可选的,根据公式二,确定每 _段灰度值区间的第 _阈值,公式二为: H = z X 2 ,其 q 中 q为所述待处理图像的整个灰度值区间长度 , p为所述 a个灰度值区间的每一个灰度值区 间的区间长度, z 2 1。 参见图 5 ,以 q为 150 , n为 50为例来进行说明,当 n为 50 ,待处理图像的灰度值区 间分为 3个灰度值 lk间,分别为: 50-100, 100~150和 150-200 ,每个灰度值区间的区间长 度为 50,所以 p的值为 50。
可选的, z的取值大于等于 1 ,这以 z=l为例进行说明。 当 z的取值为 1 ,这 3个灰度 值区间段的第 _阈值都为 1/3。 由于 50-100区间灰度值出现频率的总和为: 0.41 , 100-150 区间灰度值出现频率的总和为: 0.578 , 150~200区间灰度值出现频率的总和为: 0.012。 所 以,比较结果为:灰度值区间 50-100和灰度值区间 100-150的灰度值出现频率总和大于各 自区间对应的第_阈值,灰度值区间 150~200的灰度值出现频率总和小于该区间对应的第 一阈值。
可选的, Z的取值可以 1 -^0 也就是说 z的取值可以随着 q的增大而增大,从而可以 动态地对参数 z进行取值,更加灵活更加智能地确定每一段灰度值区间的第一阈值。
5304 ,若目标灰度值区间的灰度值出现频率的总和大于目标灰度值区间对应的第一阈 值,则将该目标灰度值区间确定为待变换的灰度值区间。
因为灰度值区间 50~100和灰度值区间 100~150的灰度值出现频率总和大于各自区间对 应的第一阈值,所以将灰度值区间 50~100和灰度值区间 100~150确定为待变换的灰度值区 间。
实施本发明例,根据每段灰度值区间的长度与待处理图像灰度值区间总长度确定每段 灰度值区间对应的第一阈值,可以快速精确地找出灰度值分布集中度较高的灰度值区间, 从而确定进行线性变换的灰度值区间。
S400 ,根据确定的每一段待变换灰度值区间各自的最小灰度值和最大灰度值,以及确 定的每一段待变换灰度值区间各自线性变换后的最小灰度值和最大灰度值确定的每一段待 变换灰度值区间各自对应的线性变换函数。
可选的,所述确定的每一段待变换灰度值区间各自线性变换后的最小灰度值和最大灰 度值可以是相同的,可以是不同的。
以灰度值区间 50-100和灰度值区间 100-150举例来进行说明。 灰度值区间 50~100线 性变换后的最小灰度值为 0 ,最大灰度值为 250 ;灰度值区间 100-150线性变换后的最小灰 度值为 0 ,最大灰度值为 250。 或者,灰度值区间 50-100线性变换后的最小灰度值为 0 , 最大灰度值为 250 ;灰度值区间 100~150线性变换后的最小灰度值为 50最大灰度值为 250。
可选的,确定各自区间线性变换后的最小和最大灰度值之后,确定各自区间对应的线 性变换函数。这里以灰度值区间 50-100线性变换后的最小灰度值为 0,最大灰度值为 250 ; 灰度值区间 100-150线性变换后的最小灰度值为 0 ,最大灰度值为 250为例来进行说明。
根据公式三,计算所述确定的每一段灰度值区间对应的线性变换函数的斜率 k ,其中 , 所述公式三为: k 为所述确定的每一段灰度值区间线性变换后的最大灰度值,
为所述确定的每一段灰度值区间线性变换后的最小灰度值, M2为所述确定的每一段灰度 值区间的最大灰度值, Mi为所述确定的每一段灰度值区间的最小灰度值。
的斜率为
100-150的斜率为 b2 =A1-KxM1 = 0-Sxl00 = -500
灰度值区间 50-100的截距为 :bl= A2 -KxM2 = 250 - 5 x 100 = -250 ;灰度值区 间 100-150的斜率为 b2 = A2 -KxM2 = ISO- SxlS0 = -500。
根据公式五,计算所述确定的每一段灰度值区间对应的线性变换函数,所述公式五为 : gif) = kx f + b ,其中 , f为所述确定的每一段灰度值区间的灰度值。 所以 /灰度值区间 50-100的线性变换函数为 : g1(f) = klxf + bl = Sf-2S0;灰度 值区间 50-100的线性变换函数为 a) = k2xf + b2 = Sf- 500。
S500 ,将所述确定的每一段待变换灰度值区间的灰度值通过各自对应的线性变换函数 进行线性变换, 得到线性增强后的图像。
将灰度值区间 50-100 中的所有灰度值代入线性变换函数 g1(/) = 5 / - 250 ,将灰度值 区间 100-150中的所有灰度值代入线性变换函数 2(/0 = 5/ - 500。 以将灰度值区间 100~150中的所有灰度值代入线性变换函数 a) = 5/- 500举例来进 行说明。 分别将该灰度值区间的所有灰度值代入现象变换函数进行线性变换。 例如,将灰 度值 101代入,灰度值 101线性变换后的灰度值为 5。 参见图 6 ,图 6为本发明实施例提供 的线性变换后的灰度直方图示意图。 灰度值区间 100~150中的所有灰度值代入线性变换函 数 00 = 5/- 500之后,得到新的灰度直方图如图 6所示。 灰度值区间 100-150经过线性 变换后,线性变换后的图像的灰度值区间的灰度值分布比变换前的灰度值区间分布均匀很 多。
可选的,所述确定的每一段灰度值区间线性变换后的最小灰度值为 0 ,所述确定的每 一段灰度值区间线性变换后的最大灰度值为 255。
实施本发明例, 由于所有图像中的各个灰度值的灰度值最小灰度值大于等于 0 ,最大 灰度值小于等于 255。 因此,确定线性变换后的最小灰度值为 0 ,线性变换后的最大灰度值
为 255 ,可以使灰度值区间的灰度值尽可能大范围的平局分布,从而达到增强图像对比度 的效果。
进一步的將灰度值区间 50~100中的所有灰度值代入线性变换函数 (/) = 5 / - 250 , 得到线性变换后的灰度值图像。 参见图 7 ,图 7为本发明实施例提供的线性变换后的灰度 直方图示意图。 如图 7所示,整个图像经过线性变换后,图像的灰度值均匀的分布在灰度 值数轴,相较于线性变换钱的图像,线性变换后的图像的整体对比度大大提高。
可选的,将所述确定的每一段待变换灰度值区间的灰度值通过各自对应的线性变换函 数进行线性变换,得到线性增强后的图像之后,还包括:
判断是否存在一个或多个灰度值区间的灰度值出现频率总和大于所述一个或多个灰度 值区间对应的第一阈值;
若存在,根据所述一个或多个灰度值区间各自的最小灰度值和最大灰度值,以及所述 一个或多个灰度值区间各自线性变换后的最小灰度值和最大灰度值确定所述一个或多个灰 度值区间各自对应的线性变换函数
将所述一个或多个灰度值区间的灰度值通过各自对应的线性变换函数进行线性变换, 得到线性增强后的图像。
可以理解的是,若存在一个或多个灰度值区间的灰度值出现频率总和大于所述一个或 多个灰度值区间对应的第一阈值,针对这一个或多个灰度值区间的处理方法与上述实施例 说明的方法是一致的。
实施本发明例,通过比较每一段灰度值区间灰度值出现频率总和与该区间第一阈值的 大小,可以快速精确的找出灰度值分布集中的灰度值区间。 通过每段灰度值区间的最小灰 度和最大灰度值确定每段灰度值区间对应的线性变化函数,可以使每段灰度值区间的灰度 值线性变换后尽可能平均的分布在各个灰度值区间,从而使得待处理图像具有更强的层次 感,以达到图像增强的目的。
参见图 8 ,图 8为本发明实施例提供的线性增强图像对比度装置的结构示意图。 如图 8 所示,该线性增强图像对比度的装置 800包括:获取单元 801 ,第_确定单元 802 ,第二确 定单元 803和线性变换单元 804。
其中,获取单元 801用于获取待处理图像的灰度值,以及每个灰度值出现的频率;第 一确定单元 802用于根据确定的每一段待变换灰度值区间各自的最小灰度值和最大灰度值, 以及所述每一段待变换灰度值区间各自线性变换后的最小灰度值和最大灰度值确定所述每 一段待变换灰度值区间各自对应的线性变换函数;第二确定单元 803用于根据确定的每一 段待变换灰度值区间各自的最小灰度值和最大灰度值,以及所述每一段待变换灰度值区间 各自线性变换后的最小灰度值和最大灰度值确定所述每一段待变换灰度值区间各自对应的 线性变换函数;线性变换单元 804用于将所述确定的每一段待变换灰度值区间的灰度值通 过各自对应的线性变换函数进行线性变换,得到线性增强后的图像。
可选的,所述第一确定单元 802包括:
划分单元 805 ,用于在所述待处理图像的灰度值数轴上划分灰度值区间;
第三确定单元 806 ,用于从划分的灰度值区间中确定目标灰度值区间为待变换灰度值 区间;其中,所述目标灰度值区间的灰度值出现频率的总和大于第一阈值,所述第一阈值 为与所述目标灰度值区间对应的阈值。
可选的,划分单元 805,具体用于将所述待处理图像的灰度值数轴划分为 a个灰度值区 间;根据公式3 =
计算所述 a的值,其中,所述 ceil()为向上取整函数,所述 q为所 述待处理图像的整个灰度值区间的区间长度,所述 n为正整数。
可选的,所述装置 800还包括:
计算单元 807 ,用于在划分单元 805在所述待处理图像的灰度值数轴上划分灰度值区 间之后,第三确定单元 806从划分的灰度值区间中确定目标灰度值区间为待变换灰度值区 间之前,根据公 SH = z X E确定划分的灰度值区间对应的第一阈值,其中,所述 q为所述 q
可选的,线性变换单元 804具体用于,根据公 Sk = 计算所述确定的每一段灰度
M2-M1
值区间对应的线性变换函数的斜率 k ,其中,所述 为所述确定的每一段灰度值区间线性 变换后的最大灰度值,所述 为所述确定的每一段灰度值区间线性变换后的最小灰度值, 所述 M2为所述确定的每一段灰度值区间的最大灰度值,所述 Mi为所述确定的每一段灰度值 区间的最小灰度值;
根据公式 b = A1 - K X Mi计算所述确定的每 _段灰度值区间对应的线性变换函数的截 距 b ;
根据公式 ; 0 = k x f + 6确定所述确定的每一段灰度值区间对应的线性变换函数,其 中,所述 f为所述确定的每一段灰度值区间的灰度值。
可选的,所述装置 800还包括:
判断单元 808 ,用于线性变换单元 804将所述确定的每一段待变换灰度值区间的灰度 值通过各自对应的线性变换函数进行线性变换,得到线性增强后的图像之后,判断是否存 在一个或多个灰度值区间的灰度值出现频率总和大于所述一个或多个灰度值区间对应的第 _阈值丨
第 i单元 805 ,用于在判断单元 808判断存在一个或多个灰度值区间的灰度值出现频 率总和大于所述一个或多个灰度值区间对应的第一阈值之后,根据所述一个或多个灰度值 区间各自的最小灰度值和最大灰度值,以及所述一个或多个灰度值区间各自线性变换后的 最小灰度值和最大灰度值确定所述一个或多个灰度值区间各自对应的线性变换函数; 第二线性变换单元,用于将所述一个或多个灰度值区间的灰度值通过各自对应的线性 变换函数进行线性变换,得到线性增强后的图像。
本发明实施例还提供一种计算机可读存储介质,其中,该计算机可读存储介质可存储 有程序,该程序执行时包括上述方法实施例中记载的任意一种的部分或全部步骤。
本发明实施例还提供一种计算机程序,该计算机程序包括指令,当该计算机程序被计 算机执行时,使得计算机可以执行任意一种车载设备升级方法的部分或全部步骤。
在上述实施例中,可以全部或部分地通过软件、 硬件、 固件或者其任意组合来实现。 当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。 所述计算机程序产 品包括一个或多个计算机指令。 在计算机上加载和执行所述计算机程序指令时,全部或部 分地产生按照本申请实施例所述的流程或功能。 所述计算机可以是通用计算机、 专用计算 机、 计算机网络、 或者其他可编程装置。 所述计算机指令可以存储在计算机可读存储介质 中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算 机指令可以从一个网站站点、 计算机、 服务器或数据中心通过有线(例如同轴电缆、 光纤、 数字用户线(digital subscriber line , DSL)或无线(例如红外、 无线、 微波等)方式向另一个网 站站点、 计算机、 服务器或数据中心进行传输。 所述计算机可读存储介质可以是计算机能 够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、 数据中心等数据存 储设备。 所述可用介质可以是磁性介质,(例如,软盘、 硬盘、 磁带)、 光介质(例如数字多 功能光盘(digital versatile disc ,DVD) 半导体介质(例如固态硬盘 solid state disk JSD)等。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可 以存储在一个计算机可读取存储介质中。 基于这样的理解,本发明的技术方案本质上或者 说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现 出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备 ( 可以是个人计算机,服务器,或者网络设备等 ) 执行本发明各个实施例所述方法的全部 或部分步骤。 而前述的存储介质包括: U盘、 移动硬盘、 只读存储器 (read-only memory , ROM)、 随机存取存储器 (random access memory , RAM)、 磁碟或者光盘等各种可以存储 程序代码的介质。
在本说明书的描述中,参考术语" 一个实施例〃 、 " 一些实施例〃 、 " 示例〃 、 " 具 体示例〃 、 或" 一些示例〃 等的描述意指结合该实施例或示例描述的具体特征、 结构、 材 料或者特点包含于本发明的至少一个实施例或示例中。 在本说明书中,对上述术语的示意 性表述不必须针对的是相同的实施例或示例。 而且,描述的具体特征、 结构、 材料或者特 点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下, 本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特 征进行结合和组合。
以上所述的具体实施方式,对本发明实施例的目的、 技术方案和有益效果进行了进一 步详细说明,所应理解的是,以上所述仅为本发明实施例的具体实施方式而已,并不用于 限定本发明实施例的保护范围,凡在本发明实施例的技术方案的基础之上,所做的任何修 改、 等同替换、 改进等,均应包括在本发明实施例的保护范围之内。
Claims
1.一种线性增强图像对比度的方法,其特征在于,包括:
获取待处理图像的灰度值,以及每个灰度值出现的频率;
根据所述每个灰度值出现的频率确定待线性变换的 m段待变换灰度值区间,所述 m为 正整数;
根据确定的每一段待变换灰度值区间各自的最小灰度值和最大灰度值,以及所述每一 段待变换灰度值区间各自线性变换后的最小灰度值和最大灰度值确定所述每一段待变换灰 度值区间各自对应的线性变换函数;
将所述确定的每一段待变换灰度值区间的灰度值通过各自对应的线性变换函数进行线 性变换,得到线性增强后的图像。
2.根据权利要求 1 所述的方法,其特征在于,所述根据所述每个灰度值出现的频率确 定待线性变换的 m段待变换灰度值区间,包括:
在所述待处理图像的灰度值数轴上划分灰度值区间;
从划分的灰度值区间中确定目标灰度值区间为待变换灰度值区间;其中,所述目标灰 度值区间的灰度值出现频率的总和大于第一阈值,所述第一阈值为与所述目标灰度值区间 对应的阈值。
3.根据权利要求 2所述的方法,其特征在于,所述在所述待处理图像的灰度值数轴上 划分灰度值区间,包括:
将所述待处理图像的灰度值数轴划分为 a个灰度值区间;
4.根据权利要求 2所述的方法,其特征在于,所述在所述待处理图像的灰度值数轴上 划分灰度值区间之后,所述从划分的灰度值区间中确定目标灰度值区间为待变换灰度值区 间之前,还包括:
根据公 SH = z X 2确定划分的灰度值区间对应的第一阈值,其中,所述 q为所述待处 q
5.根据权利要求 4所述的方法,其特征在于,所述 Z=1 ^。
6.根据权利要求 1 所述的方法,其特征在于,所述根据确定的每一段待变换灰度值区 间各自的最小灰度值和最大灰度值,以及所述每一段待变换灰度值区间各自线性变换后的 最小灰度值和最大灰度值确定所述每一段待变换灰度值区间各自对应的线性变换函数,包 括:
根据公式 k =
计算所述确定的每一段灰度值区间对应的线性变换函数的斜率 k , 其中,所述 ^为所述确定的每一段灰度值区间线性变换后的最大灰度值,所述 为所述确 定的每一段灰度值区间线性变换后的最小灰度值,所述 M2为所述确定的每一段灰度值区间 的最大灰度值,所述 为所述确定的每一段灰度值区间 6最小灰度值;
根据公式 ; 0 = k x f + 6确定所述确定的每一段灰度值区间对应的线性变换函数,其 中,所述 f为所述确定的每一段灰度值区间的灰度值。
WO 2020/173141 _ 1 A_ PCT/CN2019/118448
7.根据权利要求 1 所述的方法,其特征在于,所述根据确定的每一段待变换灰度值区 间各自的最小灰度值和最大灰度值,以及所述每一段待变换灰度值区间各自线性变换后的 最小灰度值和最大灰度值确定所述每一段待变换灰度值区间各自对应的线性变换函数,包 括:
M2 -M1
其中,所述 为所述确定的每一段灰度值区间线性变换后的最大灰度值,所述 4为所述确 定的每一段灰度值区间线性变换后的最小灰度值,所述 M2为所述确定的每一段灰度值区间 的最大灰度值,所述 Mi为所述确定的每一段灰度值区间& 5最小灰度值;
根据公式 b = A2 - K X M2计算所述确定的每 _段灰度值区间对应的线性变换函数的 截距 b ;
根据公式 ; 0 = k X f + 6确定所述确定的每一段灰度值区间对应的线性变换函数,其 中,所述 f为所述确定的每一段灰度值区间的灰度值。
8.根据权利要求 6或 7所述的方法,其特征在于,所述确定的每一段灰度值区间线性 变换后的最小灰度值为 0 ,所述确定的每一段灰度值区间线性变换后的最大灰度值为 255。
9.根据权利要求 1-8任一项所述的方法,其特征在于,所述将所述确定的每一段待变换 灰度值区间的灰度值通过各自对应的线性变换函数进行线性变换,得到线性增强后的图像 之后,还包括:
判断是否存在一个或多个灰度值区间的灰度值出现频率总和大于所述一个或多个灰度 值区间对应的第一阈值;
若存在,根据所述一个或多个灰度值区间各自的最小灰度值和最大灰度值,以及所述 一个或多个灰度值区间各自线性变换后的最小灰度值和最大灰度值确定所述一个或多个灰 度值区间各自对应的线性变换函数;
将所述一个或多个灰度值区间的灰度值通过各自对应的线性变换函数进行线性变换, 得到线性增强后的图像。
10 .一种线性增强图像对比度的装置,其特征在于,包括:
获取单元,用于获取待处理图像的灰度值,以及每个灰度值出现的频率;
第一确定单元,用于根据所述每个灰度值出现的频率确定待线性变换的 m段待变换灰 度值区间,所述 m为正整数;
第二确定单元,用于根据确定的每一段待变换灰度值区间各自的最小灰度值和最大灰 度值,以及所述每一段待变换灰度值区间各自线性变换后的最小灰度值和最大灰度值确定 所述每一段待变换灰度值区间各自对应的线性变换函数;
线性变换单元,用于将所述确定的每一段待变换灰度值区间的灰度值通过各自对应的 线性变换函数进行线性变换,得到线性增强后的图像。
11.根据权利要求 10所述的装置,其特征在于,所述第一确定单元包括:
区间划分单元,用于在所述待处理图像的灰度值数轴上划分灰度值区间;
区间确定单元,用于从划分的灰度值区间中确定目标灰度值区间为待变换灰度值区间; 其中,所述目标灰度值区间的灰度值出现频率的总和大于第一阈值,所述第一阈值为与所 述目标灰度值区间对应的阈值。
12.根据权利要求 11所述的装置,其特征在于,所述区间划分单元具体用于: 将所述待处理图像的灰度值数轴划分为 a个灰度值区间;
13.根据权利要求 11所述的装置,其特征在于,所述装置还包括阈值确定单元,用于在 所述区间划分单元在所述待处理图像的灰度值数轴上划分灰度值区间之后,所述区间确定 单元从划分的灰度值区间中确定目标灰度值区间为待变换灰度值区间之前,根据公式
H = Z X E确定划分的灰度值区间对应的第一阈值,其中,所述 q为所述待处理图像的灰度 q
值区间的区间长度,所述 P为所述灰度值区间的区间长度, 1。
14.根据权利要求 13所述的装置,其特征在于,所述 Z=1 -^0
15.根据权利要求 10所述的装置,其特征在于,所述第二确定单元具体用于: 根据公式 k = 计算所述确定的每一段灰度值区间对应的线性变换函数的斜率 k ,
M2-M1
其中,所述 4为所述确定的每一段灰度值区间线性变换后的最大灰度值,所述 为所述确 定的每一段灰度值区间线性变换后的最小灰度值,所述 M2为所述确定的每一段灰度值区间 的最大灰度值,所述 Mi为所述确定的每一段灰度值区间 6最小灰度值;
根据公式 b = A1 - K X Mi计算所述确定的每 _段灰度值区间对应的线性变换函数的截 距 b ;
根据公式 ; 0 = k x f + 6确定所述确定的每一段灰度值区间对应的线性变换函数,其 中,所述 f为所述确定的每一段灰度值区间的灰度值。
M2-M1
其中,所述 4为所述确定的每一段灰度值区间线性变换后的最大灰度值,所述 为所述确 定的每一段灰度值区间线性变换后的最小灰度值,所述 M2为所述确定的每一段灰度值区间 的最大灰度值,所述 Mi为所述确定的每一段灰度值区间 6最小灰度值;
根据公式 b = A2 - K X M2计算所述确定的每 _段灰度值区间对应的线性变换函数的 截距 b ;
根据公式 am = k X f + 6确定所述确定的每一段灰度值区间对应的线性变换函数,其 中,所述 f为所述确定的每一段灰度值区间的灰度值。
17.根据权利要求 15或 16所述的装置,其特征在于,所述确定的每一段灰度值区间线 性变换后的最小灰度值为 0,所述确定的每一段灰度值区间线性变换后的最大灰度值为 255。
18.根据权利要求 10-17任一项所述的装置,其特征在于,所述装置还包括: 判断单元,用于在所述线性变换单元将所述确定的每一段待变换灰度值区间的灰度值 通过各自对应的线性变换函数进行线性变换,得到线性增强后的图像之后,判断是否存在 一个或多个灰度值区间的灰度值出现频率总和大于所述一个或多个灰度值区间对应的第一 阈值 J
b存在,则触发所述第一确定单元根据所述一个或多个灰度值区间各自的最小灰度值 和最大灰度值,以及所述一个或多个灰度值区间各自线性变换后的最小灰度值和最大灰度 值确定所述一个或多个灰度值区间各自对应的线性变换函数;
触发所述线性变换单元将所述一个或多个灰度值区间的灰度值通过各自对应的线性变 换函数进行线性变换,得到线性增强后的图像。
19.一种网络设备,其特征在于,包括处理器和存储器,所述处理器和所述存储器相互
连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理 器被配置用于调用所述程序指令,执行如权利要求 1-9任一项所述的方法。
20.—种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程 序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行如 权利要求 1-9任一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910142730.8 | 2019-02-26 | ||
| CN201910142730.8A CN109961409B (zh) | 2019-02-26 | 2019-02-26 | 一种线性增强图像对比度的方法及装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020173141A1 true WO2020173141A1 (zh) | 2020-09-03 |
Family
ID=67023820
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/118448 Ceased WO2020173141A1 (zh) | 2019-02-26 | 2019-11-14 | 一种线性增强图像对比度的方法及装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109961409B (zh) |
| WO (1) | WO2020173141A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117115277A (zh) * | 2023-08-01 | 2023-11-24 | 武汉精立电子技术有限公司 | 一种显示装置的色偏增强方法及装置 |
| CN117635718A (zh) * | 2024-01-24 | 2024-03-01 | 泰安万川电器设备有限公司 | 一种基于图像增强的弱光环境下矿车定位方法及系统 |
Families Citing this family (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109961409B (zh) * | 2019-02-26 | 2024-02-27 | 平安科技(深圳)有限公司 | 一种线性增强图像对比度的方法及装置 |
| CN112312001B (zh) * | 2019-07-30 | 2022-08-23 | 阿波罗智能技术(北京)有限公司 | 一种图像检测的方法、装置、设备和计算机存储介质 |
| CN112418187A (zh) * | 2020-12-15 | 2021-02-26 | 潍柴动力股份有限公司 | 车道线识别方法及装置、存储介质、电子设备 |
| CN114792328B (zh) * | 2021-01-26 | 2026-01-30 | 四川华能宝兴河水电有限责任公司 | 一种红外热成像图像处理和分析的方法 |
| CN112880837B (zh) * | 2021-01-26 | 2022-05-13 | 四川华能宝兴河水电有限责任公司 | 一种设备故障分析方法 |
| CN114511471B (zh) * | 2022-04-18 | 2022-07-01 | 广州骏天科技有限公司 | 基于灰度共生矩阵的图像优化方法及系统 |
| CN114581345B (zh) * | 2022-05-07 | 2022-07-05 | 广州骏天科技有限公司 | 一种基于自适应线性灰度化的图像增强方法及系统 |
| CN118691528A (zh) * | 2023-03-24 | 2024-09-24 | 浙江宇视科技有限公司 | 图像处理方法、装置、电子设备和存储介质 |
| CN116703888B (zh) * | 2023-07-28 | 2023-10-20 | 菏泽城建新型工程材料有限公司 | 一种钻孔灌注桩施工辅助异常检测方法及其系统 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101706953A (zh) * | 2009-11-13 | 2010-05-12 | 北京中星微电子有限公司 | 基于直方图均衡的图像增强方法和装置 |
| CN103530847A (zh) * | 2013-09-24 | 2014-01-22 | 电子科技大学 | 一种红外图像增强方法 |
| CN103810681A (zh) * | 2014-03-12 | 2014-05-21 | 中国科学院上海高等研究院 | 一种低功耗对比度增强方法 |
| CN106342331B (zh) * | 2010-09-03 | 2014-06-11 | 中国航空工业集团公司洛阳电光设备研究所 | 一种自适应分段线性拉伸的直方图均衡化方法 |
| CN106570831A (zh) * | 2016-10-09 | 2017-04-19 | 中国航空工业集团公司洛阳电光设备研究所 | 一种灰度图像对比度均衡增强的方法 |
| CN109961409A (zh) * | 2019-02-26 | 2019-07-02 | 平安科技(深圳)有限公司 | 一种线性增强图像对比度的方法及装置 |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6236751B1 (en) * | 1998-09-23 | 2001-05-22 | Xerox Corporation | Automatic method for determining piecewise linear transformation from an image histogram |
| JP2010113052A (ja) * | 2008-11-05 | 2010-05-20 | Renesas Technology Corp | 表示駆動装置 |
| WO2014064916A1 (ja) * | 2012-10-25 | 2014-05-01 | 三菱電機株式会社 | 画像処理装置及び画像処理方法 |
| CN105654438A (zh) * | 2015-12-27 | 2016-06-08 | 西南技术物理研究所 | 基于局部直方图均衡的灰度图像拟合增强方法 |
| CN108805829B (zh) * | 2018-05-25 | 2021-01-01 | 浙江科澜信息技术有限公司 | 影像数据处理方法、装置、设备及计算机可读存储介质 |
| CN109035249B (zh) * | 2018-09-10 | 2021-08-24 | 东北大学 | 一种基于图像处理的管道故障并行全局阈值检测方法 |
-
2019
- 2019-02-26 CN CN201910142730.8A patent/CN109961409B/zh active Active
- 2019-11-14 WO PCT/CN2019/118448 patent/WO2020173141A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101706953A (zh) * | 2009-11-13 | 2010-05-12 | 北京中星微电子有限公司 | 基于直方图均衡的图像增强方法和装置 |
| CN106342331B (zh) * | 2010-09-03 | 2014-06-11 | 中国航空工业集团公司洛阳电光设备研究所 | 一种自适应分段线性拉伸的直方图均衡化方法 |
| CN103530847A (zh) * | 2013-09-24 | 2014-01-22 | 电子科技大学 | 一种红外图像增强方法 |
| CN103810681A (zh) * | 2014-03-12 | 2014-05-21 | 中国科学院上海高等研究院 | 一种低功耗对比度增强方法 |
| CN106570831A (zh) * | 2016-10-09 | 2017-04-19 | 中国航空工业集团公司洛阳电光设备研究所 | 一种灰度图像对比度均衡增强的方法 |
| CN109961409A (zh) * | 2019-02-26 | 2019-07-02 | 平安科技(深圳)有限公司 | 一种线性增强图像对比度的方法及装置 |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117115277A (zh) * | 2023-08-01 | 2023-11-24 | 武汉精立电子技术有限公司 | 一种显示装置的色偏增强方法及装置 |
| CN117635718A (zh) * | 2024-01-24 | 2024-03-01 | 泰安万川电器设备有限公司 | 一种基于图像增强的弱光环境下矿车定位方法及系统 |
| CN117635718B (zh) * | 2024-01-24 | 2024-04-26 | 泰安万川电器设备有限公司 | 一种基于图像增强的弱光环境下矿车定位方法及系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109961409A (zh) | 2019-07-02 |
| CN109961409B (zh) | 2024-02-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020173141A1 (zh) | 一种线性增强图像对比度的方法及装置 | |
| KR100756318B1 (ko) | 이득 조절 가능한 절단 빈도함수 평활화를 이용한 영상처리 방법 및 시스템 | |
| CN108040358B (zh) | 一种无线网络的连接方法、终端设备及存储介质 | |
| CN112911166B (zh) | 一种调整图像亮度的方法、装置、芯片、介质及摄像设备 | |
| CN110223244B (zh) | 一种图像处理的方法、装置、电子设备和存储介质 | |
| CN112565621A (zh) | 内窥镜光源亮度和曝光调节方法、装置和可读存储介质 | |
| WO2022135581A1 (zh) | 图像检测方法、装置、系统、设备和存储介质 | |
| WO2017113917A1 (zh) | 成像方法、成像装置和终端 | |
| CN115423720B (zh) | 图像降噪方法、图像降噪装置、存储介质与电子设备 | |
| CN110197470A (zh) | 图像处理方法、装置、电子设备及计算机可读存储介质 | |
| WO2020108506A1 (zh) | 干扰源识别方法、相关设备及计算机存储介质 | |
| CN110097520B (zh) | 图像处理方法和装置 | |
| JP2025510585A (ja) | 露光撮像方法、装置、機器、記憶媒体及びプログラム製品 | |
| CN115187492B (zh) | 亮度调整方法、装置、计算机设备及存储介质 | |
| CN112367476A (zh) | Tof相机的曝光时间确定方法、装置及终端设备 | |
| WO2017173817A1 (zh) | 视频显示质量的计算方法及设备 | |
| CN107945137A (zh) | 人脸检测方法、电子设备及存储介质 | |
| CN111726530A (zh) | 一种多路视频流获取方法、装置及设备 | |
| CN115660997B (zh) | 一种图像数据处理方法、装置及电子设备 | |
| WO2021169973A1 (zh) | 无线数据传输方法及装置、存储介质、sta | |
| CN115426285B (zh) | 一种网络资源分配方法、装置、终端设备以及存储介质 | |
| CN114586057A (zh) | 基于面部的色调曲线调整 | |
| CN109308690B (zh) | 一种图像亮度均衡方法及终端 | |
| CN117522781A (zh) | 一种图像质量评估方法、装置、可读存储介质及终端设备 | |
| CN117292158A (zh) | 一种图像处理方法、装置、电子设备及存储介质 |
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: 19916897 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19916897 Country of ref document: EP Kind code of ref document: A1 |