Multi-scale hybrid dr image enhancement method and device, electronic equipment and storage medium

This DR image enhancement method, which employs multi-scale segmentation and fusion processing, solves the problem of traditional methods failing to capture details at different scales, achieving improvements in both global contrast and local detail. It is suitable for depicting complex tissue structures in medical DR images.

CN122134568APending Publication Date: 2026-06-02BEIJING WANDONG MEDICAL TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING WANDONG MEDICAL TECH CO LTD
Filing Date
2026-02-04
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Traditional DR image enhancement methods struggle to balance image details at different scales. Single local histogram equalization cannot simultaneously improve global contrast and local details, leading to problems of local over-enhancement or under-enhancement.

Method used

A multi-scale hybrid DR image enhancement method is adopted, which divides the target image into multi-scale blocks, performs histogram equalization and edge smoothing on each block, and then fuses the blocks of different scales to generate the final enhanced image.

Benefits of technology

It achieves image coverage at different scales, focusing on both overall contrast and fine enhancement of local details, adapting to the complex tissue structures of medical DR images, and solving the problem that single local histogram equalization cannot take into account details at different scales.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134568A_ABST
    Figure CN122134568A_ABST
Patent Text Reader

Abstract

This application provides a multi-scale hybrid DR image enhancement method, apparatus, electronic device, and storage medium. The method includes: acquiring a target image to be identified; dividing the target image into N blocks according to N different block scales to obtain a first block image corresponding to each block scale; for each block scale, performing histogram equalization processing on each first block image corresponding to that block scale according to its corresponding contrast constraint to obtain a corresponding second block image; for each block scale, performing edge smoothing processing on each second block image corresponding to that block scale to obtain a corresponding third block image; and fusing all third block images corresponding to the N different block scales to obtain an enhanced image. This application solves the problem in related technologies where single local histogram equalization is difficult to simultaneously capture image details at different scales.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a multi-scale hybrid DR image enhancement method and apparatus, electronic device and storage medium. Background Technology

[0002] Digital radiography (DR) is a digital imaging technology developed from traditional X-ray radiography. It offers advantages such as fast imaging speed, high image resolution, low radiation dose, and the ability to perform post-processing. In medical diagnosis, DR images are one of the core bases for disease screening and condition assessment. Clear images with appropriate contrast help doctors accurately identify subtle lesions, such as small lung nodules, fracture lines, and soft tissue lesions. However, the actual imaging process is affected by equipment performance, the physiological structure of the imaging site, and scanning parameters, often resulting in insufficient contrast and blurred details. For example, under equipment and imaging limitations, the detector sensitivity and X-ray source energy distribution of DR equipment can lead to concentrated grayscale distribution, poor overall contrast, and indistinct distinction between lesions and surrounding tissues. For instance, in chest DR images, low contrast may mask faint exudative shadows of early lung inflammation. Furthermore, under physiological structural interference, the attenuation of X-rays varies significantly among different tissues in the body. For example, in abdominal DR images, overlapping intestinal gas, bones, and soft tissues can easily obscure local details, making it difficult for traditional enhancement methods to simultaneously address both overall and local detail requirements.

[0003] In related technologies, contrast enhancement methods are used to overcome the above problems. However, contrast enhancement methods still have the following obvious drawbacks: 1. Global Histogram Equalization (GHE): Adjusting pixels based solely on the grayscale histogram of the entire image can improve overall contrast, but it can easily lead to local over-enhancement (e.g., normal tissues are excessively stretched due to global statistics) or under-enhancement (lesion areas are not sufficiently enhanced due to their small global proportion). For example, in spinal DR images containing both bone and soft tissue, global equalization may cause bone edges to be too bright and soft tissue details to be lost.

[0004] 2. Local Histogram Equalization (LHE): This method processes local grayscale values ​​by dividing the image into blocks. However, a fixed block size cannot meet the multi-scale detail requirements of medical images (such as large-scale organ outlines and small-scale micronodules). If the blocks are too large, the local enhancement effect is similar to the global effect; if the blocks are too small, block effects are likely to occur, and it is difficult to balance the enhancement levels of structures at different scales.

[0005] Therefore, traditional global histogram equalization is prone to local over-enhancement or under-enhancement, and single local histogram equalization is difficult to take into account image details at different scales.

[0006] It is evident that, as mentioned above, the related technologies suffer from the technical problem that single local histogram equalization cannot adequately capture image details at different scales. Summary of the Invention

[0007] This application provides a multi-scale hybrid DR image enhancement method and apparatus, electronic device and storage medium to at least solve the problem in the related art that single local histogram equalization is difficult to take into account image details at different scales.

[0008] According to one aspect of the embodiments of this application, a multi-scale hybrid DR image enhancement method is provided, comprising: Acquire the target image to be identified; The target image is divided into N blocks according to N different block scales to obtain a first block image corresponding to each block scale. The number of first block images obtained by dividing the target image into blocks according to different block scales is different. For each block scale, histogram equalization is performed on each first block image corresponding to that block scale according to its corresponding contrast constraint to obtain the corresponding second block image. For each block scale, edge smoothing is performed on each second block image corresponding to that block scale to obtain the corresponding third block image; The enhanced image is obtained by fusing all the third block images corresponding to N different block scales.

[0009] Optionally, as described above, the step of performing histogram equalization on each first block image corresponding to each block scale according to its corresponding contrast constraint to obtain the corresponding second block image includes: The overall pixel grayscale value distribution of the first-level image is statistically analyzed to obtain a grayscale histogram, wherein the first-level image is the target image whose corresponding block scale is not divided. Based on the gray-level histogram, the first cumulative distribution function is calculated; According to the contrast limiting condition used to indicate no contrast limitation, and based on the first cumulative distribution function and the original gray value of each first pixel in the pixel gray value distribution, a first new gray value of each first pixel is determined. Based on the first new grayscale value of each first pixel, the global processing result corresponding to the first level image is determined, and the global processing result is used as the second block image corresponding to the first level image, and the second block image corresponding to the first level image is directly used as the third block image.

[0010] Optionally, as described above, the step of performing histogram equalization on each first block image corresponding to each block scale according to its corresponding contrast constraint to obtain the corresponding second block image includes: The local pixel grayscale value distribution of each first block image in the secondary image is statistically analyzed to obtain the local grayscale histogram of each first block image, wherein the secondary image is the target image divided into multiple blocks according to the corresponding block scale; The gray-level probabilities exceeding the contrast limit threshold in the local gray-level histogram of each first block image are cropped, and the cropped probability quality is uniformly redistributed to all gray levels to obtain the local gray-level histogram after probability quality redistribution for each first block image. The second cumulative distribution function of each first block image is calculated based on the local gray-level histogram after probability quality redistribution corresponding to each first block image; Based on the second cumulative distribution function of each first block image and the original gray value of each second pixel in the local pixel gray value distribution, the new gray value of each second pixel is determined; Based on the new grayscale value of each second pixel, each second block image corresponding to the secondary image is determined.

[0011] Optionally, as described above, the step of performing edge smoothing processing on each second block image corresponding to each block scale to obtain the corresponding third block image includes: Based on the other second block images adjacent to each second block image, linear interpolation or bilinear interpolation is performed on the edge pixels of each second block image to obtain the third block image corresponding to each second block image.

[0012] Optionally, as described above, the step of performing linear interpolation or bilinear interpolation on the edge pixels of each second block image according to other second block images adjacent to each second block image includes: If there is only one other second block image adjacent to the edge pixel, linear interpolation is performed on the edge pixel based on the adjacent pixels located in the other second block image.

[0013] Optionally, as described above, the step of performing linear interpolation or bilinear interpolation on the edge pixels of each second block image according to other second block images adjacent to each second block image includes: When there are three other second-block images adjacent to the edge pixel, bilinear interpolation is performed on the edge pixel based on the three adjacent pixels located in the other second-block images.

[0014] Optionally, as described above, the step of fusing all third block images corresponding to N different block scales to obtain the enhanced image includes: According to a first information proportion weight of a specified block scale and a second information proportion weight corresponding to each target block scale, the third block image corresponding to the specified block scale and the third block image corresponding to each target block scale are mixed to obtain the enhanced image. Here, the information proportion weight is the proportion weight of grayscale information, the specified block scale is the block scale without dividing the target image into multiple blocks, and the target block scale is the block scale that divides the target image into multiple blocks. According to another aspect of the embodiments of this application, a multi-scale hybrid DR image enhancement apparatus is also provided, comprising: The acquisition module is used to acquire the target image to be identified; The segmentation module is used to segment the target image into N blocks according to N different segmentation scales to obtain a first block image corresponding to each segmentation scale. The number of first block images obtained by segmenting the target image into blocks according to different segmentation scales is different. The first processing module is used to perform histogram equalization processing on each first block image corresponding to each block scale according to its corresponding contrast constraint, so as to obtain the corresponding second block image. The second processing module is used to perform edge smoothing processing on each second block image corresponding to each block scale to obtain the corresponding third block image. The fusion module is used to fuse all third block images corresponding to N different block scales to obtain the enhanced image.

[0015] According to another aspect of the embodiments of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the method steps of any of the above embodiments by running the computer program stored in the memory.

[0016] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute the method steps of any of the above embodiments when running.

[0017] In this embodiment, the method involves acquiring a target image to be identified; dividing the target image into N blocks according to N different block scales to obtain a first block image corresponding to each block scale, wherein the number of first block images obtained by dividing the target image into blocks according to different block scales is different; for each block scale, histogram equalization processing is performed on each first block image corresponding to that block scale according to its corresponding contrast constraint to obtain a corresponding second block image; for each block scale, edge smoothing processing is performed on each second block image corresponding to that block scale to obtain a corresponding third block image; and all third block images corresponding to N different block scales are fused to obtain an enhanced image. Since the final enhanced image can be obtained based on the third block images corresponding to multiple block scales, it is possible to cover the image from different scales (e.g., global to local), focusing on both overall contrast and finely enhancing local details, thus adapting to the complex tissue structure of medical DR images, thereby solving the problem in related technologies where a single local histogram equalization cannot take into account image details at different scales. Attached Figure Description

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

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of the hardware environment of an optional multi-scale hybrid DR image enhancement method according to an embodiment of this application; Figure 2 This is a flowchart illustrating an optional multi-scale hybrid DR image enhancement method according to an embodiment of this application; Figure 3 This is a schematic diagram of a block segmentation method with different optional block scales according to an embodiment of this application; Figure 4 This is a flowchart illustrating an optional multi-scale hybrid DR image enhancement method according to an application example of this application; Figure 5 Is adopted Figure 4 Comparison of DR image enhancement effects before and after the method; Figure 6This is a structural block diagram of an optional multi-scale hybrid DR image enhancement device according to an embodiment of this application; Figure 7 This is a structural block diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0021] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0023] According to one aspect of the embodiments of this application, a multi-scale hybrid DR image enhancement method is provided. Optionally, in this embodiment, the above-described multi-scale hybrid DR image enhancement method can be applied to, for example... Figure 1 The hardware environment shown consists of terminal 1402 and server 1404. For example... Figure 1 As shown, server 1404 is connected to terminal 1402 via a network and can be used to provide services (such as game services, application services, etc.) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 1404.

[0024] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal may not be limited to PC, mobile phone, tablet computer, etc.

[0025] The multi-scale hybrid DR image enhancement method of this application embodiment can be executed by a server, a terminal, or both. Alternatively, the multi-scale hybrid DR image enhancement method of this application embodiment can be executed by a client installed on the terminal.

[0026] Taking the multi-scale hybrid DR image enhancement method in this embodiment, executed by the server, as an example, Figure 2 A multi-scale hybrid DR image enhancement method provided in this application includes the following steps: Step S202: Obtain the target image to be identified.

[0027] The multi-scale hybrid DR image enhancement method in this embodiment can be applied to scenarios where DR images need to be processed to improve details.

[0028] Specifically, the target image can be an image obtained by taking pictures of the patient using a digital X-ray imaging system (DR).

[0029] Step S204: Divide the target image into N blocks according to N different block scales to obtain the first block image corresponding to each block scale. The number of first block images obtained by dividing the target image into blocks according to different block scales is different.

[0030] Specifically, after obtaining the target image, the number of different block scales can be determined according to preset parameters or the needs of the actual scene. That is, the number N can be set according to different needs, such as 2, 3, 4, etc. The block scale can also be set according to different needs, such as 1, 9, 16, etc. In other words, the first block image corresponding to each block scale is obtained by dividing the target image into blocks according to the number of blocks corresponding to each block scale.

[0031] Optionally, for the input medical DR image, i.e., the target image, a preset decomposition level N is set (e.g., N = 3, which can be adjusted flexibly). One optional method for dividing the image into blocks at different block scales when the decomposition level is 3 is as follows: Figure 3As shown. The first level of segmentation scale sets the number of segments, Tiles, to 1 (i.e., no additional segments are created by default, and the entire image is treated as one block), which is consistent with the target image. The second level sets the segmentation scale, Tiles_2 = m (where m is the number of first-level segments obtained after segmenting the target image; m can be 9, and the value of m can be freely set). Alternatively, Tiles_2_X = 3 (i.e., three segments in the X direction) and Tiles_2_Y = 3 (i.e., three segments in the Y direction) can be set. In fact, this has the same result as Tiles_2 = 9, uniformly dividing the image into 9 first-level segments (9 = 3 * 3). The third level sets the segmentation scale, Tiles_3_X = 4 and Tiles_3_Y = 5 (Tiles_3_X and Tiles_3_Y represent the number of segments in the width and height directions of the image, respectively), uniformly dividing the image into 20 first-level segments, resulting in a more refined division into multiple first-level segments. Different levels of block size have different scales, ranging from coarse to fine, covering the entire image and local regions. Subsequent processing is performed based on the characteristics of different scale blocks.

[0032] Based on the image coordinate system, the row and column range of each first image block in the original image is calculated according to the preset number of blocks. For example, if the second level is divided into 9 blocks, and the image size is W×H, then the width of the first image block is approximately W / The height is approximately H / The process iterates through the image to determine the coordinates of the top-left and bottom-right corners of each first image block, thus completing the block division. Alternatively, the number of tiles in the width and height directions can be customized separately. For example, the third level is divided into 20 tiles, with 4 tiles in the width direction and 5 tiles in the height direction. The advantage of this is that it is not limited by the image size. For full-frame DR images, when the width and height are not equal, independent parameters for width and height can be set separately, making the block division more closely match the actual image size and resulting in more stable image enhancement.

[0033] Tiles_1 = Tiles_1_X * Tiles_1_Y; Tiles_2 = Tiles_2_X * Tiles_2_Y; Tiles_3 = Tiles_3_X * Tiles_3_Y; For images with similar width and height dimensions (within a preset ratio range (e.g., 1:1.5, such as 4267*4267), the value of Tiles_n can be set directly; for images with significantly different width and height dimensions (outside the preset ratio range (e.g., 1:1.5, such as 3064*8696), the values ​​of Tiles_n_X and Tiles_n_Y can be set separately.

[0034] Step S206: For each block scale, according to its corresponding contrast constraint, perform histogram equalization processing on each first block image corresponding to the block scale to obtain the corresponding second block image.

[0035] Specifically, for the first block image obtained by dividing the image at each block scale, histogram equalization is performed on it according to different contrast constraints in this embodiment.

[0036] Contrast limiting conditions can be used to restrict excessively high grayscale values ​​of pixels during histogram equalization of segmented images. Exceeding this threshold allows for the even distribution of grayscale probabilities exceeding the threshold to other grayscale levels, preventing excessive local contrast enhancement. Here, grayscale probability refers to the probability of grayscale level distribution. Evenly distributing grayscale probabilities exceeding the threshold to other grayscale levels instructs the "flattening" of pixel brightness that occurs too frequently, and then evenly distributing the flattened frequencies to all other brightness levels to prevent local overexposure or noise in the image. This yields processing results corresponding to each segment scale. These results are the images after histogram equalization of the segmented images corresponding to each segment scale according to the contrast limiting conditions for that segment scale. Therefore, when a segment scale contains M segmented images, the processing results for that segment scale also contain M values.

[0037] Step S208: For each block scale, perform edge smoothing processing on each second block image corresponding to that block scale to obtain the corresponding third block image.

[0038] Specifically, after obtaining the second block images for different block scales, different edge smoothing processes are performed on the second block images corresponding to different block scales according to the edge smoothing requirements corresponding to each block scale, so as to obtain the third block image corresponding to each block scale. For example, when there is only one second block image corresponding to the block scale, that is, when the block scale is 1 and the target image has not been divided into blocks, no edge smoothing process is performed on the corresponding second block image. Edge smoothing process is only performed when there are multiple second block images.

[0039] Optionally, step S208 can be implemented by performing edge smoothing processing on each second block image corresponding to each block scale for each block scale to obtain the corresponding third block image: performing edge smoothing processing on each second block image according to other second block images adjacent to the second block image corresponding to each target block scale to obtain the third block image corresponding to each second block image, wherein the target block scale is the block scale that divides the target image into multiple blocks, and the edge smoothing processing is used to make the display effect of two adjacent local processing results smooth.

[0040] Specifically, after obtaining the second block image corresponding to each block scale, the second block image obtained by the block scale can be further distinguished based on the size of the block scale. When the block scale is 1, the block scale is recorded as the specified block scale, and the second block image is recorded as the global processing result; when the block scale is greater than 1, the block scale is recorded as the target block scale, and the second block image is recorded as the local processing result.

[0041] Since each local processing result is processed by histogram equalization separately, it is necessary to avoid abrupt changes in grayscale at the edges of different local processing results corresponding to the same block scale, which would lead to unevenness. Therefore, edge smoothing is performed on each local processing result according to the other local processing results adjacent to each local processing result. This can be done by performing grayscale smoothing on the edges of two or more adjacent local processing results, or by performing grayscale smoothing on one of the two or more local processing results, so that there will be no obvious abrupt changes in grayscale as a whole between the two or more local processing results. Thus, the difference processing result corresponding to each local processing result can be obtained.

[0042] Step S210: Fuse all third block images corresponding to N different block scales to obtain the enhanced image.

[0043] Specifically, after obtaining all the third block images, that is, after obtaining the global processing result (i.e., the third block image corresponding to the block scale of 1) and all the difference processing results (i.e., the third block image corresponding to the block scale of greater than 1), the global processing result and all the difference processing results can be fused.

[0044] For example, when the global processing result is denoted as img_global, and the difference processing result is obtained by processing img_local_2 and img_local_3, one or more of the following methods can be used to mix the global processing result and all difference processing results: Method 1: Direct mixing strategy based on weighted average: In other words, the enhanced image can be obtained by fusing all third block images corresponding to N different block scales in the following manner: according to the first information proportion weight of the specified block scale and the second information proportion weight of each target block scale, the third block image corresponding to the specified block scale and the third block image corresponding to each target block scale are mixed to obtain the enhanced image. Here, the information proportion weight is the proportion weight of grayscale information, the specified block scale is the block scale that does not divide the target image into multiple blocks, and the target block scale is the block scale that divides the target image into multiple blocks.

[0045] In other words, at a specified block scale, the original target image is not divided into blocks; that is, there is only one third block image corresponding to the specified block scale. At the target block scale, the original target image needs to be divided into blocks; that is, there are multiple third block images corresponding to the target block scale.

[0046] Preprocessing stage: Ensure that all input images (img_global (i.e., the third block image corresponding to block scale 1, which is also the global processing result), the difference processing result of img_local_2, and the difference processing result of img_local_3) have the same grayscale range.

[0047] Determine the mixing parameters: Set the initial mixing parameters a (i.e., the weight of the first information proportion), b (i.e., the weight of the second information proportion corresponding to the target block scale I) and c (i.e., the weight of the second information proportion corresponding to the target block scale II) according to the actual needs. For example, a = 0.4, b = 0.3, c = 0.3.

[0048] These parameters can be further optimized through experimentation or automated algorithms (such as genetic algorithms, grid search, etc.) to achieve the best visual results.

[0049] Perform weighted average mixing: For each pixel location (x, y), calculate its value in the final enhanced image img_processed. This method is simple and straightforward, but requires all images to have been correctly normalized to the same grayscale range to avoid numerical overflow or distortion.

[0050] Method 2: Adaptive Hybridization Strategy Based on Regional Characteristics Analyze the characteristics of each region: For each third block image (i.e., the result of global processing or the result of interpolation) or region of interest (ROI), evaluate its local characteristics (such as edge strength, texture complexity, etc.) to determine whether the region is more suitable to obtain information from the global processing result or the local interpolation result.

[0051] Dynamically adjust blending parameters: Based on the above analysis, different blending parameters are applied to different third-block images or regions. For example, the weights of img_local_2 or img_local_3 are increased in regions with rich edges, while img_global is relied upon more in smooth regions.

[0052] This can be achieved by defining a weighting function (f_{weights}(x, y)) based on local characteristics, such that for each pixel location (x, y), the blending weights vary with the local characteristics. This approach can adapt to different regional characteristics within the image.

[0053] In this embodiment, the method involves acquiring a target image to be identified; dividing the target image into N blocks according to N different block scales to obtain a first block image corresponding to each block scale, wherein the number of first block images obtained by dividing the target image into blocks according to different block scales is different; for each block scale, histogram equalization processing is performed on each first block image corresponding to that block scale according to its corresponding contrast constraint to obtain a corresponding second block image; for each block scale, edge smoothing processing is performed on each second block image corresponding to that block scale to obtain a corresponding third block image; and all third block images corresponding to N different block scales are fused to obtain an enhanced image. Since the final enhanced image can be obtained based on the third block images corresponding to multiple block scales, it is possible to achieve image coverage from different scales (e.g., global to local), focusing on both overall contrast and finely enhancing local details, thus adapting to the complex tissue structures of medical DR images. This solves the problem in related technologies where a single local histogram equalization cannot take into account image details at different scales.

[0054] As an optional implementation, the method described above can be implemented through the following steps: Step S206, for each block scale, performs histogram equalization processing on each first block image corresponding to that block scale according to its corresponding contrast constraint, to obtain the corresponding second block image, including: The distribution of pixel grayscale values ​​of the first-level image is statistically analyzed to obtain a grayscale histogram. The first-level image is the target image with an undivided block scale. The grayscale histogram is used to indicate the number of pixels for each grayscale value. The first cumulative distribution function is calculated based on the gray-level histogram; According to the contrast constraint condition used to indicate no contrast constraint, and based on the cumulative distribution function and the original gray value of each first pixel in the pixel gray value distribution, the first new gray value of each first pixel is determined. Based on the first new grayscale value of each first pixel, the global processing result corresponding to the first-level image is determined, and the global processing result is used as the second block image corresponding to the first-level image. The second block image corresponding to the first-level image is directly used as the third block image.

[0055] In other words, this embodiment uses the original first-level image as input to statistically analyze the pixel grayscale value distribution of the entire first-level image: For each first pixel in the first-level image, its grayscale value is read, and the frequency of each grayscale level (in medical images, the data range is generally 14 bits (0-16383) or 16 bits (0-65535); in this embodiment, the grayscale level is 14 bits (0-16383)) in the entire image is counted to obtain a grayscale histogram (H(g)), where (g) represents the grayscale level, and (H(g)) represents the number of pixels with a grayscale value of (g). This histogram provides the basic data for subsequent cumulative distribution calculations.

[0056] Based on the above gray-level distribution, the first cumulative distribution function (CDF), i.e., F(r), is calculated: using the obtained gray-level histogram (H(g)), the normalized frequencies are accumulated sequentially from smallest to largest gray level to obtain the cumulative distribution function F(r), which is defined as: ; Where P is the total number of pixels in the first-level image. This function reflects the proportion of the first pixel whose grayscale value does not exceed (g), and its output will be directly used to construct the grayscale mapping relationship.

[0057] Based on the cumulative distribution function, a mapping relationship is established from the original grayscale value to the new grayscale value: using the calculated F(r) as the mapping basis, each original grayscale value (g) is mapped to a new grayscale value (g'). Let the original grayscale value be r, and the specific formula is: mapped grayscale value s = (L - 1) × F(r) (L is the total number of grayscale levels). Wherein, (when the grayscale level is 14 bits, L = 16384) is the total number of standard grayscale levels. This mapping ensures that sparse grayscale intervals in the original image are stretched and dense intervals are compressed, thereby making the overall grayscale distribution more uniform and improving image contrast. Applying the above mapping relationship, the original first-level image can be converted pixel by pixel. Using the original grayscale value (g) of each first pixel as an index, the corresponding first new grayscale value (g') is obtained by looking up the table and replaced with (g'). After the full image conversion, an image with a more balanced grayscale distribution and significantly enhanced contrast is output, which is recorded as the global processing result. Furthermore, the global processing result serves as the second block image corresponding to the first-level image, and since the global processing result does not require edge smoothing, the second block image corresponding to the first-level image is directly used as the third block image.

[0058] As an optional implementation, the method described above can be implemented by the following steps: Step S206, for each block scale, performs histogram equalization processing on each first block image corresponding to that block scale according to its corresponding contrast constraint, to obtain the corresponding second block image: The local pixel grayscale value distribution of each first block image in the secondary image is statistically analyzed to obtain the local grayscale histogram of each block image. The secondary image is the target image divided into multiple blocks according to the corresponding block scale. The local grayscale histogram is used to indicate the number of pixels for each grayscale value in each block image.

[0059] Specifically, for each first block image in the secondary image, all second pixels within the first block image can be traversed to obtain the local pixel grayscale value distribution, thus obtaining the local grayscale histogram H of the first block image. local (g), where g∈[0,16383] represents the gray level when the gray level is 14 bits.

[0060] The gray-level probabilities exceeding the contrast limit threshold in the local gray-level histogram of each first block image are cropped, and the cropped probabilities are uniformly redistributed to all gray levels to obtain the local gray-level histogram after probability redistribution for each first block image.

[0061] In other words, a contrast limit threshold, ClipLimit, can be preset (e.g., the default value is 0.3, which can be adjusted according to image characteristics). Gray-level probabilities exceeding ClipLimit in the local gray-level histogram are "cropped," meaning the excess is removed. These truncated probability masses are then evenly redistributed to all gray levels (including those not exceeding the limit), resulting in a redistributed local gray-level histogram for each image block. This suppresses noise amplification and prevents excessive local contrast enhancement. Here, probability mass refers to the "sum of excess probability values" truncated by the limit threshold (ClipLimit).

[0062] The second cumulative distribution function (CDF) for each first image block is calculated based on the local gray-level histogram after probability quality redistribution. Specifically, for each first image block, the CDF is calculated based on the local gray-level histogram after probability quality redistribution. The CDF is used to map the original gray values ​​to new equalized gray values, thereby enhancing the local contrast of the first image block.

[0063] Based on the second cumulative distribution function of each first image block and the original gray value of each second pixel in the local pixel gray value distribution, the new gray value of each second pixel is determined. Specifically, for each image block, after obtaining its corresponding second cumulative distribution function, the new gray value mapped to the original gray value of each second pixel in the local pixel gray value distribution can be determined using this second cumulative distribution function.

[0064] Based on the new grayscale value of each second pixel, the local processing result corresponding to the secondary image is determined.

[0065] As an optional implementation, the method described above can be implemented by performing edge smoothing processing on each second block image corresponding to each block scale to obtain the corresponding third block image through the following steps: Linear interpolation or bilinear interpolation is performed on the edge pixels of each second block image based on the other second block images adjacent to each second block image to obtain the third block image corresponding to each second block image.

[0066] Specifically, after local grayscale histogram equalization, to eliminate the boundary discontinuities caused by the independent enhancement of each second-block image, interpolation fusion is required for the edge pixels between each second-block image and its adjacent second-block images. Specifically, a combination of linear and bilinear interpolation strategies can be used: for example, when there are significant grayscale jumps in a linear direction (such as horizontal or vertical), one-dimensional linear interpolation is preferentially used to smooth the edge transition pixels; while in the two-dimensional neighborhood (i.e., involving both horizontal and vertical directions), bilinear interpolation is introduced, achieving a finer and more natural grayscale transition by weighted fusion of pixel values ​​at the corner points of four neighboring block images. This fusion mechanism effectively alleviates visual artifacts caused by differences in local contrast enhancement between block images, ensuring that the final image maintains global consistency while preserving local detail enhancement. The edge-smoothed result generated in this process is the difference processing result corresponding to each original local processing result.

[0067] As an optional implementation, the method described above can be implemented by performing linear interpolation or bilinear interpolation on the edge pixels of each second block image according to other second block images adjacent to each second block image, through the following steps: When there is only one other second-block image adjacent to the edge pixel, linear interpolation is performed on the edge pixel based on its neighboring pixels located in the other second-block image. Specifically, this case occurs when there is only one other second-block image adjacent to the edge pixel, i.e., when there is a significant gray-level jump in the linear direction (such as horizontal or vertical). In this case, linear interpolation is used for smoothing. Taking the horizontally adjacent local processing results as an example: Let the rightmost column of the second block image on the left be (C_L) and the leftmost column of the second block image on the right be (C_R). The two are adjacent at column coordinates (x_1) (i.e., edge pixels) and (x_2 = x_1 + 1) (i.e., adjacent pixels).

[0068] Construct a virtual transition band with a width of 1 between the two columns (it can also be expanded to a width of multiple pixels). For each row of pixels at the transition position, calculate the smoothed grayscale value using the following formula: Where: (p_1) is the pixel value of the edge pixel at row and column (x_1) of the left block image; (p_2) is the pixel value of the adjacent pixel at row and column (x_2) of the right block image; (x) is the continuous coordinate of the transition point (for example, (x = x_1 + 0.5) represents the midpoint). This operation replaces the original abrupt grayscale jump with a linear gradient, effectively alleviating the "seam" phenomenon in the horizontal or vertical directions.

[0069] As an optional implementation, the method described above can be implemented by performing linear interpolation or bilinear interpolation on the edge pixels of each second block image according to other second block images adjacent to each second block image, through the following steps: When there are three other second-block images adjacent to the edge pixel, bilinear interpolation is performed on the edge pixel based on its three adjacent pixels located in the other second-block images. In the case of three other second-block images adjacent to the edge pixel, i.e., for the corner region where four sub-blocks intersect (i.e., where both horizontal and vertical adjacency exist), one-dimensional interpolation alone cannot guarantee two-dimensional continuity. Therefore, bilinear interpolation is used within the two-dimensional neighborhood for more refined transition calculations. Let the target pixel be located at coordinates (x, y), and the edge pixel coordinates be the coordinates of its four nearest neighbor pixels, which are respectively from the corners of the four adjacent second-block images, denoted as: p_{11} (e.g., edge pixels): the bottom right pixel of the second top-left block of the image; p_{12} (e.g., adjacent pixels): the bottom left pixel of the second top-right block of the image; p_{21} (e.g., adjacent pixels): the top-right pixel of the second bottom-left block of the image; p_{22} (e.g., adjacent pixels): the top-left pixel of the second bottom-right block of the image.

[0070] Mapping (x, y) onto a unit grid with p_{11} as the origin yields normalized offsets x'∈[0,1] and y'∈[0,1]; the fused pixel value at that location is then calculated as follows: p(x,y) = p11×(1 - x')×(1 - y') + p12×x'×(1 - y') + p21×(1 - x')×y' + p22×x'×y' (x' and y' are normalized coordinate offsets, and p11, p12, p21, and p22 are the surrounding pixel values). This formula achieves a smooth two-dimensional transition by weighted averaging of local information in four directions, which can significantly suppress the "cross-shaped" artifacts at the corners.

[0071] like Figure 4 As shown, an application example applying any of the foregoing embodiments is provided: 1. Perform multi-scale intra-block decomposition on the target image (i.e., img): For the input medical DR target image (img), preset the decomposition level N (e.g., N=3, which can be adjusted flexibly), see [link / reference]. Figure 3 .

[0072] The first level sets the number of blocks (Tiles) to 1 (meaning no extra blocks are created by default, and the whole thing is treated as one block), which means no block operation is required, and the corresponding first block image is 1. The second level sets Tiles_2 = 4 (m can be set freely), which divides the image into 4 blocks evenly (i.e., step S1), that is, the corresponding first block image is 4; The third level sets Tiles_3=9, which evenly divides the image into 9 first-level image blocks, providing a finer division of the first-level image blocks (i.e., step S2). Different levels of block division have different scales, covering the entire image and local regions from coarse to fine, and subsequent processing is tailored to the characteristics of block division at different scales.

[0073] 2. Histogram equalization processing of the first block image obtained at different block scales 2.1 Global image enhancement (i.e., step S3) Level 1 (Global Processing): Global histogram equalization is performed on the first-level image (i.e., the entire image, Tiles = 1). The distribution of pixel gray values ​​in the entire image is statistically analyzed to obtain a gray-level histogram. The first cumulative distribution function (CDF) is calculated to map the original gray values ​​to a new range, thereby improving the overall contrast of the image. The processing result is denoted as img_global (i.e., the global processing result, which is also the second block image).

[0074] Formula example: Let the original grayscale value be r, and the CDF be F(r). The mapped grayscale value is s = (L - 1)×F(r) (L is the total number of grayscale levels).

[0075] 2.2 Local image (i.e., each block image in the secondary image) enhancement (i.e., steps S4 and S5) Levels 2 and 3 (Local Processing): Contrast-limited local histogram equalization (HGM) is performed on the first block images in the Level 2 (Tiles = 8) and Level 3 (Tiles = 16) images, respectively. For each first block image, its local histogram is calculated, CDF is computed, and a contrast-limiting threshold, ClipLimit, is set (the ClipLimit parameter can be adjusted according to image characteristics; a value of 0.3 is acceptable). Gray levels exceeding the threshold are evenly distributed to other gray levels to avoid excessive local contrast enhancement. The processed Level 2 result is denoted as img_local_2 (i.e., the local processing result of the Level 2 block, which is also the second block image corresponding to one target block scale), and the Level 3 result is denoted as img_local_3 (i.e., the local processing result of the Level 3 block, which is also the second block image corresponding to another target block scale).

[0076] 3. Interpolation processing optimizes inter-block transitions (i.e., steps S6 and S7). The equalization results of the image blocks within img_local_2 and img_local_3 are processed using a combination of linear and bilinear interpolation. For the edge regions of adjacent image blocks, if abrupt grayscale changes occur between the second image blocks due to local equalization, linear interpolation is used for smoothing in a one-dimensional direction (such as a single horizontal or vertical direction), while bilinear interpolation is used for accurately calculating transition pixel values ​​in a two-dimensional direction (considering both horizontal and vertical directions). This results in a natural fusion of the second image blocks, reduces artifacts, and yields the difference processing result. For example, for the second horizontally adjacent image block, the edge column pixels are taken, and the transition pixels are calculated using the linear interpolation formula: p(x) = p1 + (p2 - p1)×(x - x1) / (x2 - x1) (p1 and p2 are the edge pixel values ​​of the adjacent image block, and x is the coordinate of the transition position); bilinear interpolation is calculated at the two-dimensional coordinate (x,y) by combining the weighted values ​​of the four surrounding pixels: p(x,y) = p11×(1 - x')×(1 - y') + p12×x'×(1 - y') + p21×(1 - x')×y' + p22×x'×y' (x' and y' are the normalized coordinate offsets, and p11, etc. are the surrounding pixel values).

[0077] 4. The multi-scale results are blended to obtain the final enhanced image (i.e., step S8). The images `img_global`, `img_local_2`, and `img_local_3` are blended using the formula `img_processed = a×img_global + b×img_local_2 + c×img_local_3`, where `a + b + c = 1` (where `a`, `b`, and `c` are blending parameters that can be optimized experimentally, such as adjusting them based on the proportion of global (i.e., global processing result) and local (i.e., difference processing result) information in the image; initially, `a` can be set to 0.4, `b` to 0.3, and `c` to 0.3). This blending strategy fuses the overall contrast enhancement from global processing with the detail enhancement from local processing, resulting in the final enhanced medical DR image `img_processed` (i.e., the enhanced image).

[0078] Explanation of parameters in the above steps: 0 <ClipLimit<1,0<a / b / c<1 ,a + b + c = 1。

[0079] The actual effect parameters can be set as follows: For DR images of different body parts such as the chest, spine, and limbs, due to significant differences in tissue density and structure, differentiated optimization is required. For example: For a standard DR image, the image size is 4267*4267.

[0080] 1. Chest DR: Focus on enhancing lung texture and nodules, reducing artifacts in the heart and mediastinal areas, setting ClipLimit (e.g., 0.4 - 0.6); a=0.4, b=0.4, c=0.2; Tiles_1 is set to 1, Tiles_2 to 9, and Tiles_3 to 25 for more refined enhancement of the lung field area.

[0081] 2. Spinal DR: Focus on the overall morphology of the vertebral body and the details of the trabecular bone. Set ClipLimit (e.g., 0.5 - 0.7); a=0.55, b=0.3, c=0.15; set the number of blocks to 1 for Tiles_1, 16 for Tiles_2, and 25 for Tiles_3.

[0082] Of course, for full-frame DR, the image size is 3064*8696. Since the width and height are very different, the number of blocks in the width and height can be set independently.

[0083] 3. Full-frame, full-spine image: Set ClipLimit (e.g., 0.5 - 0.7); a=0.55, b=0.3, c=0.15; Number of blocks: Tiles_1 (first level) set to 1, Tiles_2_X=8, Tiles_2_Y=16 (second level), Tiles_3_X=16, Tiles_3_Y=32 (third level).

[0084] The above describes a multi-scale, three-level setup. Additional multi-scale levels can be added, allowing for a balance between actual performance and algorithm execution efficiency.

[0085] After processing a DR image using the above method, the following can be obtained: Figure 5 The comparison images shown are before and after multi-scale DR image enhancement. The left side does not use multi-scale equalization, while the right side uses the method in this application example, which significantly improves contrast and clarity.

[0086] According to another aspect of the embodiments of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the method steps of any of the above embodiments by running the computer program stored in the memory.

[0087] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute the method steps of any of the above embodiments when running.

[0088] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0089] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0090] According to another aspect of the embodiments of this application, a multi-scale hybrid DR image enhancement apparatus for implementing the above-described multi-scale hybrid DR image enhancement method is also provided. Figure 6 This is a structural block diagram of an optional multi-scale hybrid DR image enhancement device according to an embodiment of this application, such as... Figure 6 As shown, the device may include: Acquisition module 61 is used to acquire the target image to be identified; The segmentation module 62 is used to segment the target image into N blocks according to N different segmentation scales to obtain a first block image corresponding to each segmentation scale. The number of first block images obtained by segmenting the target image into blocks according to different segmentation scales is different. The first processing module 63 is used to perform histogram equalization processing on each first block image corresponding to each block scale according to its corresponding contrast constraint, so as to obtain the corresponding second block image. The second processing module 64 is used to perform edge smoothing processing on each second block image corresponding to each block scale to obtain the corresponding third block image. The fusion module 65 is used to fuse all the third block images corresponding to N different block scales to obtain the enhanced image.

[0091] It should be noted that the acquisition module 61 in this embodiment can be used to perform the above step S202, the block module 62 in this embodiment can be used to perform the above step S204, the first processing module 63 in this embodiment can be used to perform the above step S206, the second processing module 64 in this embodiment can be used to perform the above step S208, and the fusion module 65 in this embodiment can be used to perform the above step S210.

[0092] In addition to the modules described above, the apparatus in this embodiment may also include modules that perform any method as described in any of the embodiments of the multi-scale hybrid DR image enhancement method.

[0093] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should also be noted that the above modules, as part of a device, can operate in environments such as... Figure 1 The hardware environment shown can be implemented through software or hardware, and the hardware environment includes the network environment.

[0094] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described multi-scale hybrid DR image enhancement method is also provided. The electronic device may be a server, a terminal, or a combination thereof.

[0095] According to another embodiment of this application, an electronic device is also provided, comprising: Figure 7 As shown, the electronic device may include: a processor 1501, a communication interface 1502, a memory 1503, and a communication bus 1504, wherein the processor 1501, the communication interface 1502, and the memory 1503 communicate with each other through the communication bus 1504.

[0096] Memory 1503 is used to store computer programs; When processor 1501 executes the program stored in memory 1503, it performs the following steps: Step S202: Obtain the target image to be identified.

[0097] Step S204: Divide the target image into N blocks according to N different block scales to obtain a first block image corresponding to each block scale. The number of first block images obtained by dividing the target image into blocks according to different block scales is different.

[0098] Step S206: For each block scale, according to its corresponding contrast constraint, perform histogram equalization processing on each first block image corresponding to the block scale to obtain the corresponding second block image.

[0099] Step S208: For each block scale, perform edge smoothing processing on each second block image corresponding to that block scale to obtain the corresponding third block image.

[0100] Step S210: Fuse all third block images corresponding to N different block scales to obtain the enhanced image.

[0101] Optionally, in this embodiment, the communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used to represent it in the figure, but this does not mean that there is only one bus or one type of bus. The communication interface is used for communication between the aforementioned electronic device and other devices.

[0102] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0103] As an example, the memory 1503 described above may include, but is not limited to, the acquisition module 61, the block module 62, the first processing module 63, the second processing module 64, and the fusion module 65 of the multi-scale hybrid DR image enhancement device described above. Furthermore, it may include, but is not limited to, other module units of the multi-scale hybrid DR image enhancement device described above, which will not be elaborated in this example.

[0104] The processor mentioned above can be a general-purpose processor, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0105] This application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the method steps of the above method embodiments when it runs.

[0106] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.

[0107] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0108] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0109] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0110] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0111] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the solution provided in this embodiment, depending on actual needs.

[0112] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0113] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A multi-scale hybrid DR image enhancement method, characterized in that, include: Acquire the target image to be identified; The target image is divided into N blocks according to N different block scales to obtain a first block image corresponding to each block scale. The number of first block images obtained by dividing the target image into blocks according to different block scales is different. For each block scale, histogram equalization is performed on each first block image corresponding to that block scale according to its corresponding contrast constraint to obtain the corresponding second block image. For each block scale, edge smoothing is performed on each second block image corresponding to that block scale to obtain the corresponding third block image; The enhanced image is obtained by fusing all the third block images corresponding to N different block scales.

2. The method according to claim 1, characterized in that, For each block scale, according to its corresponding contrast constraint, histogram equalization processing is performed on each first block image corresponding to that block scale to obtain the corresponding second block image, including: The overall pixel grayscale value distribution of the first-level image is statistically analyzed to obtain a grayscale histogram, wherein the first-level image is the target image whose corresponding block scale is not divided. Based on the gray-level histogram, the first cumulative distribution function is calculated; According to the contrast limiting condition used to indicate no contrast limitation, and based on the first cumulative distribution function and the original gray value of each first pixel in the pixel gray value distribution, a first new gray value of each first pixel is determined. Based on the first new grayscale value of each first pixel, the global processing result corresponding to the first level image is determined, and the global processing result is used as the second block image corresponding to the first level image, and the second block image corresponding to the first level image is directly used as the third block image.

3. The method according to claim 1, characterized in that, For each block scale, according to its corresponding contrast constraint, histogram equalization processing is performed on each first block image corresponding to that block scale to obtain the corresponding second block image, including: The local pixel grayscale value distribution of each first block image in the secondary image is statistically analyzed to obtain the local grayscale histogram of each first block image, wherein the secondary image is the target image divided into multiple blocks according to the corresponding block scale; The gray-level probabilities exceeding the contrast limit threshold in the local gray-level histogram of each first block image are cropped, and the cropped probability quality is uniformly redistributed to all gray levels to obtain the local gray-level histogram after probability quality redistribution for each first block image. The second cumulative distribution function of each first block image is calculated based on the local gray-level histogram after probability quality redistribution corresponding to each first block image; Based on the second cumulative distribution function of each first block image and the original gray value of each second pixel in the local pixel gray value distribution, the new gray value of each second pixel is determined; Based on the new grayscale value of each second pixel, each second block image corresponding to the secondary image is determined.

4. The method according to claim 1, characterized in that, For each block scale, edge smoothing processing is performed on each second block image corresponding to that block scale to obtain the corresponding third block image, including: Based on the other second block images adjacent to each second block image, linear interpolation or bilinear interpolation is performed on the edge pixels of each second block image to obtain the third block image corresponding to each second block image.

5. The method according to claim 4, characterized in that, The step of performing linear interpolation or bilinear interpolation on the edge pixels of each second block image according to other second block images adjacent to each second block image includes: If there is only one other second block image adjacent to the edge pixel, linear interpolation is performed on the edge pixel based on the adjacent pixels located in the other second block image.

6. The method according to claim 4, characterized in that, The step of performing linear interpolation or bilinear interpolation on the edge pixels of each second block image according to other second block images adjacent to each second block image includes: When there are three other second-block images adjacent to the edge pixel, bilinear interpolation is performed on the edge pixel based on the three adjacent pixels located in the other second-block images.

7. The method according to any one of claims 1 to 6, characterized in that, The process of fusing all third block images corresponding to N different block scales to obtain the enhanced image includes: According to the first information proportion weight of the specified block scale and the second information proportion weight corresponding to each target block scale, the third block image corresponding to the specified block scale and the third block image corresponding to each target block scale are mixed to obtain the enhanced image. The information proportion weight is the proportion weight of grayscale information, the specified block scale is the block scale that does not divide the target image into multiple blocks, and the target block scale is the block scale that divides the target image into multiple blocks.

8. A multi-scale hybrid DR image enhancement device, characterized in that, include: The acquisition module is used to acquire the target image to be identified; The segmentation module is used to segment the target image into N blocks according to N different segmentation scales to obtain a first block image corresponding to each segmentation scale. The number of first block images obtained by segmenting the target image into blocks according to different segmentation scales is different. The first processing module is used to perform histogram equalization processing on each first block image corresponding to each block scale according to its corresponding contrast constraint, so as to obtain the corresponding second block image. The second processing module is used to perform edge smoothing processing on each second block image corresponding to each block scale to obtain the corresponding third block image. The fusion module is used to fuse all third block images corresponding to N different block scales to obtain the enhanced image.

9. An electronic device comprising a processor, a communication interface, a memory, and a communication bus, wherein, The processor, the communication interface, and the memory communicate with each other via the communication bus, characterized in that... The memory is used to store computer programs; The processor is configured to perform the method of any one of claims 1 to 7 by running the computer program stored in the memory.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 7 when run on a processor.