Image contrast enhancement method and device, electronic device and storage medium

By performing energy thresholding and energy equalization on X-ray images, the problem of bright and dark stripes in X-ray images was solved, improving image quality and the visibility of object distribution.

CN115994866BActive Publication Date: 2026-01-06ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211323980.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-27
Publication Date
2026-01-06
Estimated Expiration
2042-10-27

AI Technical Summary

Technical Problem

Existing image contrast enhancement methods, when processing X-ray images, result in noticeable non-uniform light and dark stripes in low grayscale areas, affecting image quality and the accurate representation of the stacking distribution of objects.

Method used

By acquiring the energy image to be processed, the region map is divided based on the first energy threshold, and contrast enhancement and energy equalization are performed on different energy region maps respectively, including histogram equalization and detection unit imaging size information division, to reduce bright and dark stripes and improve image quality.

Benefits of technology

It effectively reduces non-uniform light and dark stripes in the image, improves the quality of the image after contrast enhancement, and makes the distribution of objects more clearly visible.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115994866B_ABST
    Figure CN115994866B_ABST
Patent Text Reader

Abstract

The application relates to an image contrast enhancement method and device, an electronic device and a storage medium, wherein the image contrast enhancement method comprises the following steps: acquiring an energy image to be processed; processing the energy image to be processed based on a first energy threshold value to obtain a first energy region map; performing contrast enhancement on the first energy region map based on at least two energy values of the first energy region map to obtain an enhanced first energy region map; and obtaining a contrast-enhanced image of the energy image to be processed based on the enhanced first energy region map. Through the application, the problem of low image quality after image contrast enhancement is solved, and the quality of the image after contrast enhancement is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing, and in particular to an image contrast enhancement method, apparatus, electronic device, and storage medium. Background Technology

[0002] Security checks are an indispensable part of people's daily lives. In densely populated areas such as urban rail transit, airports, logistics and express delivery centers, and large event venues, security checks are an effective means of preventing emergencies.

[0003] Existing security screening machines typically use X-rays to pass through objects and create an image on a detection plate, thus obtaining an X-ray image of the object. Since items on the security screening machine are not uniformly distributed, there will be areas of stacked items. These stacked areas often appear as low grayscale in the X-ray image. To clearly see the stacked items, the X-ray image needs contrast enhancement. However, conventional image contrast enhancement methods amplify the non-uniformity of the low grayscale areas. This non-uniformity is caused by inconsistencies in the physical system characteristics of the X-ray security screening machine, resulting in alternating bright and dark stripes in the X-ray image. Therefore, conventional image contrast enhancement methods will produce obvious non-uniform bright and dark stripes in the low grayscale areas of the X-ray image, making it impossible to accurately represent the distribution of stacked items and affecting image quality.

[0004] There is currently no effective solution to the problem of low image quality after image contrast enhancement in related technologies. Summary of the Invention

[0005] This embodiment provides an image contrast enhancement method, apparatus, electronic device, and storage medium to solve the problem of low image quality after image contrast enhancement in related technologies.

[0006] Firstly, this embodiment provides an image contrast enhancement method, including:

[0007] Acquire the energy image to be processed;

[0008] The energy image to be processed is processed based on a first energy threshold to obtain a first energy region map. Any energy value in the first energy region map is less than the first energy threshold, and the first energy threshold is less than the maximum energy value in the energy image to be processed.

[0009] Based on at least two energy values ​​of the first energy region map, the contrast of the first energy region map is enhanced to obtain an enhanced first energy region map;

[0010] Based on the enhanced first energy region map, a contrast-enhanced image of the energy image to be processed is obtained.

[0011] In some embodiments, the step of enhancing the contrast of the first energy region map based on at least two energy values ​​to obtain an enhanced first energy region map includes:

[0012] The first energy region map is processed based on the second energy threshold to obtain a first energy region sub-map and a second energy region sub-map. The second energy threshold is less than the first energy threshold. Any energy value of the first energy region sub-map is less than the second energy threshold. Any energy value of the second energy region sub-map is greater than or equal to the second energy threshold.

[0013] Energy equalization is performed on the first energy region sub-map and the second energy region sub-map respectively to obtain the enhanced first energy region map.

[0014] In some embodiments, energy equalization is performed on the first energy region submap and the second energy region submap respectively to obtain the enhanced first energy region map, including:

[0015] Histogram equalization is performed on multiple energy values ​​of the first energy region sub-image to obtain an equalized first energy region sub-image. Any energy value of the equalized first energy region sub-image is greater than or equal to the minimum energy value of the energy image to be processed and less than the second energy threshold.

[0016] Histogram equalization is performed on multiple energy values ​​of the second energy region sub-image to obtain an equalized second energy region sub-image. Any energy value of the equalized second energy region sub-image is greater than or equal to the second energy threshold and less than the maximum energy value of the energy image to be processed.

[0017] The enhanced first energy region map is obtained based on the equalized first energy region sub-map and the equalized second energy region sub-map.

[0018] In some embodiments, processing the first energy region map based on a second energy threshold to obtain a first energy region sub-map and a second energy region sub-map includes:

[0019] Based on the imaging size information of the detection unit, the first energy region map is divided into multiple sub-region maps, and the detection unit is used to generate the energy image to be processed based on the rays passing through the target object;

[0020] Based on the second energy threshold, the multiple sub-region maps are divided into a first energy region sub-map and a second energy region sub-map.

[0021] In some embodiments, the energy image to be processed is processed based on a first energy threshold to obtain a first energy region map, and the process further includes:

[0022] The energy image to be processed is divided into regions based on the first energy threshold to obtain the first energy region map and the second energy region map, wherein any energy value in the second energy region map is greater than or equal to the first energy threshold.

[0023] The second energy region map is contrast-enhanced to obtain the enhanced second energy region map.

[0024] The process of obtaining a contrast-enhanced image of the energy image to be processed based on the enhanced first energy region map includes:

[0025] Based on the enhanced first energy region map and the enhanced second energy region map, a contrast-enhanced image of the energy image to be processed is obtained.

[0026] In some embodiments, after obtaining the contrast-enhanced image of the energy image to be processed based on the enhanced first energy region map, the method further includes:

[0027] The contrast-enhanced image of the energy image to be processed is rendered to obtain the rendered image of the energy image to be processed.

[0028] In some embodiments, processing the energy image to be processed based on a first energy threshold to obtain a first energy region map includes:

[0029] The energy image to be processed is subjected to non-uniform correction to obtain the corrected energy image;

[0030] The corrected energy map is divided into regions based on the first energy threshold to obtain the first energy region map.

[0031] Secondly, this embodiment provides an image contrast enhancement device, comprising:

[0032] The acquisition module is used to acquire the energy image to be processed;

[0033] The processing module is used to process the energy image to be processed based on a first energy threshold to obtain a first energy region map, wherein any energy value in the first energy region map is lower than the first energy threshold, and the first energy threshold is less than the maximum energy value in the energy image to be processed.

[0034] A contrast enhancement module is used to enhance the contrast of the first energy region map based on at least two energy values ​​of the first energy region map to obtain an enhanced first energy region map.

[0035] The contrast enhancement image acquisition module is used to obtain a contrast enhancement image of the energy image to be processed based on the enhanced first energy region map.

[0036] Thirdly, this embodiment provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the image contrast enhancement method described in the first aspect above.

[0037] Fourthly, this embodiment provides a storage medium storing a computer program that, when executed by a processor, implements the image contrast enhancement method described in the first aspect above.

[0038] Compared with related technologies, the image contrast enhancement method provided in this embodiment obtains an energy image to be processed and processes it based on a first energy threshold to obtain a first energy region map, wherein any energy value in the first energy region map is less than the first energy threshold. Further, the first energy region map is contrast-enhanced based on at least two energy values ​​in the first energy region map to obtain an enhanced first energy region map. This allows the energy value distribution of the first energy region map to be determined through at least two energy values, and the contrast enhancement of the first energy region map can be adaptively performed based on the energy value distribution, effectively reducing the bright and dark stripes appearing in the first energy region map. Furthermore, a contrast-enhanced image of the energy image to be processed is obtained based on the enhanced first energy region map, effectively reducing the non-uniform bright and dark stripes appearing in the overall image, thereby improving the quality of the contrast-enhanced image.

[0039] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0040] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0041] Figure 1 This is a hardware structure block diagram of a terminal for an image contrast enhancement method provided in an embodiment of this application;

[0042] Figure 2 This is a flowchart of an image contrast enhancement method provided in an embodiment of this application;

[0043] Figure 3 This is a flowchart of another image contrast enhancement method provided in the embodiments of this application;

[0044] Figure 4 This is a schematic diagram of an X-ray with strong penetrating power provided by an embodiment of this application;

[0045] Figure 5 This is a schematic diagram of an X-ray with weak penetrating power provided by an embodiment of this application;

[0046] Figure 6 This is a structural block diagram of an image contrast enhancement device provided in an embodiment of this application. Detailed Implementation

[0047] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0048] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning as understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these,” used in this application, do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to such processes, methods, products, or devices. The terms “connected,” “linked,” and “coupled,” used in this application, are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. The term “multiple” used in this application refers to two or more. The "and / or" operator describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: A alone, A and B simultaneously, and B alone. Typically, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," and "third," etc., used in this application are merely for distinguishing similar objects and do not represent a specific ordering of the objects.

[0049] The method embodiments provided in this example can be executed on a terminal, server, or similar computing device. For example, it can run on a terminal. Figure 1 This is a hardware structure block diagram of a terminal for an image contrast enhancement method provided in an embodiment of this application. For example... Figure 1 As shown, a terminal may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 and a memory 104 for storing data are also included. The processor 102 may be, but is not limited to, a microprocessor (MCU) or a field-programmable gate array (FPGA). The terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.

[0050] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the image contrast enhancement method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some embodiments, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Embodiments of the above-described network include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0051] The transmission device 106 is used to receive or send data via a network. This network includes a wireless network provided by the terminal's communication provider. In one embodiment, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another embodiment, the transmission device 106 can be a Radio Frequency (RF) module for wireless communication with the Internet.

[0052] Security checks are becoming an indispensable part of every city. In densely populated areas such as urban rail transit, airports, logistics and express delivery centers, and large event venues, security is always a core issue, and security checks are an effective means of preventing emergencies. In the security industry, X-rays are widely used to inspect bags and luggage. X-ray-based security inspection machines are widely used in airports, train stations, subway stations, bus stations, government buildings, embassies, conference centers, exhibition centers, hotels, shopping malls, large events, post offices, schools, logistics industries, and industrial inspections.

[0053] Existing security inspection machines typically use X-rays to pass through objects and create an image on a detection plate, thus obtaining an X-ray image of the object. Low grayscale areas in the X-ray image often indicate areas of heavy stacking of items, requiring contrast enhancement to clearly see the stacked items. However, contrast enhancement of the X-ray image results in noticeable non-uniform bright and dark stripes. These non-uniform stripes are due to the non-strictly linear relationship between the response of the photosensitive element in the detection plate to light intensity and voltage value, especially exhibiting a significant non-linear relationship at both ends. Directly applying conventional image contrast enhancement to low grayscale areas amplifies this non-uniformity, resulting in obvious non-uniform bright and dark stripes. These non-uniform bright and dark stripes not only affect image quality and viewing experience but also fail to accurately represent the distribution of stacked items.

[0054] Therefore, how to improve the image quality after image contrast enhancement is a problem that needs to be solved.

[0055] This application provides an image contrast enhancement method. Figure 2 This is a flowchart of an image contrast enhancement method provided in an embodiment of this application. The method execution subject in this embodiment can be an electronic device. Specifically, the electronic device can be a terminal device, a server, a driver, or a similar computing device, and is not limited thereto. Figure 2 As shown, the process includes the following steps:

[0056] Step S201: Obtain the energy image to be processed.

[0057] The energy image to be processed is generated by the detection unit receiving rays that pass through the target object.

[0058] For example, when a target object undergoes security inspection in a security inspection system, the security inspection system emits X-rays. After the X-rays pass through the target object, they are received by the detection unit in the security inspection system. Furthermore, the detection unit converts the energy of the received X-rays into an energy map, thereby obtaining the energy map to be processed.

[0059] It should be noted that the energy map to be processed in this embodiment is only illustrated by the example of X-rays transmitted through the target object received by the detection unit in the security inspection system. In practical applications, the energy map to be processed can also be generated by the energy of X-rays transmitted through the target object received by the detection unit in the CT scanning device, or by the energy of X-rays transmitted through the target object received by the detection unit in other devices. No limitation is made here.

[0060] It should be noted that the target object can be items such as bags and luggage in a security check scenario, or body parts of a patient in a medical check scenario; there are no restrictions.

[0061] Step S202: Process the energy image to be processed based on the first energy threshold to obtain the first energy region map.

[0062] Wherein, any energy value in the first energy region map is less than the first energy threshold, and the first energy threshold is less than the maximum energy value in the energy image to be processed.

[0063] For example, during a security check, the area where items are stacked is identified as a low-grayscale area. The range of energy values ​​received by the detection unit in the low-grayscale area is determined based on experimental data, and then the maximum energy value of the low-grayscale area is obtained. The maximum energy value of the low-grayscale area is determined as a first energy threshold, which is less than the maximum energy value in the energy image to be processed.

[0064] Furthermore, the region in the energy image to be processed where the energy value is less than the first energy threshold is defined as the first energy region, and the corresponding image is the first energy region map, so that any energy value in the first energy region map is less than the first energy threshold.

[0065] Specifically, if the minimum energy value of the energy image to be processed is E min The maximum energy value is E max The first energy threshold is E lowgray And, E lowgray <E max Then, according to the first energy threshold E lowgray The energy image to be processed is divided into regions to obtain the first energy region map, namely the low grayscale region map. The energy value range of the low grayscale region map is [E]. min E lowgray ).

[0066] It should be noted that there may be multiple discrete regions in the energy image to be processed whose energy values ​​are less than the first energy threshold, which may result in multiple discrete first energy region maps. In the embodiments of this application, the first energy region map can be any one of the multiple discrete first energy region maps, or any combination of the multiple discrete first energy region maps, and there is no limitation here.

[0067] Step S203: Based on at least two energy values ​​of the first energy region map, perform contrast enhancement on the first energy region map to obtain an enhanced first energy region map.

[0068] For example, the energy value distribution in the first energy region map is determined based on at least two energy values ​​in the first energy region map. Further, the first energy region map is contrast-enhanced based on the energy value distribution in the first energy region map to obtain an enhanced first energy region map, thereby effectively reducing the non-uniformity of low grayscale regions in the energy image to be processed.

[0069] It should be noted that if the first energy region map in the embodiments of this application is any one of multiple discrete first energy region maps, or any combination of multiple discrete first energy region maps, then the same method as the first energy region map in the embodiments of this application is used to perform contrast enhancement on the remaining first energy region maps to obtain the corresponding enhanced first energy region map.

[0070] Step S204: Based on the enhanced first energy region map, a contrast-enhanced image of the energy image to be processed is obtained.

[0071] For example, a contrast-enhanced image corresponding to the entire energy image to be processed is obtained based on the enhanced first energy region map.

[0072] If there are multiple first energy region maps, then the contrast enhancement image corresponding to the entire energy image to be processed is obtained based on the enhanced first energy region maps corresponding to all the first energy region maps.

[0073] In the above implementation process, by acquiring the energy image to be processed and processing it according to a first energy threshold, an image of the low grayscale region in the energy image to be processed is obtained. Further, based on at least two energy values ​​of the first energy region image, the energy value distribution of the first energy region image is determined. Then, based on the energy value distribution of the first energy region image, the contrast of the first energy region sub-image is adaptively enhanced to obtain the enhanced first energy region image, thereby effectively reducing the non-uniformity of the low grayscale region in the energy image to be processed. Further, based on the enhanced first energy region image, a contrast-enhanced image of the energy image to be processed is obtained, thereby effectively reducing the non-uniform bright and dark stripes appearing in the overall image, and thus improving the quality of the contrast-enhanced image.

[0074] In some embodiments, enhancing the contrast of the first energy region map based on at least two energy values ​​to obtain an enhanced first energy region map may include the following steps:

[0075] Step 1: Process the first energy region map based on the second energy threshold to obtain the first energy region sub-map and the second energy region sub-map.

[0076] Wherein, the second energy threshold is less than the first energy threshold, any energy value of the first energy region subgraph is less than the second energy threshold, and any energy value of the second energy region subgraph is greater than or equal to the second energy threshold.

[0077] For example, in the low grayscale area of ​​items being inspected, there may be items that are almost impermeable to radiation, such as iron, copper, or other metal items. The area in the low grayscale area where radiation is almost impermeable is defined as a dark area. The area outside the dark area is defined as a regular low grayscale area. That is, the image corresponding to the regular low grayscale area represents the energy region map generated by radiation received by the detection unit penetrating the stacked items. Based on experimental data, the range of energy values ​​received by the detection unit that penetrate objects with weak radiation penetration, such as iron and copper, is determined. This energy value range is defined as the energy value range of the dark area. The maximum energy value of the dark area is then obtained and defined as the second energy threshold, which is less than the first energy threshold.

[0078] In the dark areas of a low grayscale region, the detection unit can hardly receive rays, but in other low grayscale regions, the detection unit can receive rays. Therefore, the energy values ​​corresponding to dark areas and other low grayscale regions differ significantly. If contrast enhancement is applied to the entire low grayscale region, not only will the objects in the dark areas not be clearly visible, but the non-uniformity of the dark areas will also be increased, thus affecting the contrast enhancement effect of the overall low grayscale image. Therefore, it is necessary to further separate the dark areas in the low grayscale region from other regions.

[0079] Furthermore, the first energy region map is divided into regions according to the second energy threshold to obtain a first energy region sub-map and a second energy region sub-map. Any energy value of the first energy region sub-map is less than the second energy threshold, that is, the first energy region sub-map is the image of the dark region in the first energy region map. Any energy value of the second energy region sub-map is greater than or equal to the second energy threshold, that is, the second energy region sub-map is the image of the regular low grayscale region in the first energy region map.

[0080] Specifically, if the second energy threshold is E dark Then, based on the second energy threshold, the first energy region map is divided into regions, resulting in a first energy region sub-map and a second energy region sub-map. The energy value range of the first energy region sub-map is [E...]. min E dark The energy value range of the second energy region subgraph is [E]. dark E lowgray ).

[0081] Step 2: Perform energy equalization on the first energy region subgraph and the second energy region subgraph respectively to obtain the enhanced first energy region subgraph.

[0082] Furthermore, energy equalization is performed on the first energy region sub-image and the second energy region sub-image respectively, and contrast enhancement is adaptively applied to the dark areas in the low grayscale region and the corresponding images of the normal low grayscale region, thereby obtaining the enhanced first energy region image.

[0083] In the above implementation process, the image of the low grayscale region is divided into regions according to the second energy threshold, thereby obtaining a first energy region sub-image that rays cannot penetrate and a second energy region sub-image that rays can penetrate. Furthermore, energy equalization is performed on the first energy region sub-image and the second energy region sub-image respectively, and the contrast of the images corresponding to the dark areas in the low grayscale region and the normal low grayscale region is adaptively enhanced to obtain the enhanced first energy region image. This effectively avoids the contrast enhancement of the dark area image from lowering the overall contrast enhancement effect of the low grayscale region image, thereby improving the contrast enhancement effect of the low grayscale region image.

[0084] In some embodiments, energy equalization is performed on the first energy region submap and the second energy region submap respectively to obtain an enhanced first energy region map, which may include the following steps:

[0085] Step 1: Perform histogram equalization on multiple energy values ​​of the first energy region sub-image to obtain the equalized first energy region sub-image. Any energy value of the equalized first energy region sub-image is greater than or equal to the minimum energy value of the energy image to be processed and less than the second energy threshold.

[0086] For example, using the histogram equalization method of energy statistics, the energy values ​​of the first energy region sub-map are set within its own energy value range [E]. min E dark Equalization is performed within the scope of the system.

[0087] Specifically, histogram equalization is performed on multiple energy values ​​of the first energy region sub-image to obtain the equalized first energy region sub-image. Furthermore, any energy value in the equalized first energy region sub-image is greater than or equal to the minimum energy value of the energy image to be processed and less than the second energy threshold; that is, the energy value range of the equalized first energy region sub-image is [E...]. min E dark ).

[0088] Step 2: Perform histogram equalization on multiple energy values ​​of the second energy region sub-image to obtain the equalized second energy region sub-image. Any energy value of the equalized second energy region sub-image is greater than or equal to the second energy threshold and less than the maximum energy value of the energy image to be processed.

[0089] For example, the histogram equalization method of energy statistics is used to adjust the energy values ​​of the second energy region sub-map within the range of [E]. dark E max Equalization within the energy value range, even if the energy value range of the second energy region subgraph is [E] dark E lowgray Equalization to [E] dark E max ).

[0090] Specifically, histogram equalization is performed on multiple energy values ​​of the second energy region subgraph to obtain the equalized second energy region subgraph. Furthermore, the energy value range of the equalized first energy region subgraph is [E...]. dark E max ).

[0091] Step 3: Based on the equalized first energy region subgraph and the equalized second energy region subgraph, obtain the enhanced first energy region subgraph.

[0092] Furthermore, merging the equalized first energy region subgraph and the equalized second energy region subgraph yields the enhanced first energy region subgraph.

[0093] In the above implementation process, the energy value of the first energy region subgraph is within its own energy value range [E]. min E dark Equalization within the first energy region subgraph can effectively reduce the non-uniformity of the first energy region subgraph, and also expand the energy value range of the second energy region subgraph [E]. dark E lowgray Equalization to [E] dark E max This effectively enhances the contrast of the second energy region sub-image. Furthermore, based on the equalized first energy region sub-image and the equalized second energy region sub-image, an enhanced first energy region image is obtained, thereby improving the contrast enhancement effect of the first energy region image.

[0094] In some embodiments, the first energy region map is processed based on a second energy threshold to obtain a first energy region sub-map and a second energy region sub-map, including:

[0095] Step 1: Based on the imaging size information of the detection unit, the first energy region map is divided into multiple sub-region maps. The detection unit is used to generate the energy image to be processed based on the rays passing through the target object.

[0096] For example, the imaging size information may include one or more of the imaging width and imaging length of the detection unit, without limitation.

[0097] Taking the imaging width as an example, in the imaging direction, the first energy region map is divided into multiple sub-region maps according to the imaging width of each detection unit. The detection unit is used to generate the energy image to be processed based on the rays passing through the target object.

[0098] Specifically, the X-ray security inspection system includes multiple detection units, each containing multiple photosensitive elements. Each photosensitive element corresponds to one pixel. The physical characteristics of photosensitive elements within the same detection unit are relatively consistent, while the physical characteristics of photosensitive elements between different detection units differ significantly. This difference in physical characteristics leads to image non-uniformity, resulting in alternating bright and dark stripes. To precisely reduce image non-uniformity, the first energy region map is divided into multiple sub-region maps along the imaging direction based on the imaging width of each detection unit.

[0099] If the detector in the security inspection system includes multiple parallel detection units, and each detection unit consists of four photosensitive elements arranged in parallel, then the imaging width of each detection unit is 4 pixels. If the first energy region map includes 1200 pixels in the imaging direction, then based on the imaging width of 4 pixels per detection unit, the first energy region map can be divided into 300 sub-region maps in the imaging direction.

[0100] Step 2: Divide the multiple sub-region maps into a first energy region sub-map and a second energy region sub-map based on the second energy threshold.

[0101] Furthermore, in the 300 sub-region maps, all sub-region maps with energy values ​​less than the second energy threshold are identified as first energy region sub-maps, and all sub-region maps with energy values ​​greater than or equal to the second energy threshold are identified as second energy region sub-maps.

[0102] In the above implementation process, in the imaging direction, the first energy region map is divided into multiple sub-region maps according to the imaging width of each detection unit, so as to effectively divide the smallest region map with the same energy value. Furthermore, the multiple sub-region maps are grouped according to the second energy threshold, so as to accurately segment the conventional low grayscale region that can be penetrated by rays and the dark region that cannot be penetrated by rays, thereby effectively avoiding the differences in physical characteristics between different detection units and improving the accuracy of region segmentation in low grayscale region images.

[0103] In some embodiments, processing the energy image to be processed based on a first energy threshold to obtain a first energy region map may further include the following steps:

[0104] Step 1: Divide the energy image to be processed into regions based on the first energy threshold to obtain a first energy region map and a second energy region map. Any energy value in the second energy region map is greater than or equal to the first energy threshold.

[0105] Step 2: Enhance the contrast of the second energy region map to obtain the enhanced second energy region map.

[0106] For example, in the energy image to be processed, the region with energy value less than a first energy threshold is defined as the first energy region, and the corresponding image is the first energy region image; the region with energy value greater than or equal to the first energy threshold in the energy image to be processed is defined as the second energy region, and the corresponding image is the second energy region image. That is, the second energy region image is the image corresponding to the non-low grayscale region, and the energy value range of the second energy region image is [E]. lowgray E max ].

[0107] It should be noted that the energy image to be processed may contain multiple discrete regions with energy values ​​greater than or equal to the first energy threshold, which may result in multiple discrete second energy region maps. In this embodiment, the second energy region map can be any one of the multiple discrete second energy region maps, or any combination of multiple discrete second energy region maps; no limitation is imposed here. When the second energy region map in this embodiment is any combination of one or more discrete second energy region maps, the same method as for the second energy region map in this embodiment is applied to the remaining second energy region maps.

[0108] Furthermore, an adaptive histogram equalization method with limited contrast can be used to enhance the contrast of the second energy region map, resulting in an enhanced second energy region map.

[0109] It should be noted that, in this embodiment, the contrast enhancement of the second energy region map is only illustrated by using the adaptive histogram equalization method with limited contrast. In practical applications, one or a combination of linear transformation, gamma transformation, contrast stretching and histogram normalization can also be used, or other contrast enhancement methods can be used to enhance the contrast of the second energy region map. No restrictions are imposed here.

[0110] Furthermore, obtaining a contrast-enhanced image of the energy image to be processed based on the enhanced first energy region map can include: obtaining a contrast-enhanced image of the energy image to be processed based on the enhanced first energy region map and the enhanced second energy region map.

[0111] Specifically, the enhanced first energy region map and the enhanced second energy region map are merged to obtain a contrast-enhanced image of the energy image to be processed.

[0112] It should be noted that if there are multiple first energy region maps and multiple second energy region maps, then all enhanced first energy region maps and all enhanced second energy region maps are merged to obtain a contrast-enhanced image of the energy image to be processed.

[0113] In the above implementation process, the contrast of the second energy region image is enhanced, thereby realizing the contrast enhancement of the non-low grayscale region. Furthermore, the contrast-enhanced low grayscale region image and the contrast-enhanced non-low grayscale region image are merged to obtain the contrast-enhanced image corresponding to the energy image to be processed.

[0114] In some embodiments, after obtaining a contrast-enhanced image of the energy image to be processed based on the enhanced first energy region map, the process may further include: rendering the contrast-enhanced image of the energy image to be processed to obtain a rendered image of the energy image to be processed.

[0115] Since the above contrast enhancement methods are all performed on the energy map, it is also necessary to render the contrast enhancement image of the energy image to be processed, so as to obtain the rendered image of the energy image to be processed, that is, to render it into a pseudo-color image for output.

[0116] As another embodiment, rendering the contrast enhancement image of the energy image to be processed to obtain a rendered image of the energy image to be processed may further include: normalizing the contrast enhancement image of the energy image to be processed to obtain a normalized image, and further rendering the normalized image to obtain a rendered image of the energy image to be processed.

[0117] Specifically, the maximum value E of the contrast-enhanced image of the energy image to be processed. max Since the gray levels are much larger than 8 bits, the contrast enhancement image of the energy image to be processed also needs to be normalized to obtain a normalized image, so that the gray levels of the normalized image are in the range of 0-255.

[0118] Furthermore, the mapping function between the normalized image grayscale and pseudocolor is used to render the final contrast enhancement result into a pseudocolor image for output, thereby obtaining the rendered image of the energy image to be processed. If the energy image to be processed is generated by the detection unit in the security inspection system receiving X-rays passing through the target object, then the rendered image of the energy image to be processed can be a rendered X-ray pseudocolor image.

[0119] In the above implementation process, the contrast enhancement image of the energy image to be processed is rendered to facilitate the output of a color image.

[0120] In some embodiments, processing the energy image to be processed based on a first energy threshold to obtain a first energy region map may include the following steps:

[0121] Step 1: Perform non-uniform correction on the energy image to be processed to obtain the corrected energy image.

[0122] Step 2: Divide the corrected energy map into regions based on the first energy threshold to obtain the first energy region map.

[0123] For example, the detection unit includes multiple photosensitive elements, which can receive rays that penetrate the target object and obtain corresponding voltage values ​​according to the light intensity. Due to the inconsistency of the physical characteristics of each photosensitive element, non-uniformity is introduced. This non-uniformity manifests in the acquired energy image as different output voltage response values ​​for each pixel in the photosensitive element under the same uniform light intensity, i.e., the image to be processed will show bright and dark stripes. In order to reduce the bright and dark stripes formed by the physical characteristics of the detection unit in the energy image to be processed, non-uniformity correction is performed on the energy image to be processed to obtain the corrected energy image.

[0124] Furthermore, the corrected energy map is divided into regions based on the first energy threshold to obtain the first energy region map.

[0125] Specifically, a two-point correction method can be used to correct the non-uniformity of the energy image to be processed, resulting in a corrected energy image. The algorithm principle of the two-point correction method is as follows:

[0126] The relationship between the output signal voltage of the detector unit and the input light intensity can be approximated as a linear relationship:

[0127] y = αx + β (1)

[0128] Where y is the output signal voltage of the pixel of the photosensitive element in the detector unit, x is the input light intensity, α is the photoresponsivity of the pixel of the photosensitive element, and β is the dark output voltage.

[0129] In reality, due to the existence of non-uniformity, there are some differences in the output of each pixel of the photosensitive element:

[0130] y i =α i x+β i (2)

[0131] Among them, y i α is the output signal voltage of the i-th pixel of the photosensitive element in the detector unit. i β is the photoresponsivity of the i-th pixel of the photosensitive element. i Let be the dark output voltage of the i-th pixel.

[0132] According to the above formulas (1) and (2), we can obtain:

[0133]

[0134] Where, k i Let b be the gain factor for the i-th pixel. i Let be the offset of the i-th pixel.

[0135] Specifically, when the X-ray security inspection equipment is unloaded, the voltage response value obtained with the strongest light intensity when the X-ray source is turned on is called the bright meter; the voltage response value obtained with the weakest light intensity when the X-ray source is turned off is called the dark meter. The gain factor k of each pixel can be calculated by using the dark meter obtained when the X-ray acquisition is turned off and the bright meter obtained when the X-ray is turned on under no-load conditions. i and offset b i Assume y min y max Let be the normalized output signal voltages after correction for dark and bright meters, respectively. For each pixel, we have:

[0136] y min =k i y i (x min )+b i (4)

[0137] y max =k i y i (x max )+b i (5)

[0138] Where, x min x represents the weakest light intensity of the radiation source. max This represents the strongest light intensity from the radiation source.

[0139] According to formulas (4) and (5), we can obtain:

[0140]

[0141]

[0142] The two-point non-uniformity correction algorithm ensures that the output voltage of each pixel is the same under the same uniform light intensity.

[0143] Furthermore, the non-uniformity of the energy image to be processed is corrected by the two-point correction method. After obtaining the corrected energy image, the corrected energy image is divided into regions according to the first energy threshold to obtain the first energy region map. Thus, the non-uniformity of the energy image is reduced before the energy image is divided into regions.

[0144] However, since the response of the photosensitive element to light intensity and the voltage value are not strictly linear, especially exhibiting a significant nonlinear relationship at both ends, even after the energy image to be processed is non-uniformly corrected using the two-point correction method, the voltage values ​​output at both ends of the photosensitive element will still be different. Therefore, the energy image to be processed after non-uniform correction will still have a maximum energy value and a minimum energy value.

[0145] It should be noted that in this embodiment, only the two-point correction method is used as an example to illustrate the non-uniformity correction of the energy image to be processed. In practical applications, the neural network method can also be used to correct the non-uniformity of the energy image to be processed, and there is no limitation here.

[0146] In the above implementation process, by performing non-uniformity correction on the energy image to be processed, the non-uniformity of the energy image is effectively reduced, and the corrected energy image is divided into regions, thereby improving the accuracy of energy image region division.

[0147] The present embodiment will now be described and illustrated through preferred embodiments.

[0148] Figure 3 This is a flowchart of another image contrast enhancement method provided in an embodiment of this application. For example... Figure 3 As shown, the image contrast enhancement method includes the following steps:

[0149] Step S301: Obtain the energy image to be processed.

[0150] Specifically, it acquires the energy image to be processed from the detection unit in the X-ray security inspection machine.

[0151] Step S302: Perform non-uniformity correction on the energy image to be processed to obtain the corrected energy image.

[0152] Specifically, the two-point correction method is used to correct the non-uniformity of the energy image to be processed, resulting in a corrected energy map. The maximum energy value of the corrected energy map is E. max The minimum energy is E min .

[0153] Step S303: Divide the corrected energy map into regions according to the first energy threshold to obtain low grayscale region images and non-low grayscale region images.

[0154] Specifically, the first energy threshold can also be the light response intensity threshold E in the low grayscale region. lowgray According to the first energy threshold E lowgray The corrected energy map is divided into regions, resulting in low-grayscale region images and non-low-grayscale region images. The energy value range of the low-grayscale region images is [E...]. min E lowgray The energy range of the non-low grayscale region image is [E]. lowgray E max ].

[0155] Step S304: Enhance the contrast of the non-low grayscale area image.

[0156] Furthermore, contrast enhancement is achieved by using adaptive histogram equalization or contrast stretching to enhance the contrast of the non-low grayscale region image, resulting in a contrast-enhanced image of the non-low grayscale region.

[0157] Step S305: Based on the imaging width of the detection unit, the low grayscale region image is divided into multiple sub-region images in the imaging direction.

[0158] Step S306: Divide the multiple sub-region images into dark pixel groups and regular low grayscale pixel groups according to the second energy threshold.

[0159] Furthermore, based on the imaging width of the detection unit in the imaging direction, the low grayscale region image is divided into multiple sub-region images, and then a second energy threshold E is applied. dark The image is divided into multiple sub-regions into a dark pixel group and a regular low-grayscale pixel group, where the energy value range of the dark pixel group is [E]. min E dark The energy range of a typical low-grayscale pixel group is [E]. dark E lowgray ).

[0160] Step S307: Contrast enhancement is performed on the dark pixel group and the regular low grayscale pixel group respectively according to the histogram equalization method of energy statistics.

[0161] Specifically, a histogram equalization method based on energy statistics is used to enhance the contrast of both dark pixels and regular low-grayscale pixels. For each sub-region image, energy histograms of both dark pixels and regular low-grayscale pixels are calculated, and the cumulative distribution function is then determined. Based on the cumulative distribution function of the dark pixels, the energy distribution of the dark pixels is made to fall within their respective energy ranges [E]. min E dark Equalization is performed within [E], meaning the energy value of the dark pixels after contrast enhancement is within [E]. min E dark Within the energy range [E]; and according to the cumulative distribution function of the regular low-grayscale pixel group, so that the energy distribution of the regular low-grayscale pixel group is within the energy range [E]. dark E lowgray Equalization to [E] dark E max ), that is, the energy value of the regular low grayscale pixel group after contrast enhancement is in [E dark E max Within the range.

[0162] Step S308: Merge the low grayscale region image and the non-low grayscale region image after contrast enhancement.

[0163] Furthermore, the contrast-enhanced images of non-low grayscale regions, the contrast-enhanced images of dark pixels, and the contrast-enhanced images of regular low grayscale pixels are merged to obtain the merged image.

[0164] Step S309: Output the target image.

[0165] Furthermore, the merged image is normalized so that the grayscale value of the normalized image is within the grayscale range of 0-255. Then, the mapping function between grayscale and pseudocolor is used to render the final contrast enhancement result into a pseudocolor image for output, thereby outputting the target image, which is the X-ray pseudocolor image.

[0166] Figure 4 This application provides an embodiment of an X-ray with strong penetrating power, as shown in the schematic diagram. Figure 4 As shown, when the detection unit receives X-rays with strong penetrating power, the images from left to right are the initial low grayscale image, the image obtained by directly using conventional contrast enhancement methods, and the image obtained by using the image contrast enhancement method of this application. Figure 5 This application provides a schematic diagram of an X-ray with relatively weak penetrating power, as shown in the embodiment. Figure 5 As shown, when the detection unit receives X-rays with weak penetrating power, the images from left to right are the initial low-grayscale image, the image obtained by directly using conventional contrast enhancement methods, and the image obtained by using the image contrast enhancement method of this application. Figure 4 as well as Figure 5 It is known that whether the detection unit receives X-rays with strong penetrating power or X-rays with weak penetrating power, directly applying conventional contrast enhancement algorithms to low grayscale areas results in poor contrast enhancement and the presence of non-uniform stripes with alternating bright and dark areas. However, the contrast enhancement method of this application significantly improves the contrast enhancement effect.

[0167] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0168] This embodiment also provides an image contrast enhancement device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. The terms "module," "unit," "subunit," etc., used below refer to combinations of software and / or hardware that perform a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0169] Figure 6 This is a structural block diagram of an image contrast enhancement device provided in an embodiment of this application, such as... Figure 6 As shown, the device includes:

[0170] Acquisition module 601 is used to acquire the energy image to be processed;

[0171] Processing module 602 is used to process the energy image to be processed based on a first energy threshold to obtain a first energy region map, wherein any energy value in the first energy region map is lower than the first energy threshold, and the first energy threshold is less than the maximum energy value in the energy image to be processed.

[0172] The contrast enhancement module 603 is used to enhance the contrast of the first energy region map based on at least two energy values ​​of the first energy region map to obtain an enhanced first energy region map.

[0173] The contrast enhancement image acquisition module 604 is used to obtain a contrast enhancement image of the energy image to be processed based on the enhanced first energy region map.

[0174] In some of these embodiments, the contrast enhancement module 603 is specifically used for:

[0175] The first energy region map is processed based on the second energy threshold to obtain a first energy region sub-map and a second energy region sub-map. The second energy threshold is less than the first energy threshold. Any energy value of the first energy region sub-map is less than the second energy threshold, and any energy value of the second energy region sub-map is greater than or equal to the second energy threshold.

[0176] Energy equalization is performed on the first energy region subgraph and the second energy region subgraph respectively to obtain the enhanced first energy region subgraph.

[0177] In some of these embodiments, the contrast enhancement module 603 is specifically used for:

[0178] Energy equalization is performed on the first energy region subgraph and the second energy region subgraph respectively to obtain the enhanced first energy region subgraph, including:

[0179] Histogram equalization is performed on multiple energy values ​​of the first energy region sub-image to obtain the equalized first energy region sub-image. Any energy value of the equalized first energy region sub-image is greater than or equal to the minimum energy value of the energy image to be processed and less than the second energy threshold.

[0180] Histogram equalization is performed on multiple energy values ​​of the second energy region sub-image to obtain the equalized second energy region sub-image. Any energy value of the equalized second energy region sub-image is greater than or equal to the second energy threshold and less than the maximum energy value of the energy image to be processed.

[0181] Based on the equalized first energy region subgraph and the equalized second energy region subgraph, the enhanced first energy region subgraph is obtained.

[0182] In some of these embodiments, the contrast enhancement module 603 is specifically used for:

[0183] Based on the imaging size information of the detection unit, the first energy region map is divided into multiple sub-region maps. The detection unit is used to generate an energy image to be processed based on the rays passing through the target object.

[0184] Based on the second energy threshold, multiple sub-region maps are divided into first energy region sub-maps and second energy region sub-maps.

[0185] In some embodiments, the processing module 602 is further configured to:

[0186] The energy image to be processed is divided into regions based on the first energy threshold to obtain a first energy region map and a second energy region map. Any energy value in the second energy region map is greater than or equal to the first energy threshold.

[0187] The contrast of the second energy region map is enhanced to obtain the enhanced second energy region map.

[0188] The contrast enhancement module 603 is specifically used to: obtain a contrast-enhanced image of the energy image to be processed based on the enhanced first energy region map and the enhanced second energy region map.

[0189] In some embodiments, the contrast enhancement image acquisition module 604 is further configured to:

[0190] The contrast enhancement image of the energy image to be processed is rendered to obtain the rendered image of the energy image to be processed.

[0191] In some embodiments, the processing module 602 is specifically used to: perform non-uniform correction on the energy image to be processed to obtain a corrected energy image;

[0192] The corrected energy map is divided into regions based on the first energy threshold to obtain the first energy region map.

[0193] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.

[0194] This embodiment also provides an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0195] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0196] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0197] S1, acquire the energy image to be processed.

[0198] S2, process the energy image to be processed based on the first energy threshold to obtain a first energy region map, where any energy value in the first energy region map is less than the first energy threshold, and the first energy threshold is less than the maximum energy value in the energy image to be processed.

[0199] S3, based on at least two energy values ​​of the first energy region map, perform contrast enhancement on the first energy region map to obtain the enhanced first energy region map.

[0200] S4. Based on the enhanced first energy region map, a contrast-enhanced image of the energy image to be processed is obtained.

[0201] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.

[0202] Furthermore, in conjunction with the image contrast enhancement methods provided in the above embodiments, this embodiment can also provide a storage medium for implementation. The storage medium stores a computer program; when executed by a processor, the computer program implements any of the image contrast enhancement methods described in the above embodiments.

[0203] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.

[0204] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.

[0205] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0206] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.

Claims

1. An image contrast enhancement method characterized by, The method comprises: acquiring an energy image to be processed; processing the energy image to be processed based on a first energy threshold to obtain a first energy region map, any energy value of the first energy region map being less than the first energy threshold, the first energy threshold being less than a maximum value of energy values in the energy image to be processed; performing contrast enhancement on the first energy region map based on at least two energy values of the first energy region map to obtain an enhanced first energy region map; obtaining a contrast-enhanced image of the energy image to be processed based on the enhanced first energy region map; the performing contrast enhancement on the first energy region map based on at least two energy values of the first energy region map to obtain an enhanced first energy region map comprises: determining an energy value distribution of the first energy region map based on at least two energy values of the first energy region map; performing contrast enhancement on the first energy region map according to the energy value distribution of the first energy region map to obtain an enhanced first energy region map; the performing contrast enhancement on the first energy region map based on at least two energy values of the first energy region map to obtain an enhanced first energy region map further comprises: processing the first energy region map based on a second energy threshold to obtain a first energy region sub-map and a second energy region sub-map, the second energy threshold being less than the first energy threshold, any energy value of the first energy region sub-map being less than the second energy threshold, and any energy value of the second energy region sub-map being greater than or equal to the second energy threshold; performing energy equalization on the first energy region sub-map and the second energy region sub-map respectively, and merging the equalized first energy region sub-map and the equalized second energy region sub-map to obtain the enhanced first energy region map.

2. The image contrast enhancement method of claim 1, wherein, the performing energy equalization on the first energy region sub-map and the second energy region sub-map respectively, and merging the equalized first energy region sub-map and the equalized second energy region sub-map to obtain the enhanced first energy region map comprises: performing histogram equalization on a plurality of energy values of the first energy region sub-map to obtain an equalized first energy region sub-map, any energy value of the equalized first energy region sub-map being greater than or equal to a minimum value of energy values of the energy image to be processed and less than the second energy threshold; performing histogram equalization on a plurality of energy values of the second energy region sub-map to obtain an equalized second energy region sub-map, any energy value of the equalized second energy region sub-map being greater than or equal to the second energy threshold and less than a maximum value of energy values of the energy image to be processed; merging the equalized first energy region sub-map and the equalized second energy region sub-map to obtain the enhanced first energy region map.

3. The image contrast enhancement method of claim 1, wherein, the processing the first energy region map based on a second energy threshold to obtain a first energy region sub-map and a second energy region sub-map comprises: The first energy region map is divided into a plurality of sub-region maps based on imaging size information of a detection unit used for generating the to-be-processed energy image according to the rays penetrating the target object; The plurality of sub-region maps are divided into the first energy region sub-map and the second energy region sub-map based on the second energy threshold.

4. The image contrast enhancement method of claim 1, wherein, The to-be-processed energy image is processed based on the first energy threshold to obtain the first energy region map, and the method further includes: The to-be-processed energy image is regionally divided based on the first energy threshold to obtain the first energy region map and a second energy region map, and any energy value of the second energy region map is greater than or equal to the first energy threshold; The second energy region map is subjected to contrast enhancement to obtain an enhanced second energy region map; The contrast-enhanced image of the to-be-processed energy image is obtained based on the enhanced first energy region map and the enhanced second energy region map. The contrast-enhanced image of the to-be-processed energy image is obtained based on the enhanced first energy region map, and the method further includes:

5. The image contrast enhancement method of claim 1, wherein, The contrast-enhanced image of the to-be-processed energy image is rendered to obtain a rendered image of the to-be-processed energy image. The to-be-processed energy image is processed based on the first energy threshold to obtain the first energy region map, and the method further includes:

6. The image contrast enhancement method of claim 1, wherein, The to-be-processed energy image is subjected to non-uniform correction to obtain a corrected energy map; The corrected energy map is regionally divided based on the first energy threshold to obtain the first energy region map. The method includes:

7. An image contrast enhancement apparatus, characterized by, An acquisition module is configured to acquire a to-be-processed energy image; A processing module is configured to process the to-be-processed energy image based on a first energy threshold to obtain a first energy region map, and any energy value of the first energy region map is lower than the first energy threshold, and the first energy threshold is smaller than a maximum value of energy values in the to-be-processed energy image; A contrast enhancement module is configured to perform contrast enhancement on the first energy region map based on at least two energy values of the first energy region map to obtain an enhanced first energy region map; A contrast-enhanced image acquisition module is configured to obtain a contrast-enhanced image of the to-be-processed energy image based on the enhanced first energy region map; The contrast enhancement module is further configured to determine an energy value distribution of the first energy region map based on the at least two energy values of the first energy region map; The first energy region map is subjected to contrast enhancement based on the energy value distribution of the first energy region map to obtain an enhanced first energy region map; The contrast enhancement module is further configured to process the first energy region map based on a second energy threshold to obtain a first energy region sub-map and a second energy region sub-map, the second energy threshold is smaller than the first energy threshold, any energy value of the first energy region sub-map is smaller than the second energy threshold, and any energy value of the second energy region sub-map is greater than or equal to the second energy threshold; ​ Energy equalization is performed on the first energy region subgraph and the second energy region subgraph respectively, and the equalized first energy region subgraph and the equalized second energy region subgraph are merged to obtain the enhanced first energy region graph. 8.An electronic device comprising a memory and a processor, the electronic device comprising: The memory stores a computer program, and the processor is configured to execute the computer program to perform the image contrast enhancement method in any one of claims 1 to 6.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the image contrast enhancement method in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Infrared image multi-dimensional noise reduction method, storage medium and infrared image multi-dimensional noise reduction device

    CN114881883A