An optimization enhancement method for digital images in urology
The optimization method enhances renal CT images by segmenting and adaptively filtering based on renal medullary region analysis, addressing uneven enhancement and blurring issues in renal CT images, especially in diseased kidneys.
Patent Information
- Application Number
- CN202411237214.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-09-05
AI Technical Summary
Existing renal CT image enhancement methods using median filters are susceptible to window size variations and are ineffective in accurately observing the renal cortex and medulla, especially when kidney diseases cause uneven enhancement and blurring.
An optimization method that involves analyzing renal CT images at different stages, segmenting into blocks, identifying renal medullary regions, assessing noise performance and edge blur, and adaptively filtering based on grayscale dispersion and lesion influence to enhance image detail distinction.
Accurately enhances renal CT images by adaptively filtering, allowing clear observation of renal cortex and medulla structures, even in diseased kidneys.
Smart Images

Figure CN118761920B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to an optimization and enhancement method for urology digital images. Background Art
[0002] The main treatment scope of existing urology includes kidney diseases, and digital imaging includes CT technology; CT technology is a high-resolution imaging technology that can clearly display the internal structure of the kidney, especially the detailed anatomical structure and pathological conditions of the kidney. Renal enhanced CT is an imaging examination performed after intravenous injection of iodine-containing contrast agent, which can observe the enhancement of the renal cortex and medulla; Renal enhanced CT is usually divided into three stages: cortical phase, parenchymal phase and excretion phase; the scanning time of each stage is different, corresponding to different physiological processes and image characteristics.
[0003] The existing technology for enhancing the patient's renal CT images mainly uses a median filter to filter and denoise to achieve enhancement. However, the enhancement effect of the traditional median filter is easily affected by the window size. In addition, when the patient's kidney is diseased, the diseased area will cause the kidney enhanced CT effect to deteriorate and produce uneven enhancement, making it impossible to accurately observe the enhancement of the renal cortex and medulla. Summary of the invention
[0004] In order to solve the above problems, the present invention provides an optimization and enhancement method for urology digital images, the method comprising:
[0005] Obtain renal CT images of patients at different stages;
[0006] All renal CT images are divided into several image blocks; all renal medullary regions in the image blocks are obtained; the morphological characteristics and position distribution of the connected domains in the renal medullary regions are analyzed to obtain the noise performance of each renal medullary region; the regional grayscale dispersion of the renal medullary region is obtained according to the distribution difference of the grayscale values in the renal medullary regions; the edge blur of the renal medullary region is obtained according to the position distribution between the edge pixels in the renal medullary regions; the degree of influence of the renal medullary region by the lesion is obtained according to the change amplitude of the renal medullary region in different stages; the degree of medullary enhancement of the renal medullary region is obtained according to the degree of influence of the lesion and the difference in regional grayscale dispersion and edge blur between different renal medullary regions in the image blocks;
[0007] The noise performance and medullary enhancement of the renal medullary region are weightedly fused by the grayscale distribution in the renal medullary region to obtain the detail distinction of each renal medullary region; based on the detail distinction, the preferred degree of the image block under different filter window sizes is obtained;
[0008] According to the preferred degree, the image blocks are adaptively filtered to obtain filtered image blocks; and all filtered image blocks are fused to obtain an enhanced kidney CT image.
[0009] Preferably, the specific method of acquiring all renal medulla regions in the image block includes:
[0010] For any image block, the Canny edge detection algorithm is used to perform edge detection on the image block to obtain the edge detection result map of the image block; each pixel point with a gray value not equal to 0 in the edge detection result map is recorded as an initial edge pixel point; each closed area surrounded by all the initial edge pixels in the edge detection result map is recorded as the renal medulla area.
[0011] Preferably, the analyzing the morphological characteristics and position distribution of the connected domains in the renal medulla region to obtain the noise performance level of each renal medulla region includes the following specific methods:
[0012] For any image block, a gradient image of the image block is obtained, and a watershed segmentation algorithm is performed on the gradient image of the image block to obtain multiple regions of the image block, and each region is regarded as a connected domain; for any connected domain, if the mean value of the distance difference between all edge pixels of the connected domain and its centroid is less than or equal to a preset threshold, the connected domain is recorded as a suspected noise connected domain;
[0013] The product of the mean of the Euclidean distances between the centroids of all suspected noise connected domains in the image block and the total number of all suspected noise connected domains in the image block is taken as the noise representation degree of the image block.
[0014] Preferably, the grayscale dispersion of the renal medulla region is obtained according to the distribution difference of the grayscale value in the renal medulla region, and the specific method includes:
[0015] For any pixel in the renal medulla region, the square value of the difference between the grayscale value of the pixel and the mean grayscale value of all pixels in the renal medulla region is recorded as the first difference of the pixel; the product of the cumulative sum of the first differences of all pixels in the renal medulla region and the mean grayscale value of all pixels in the renal medulla region is taken as the regional grayscale dispersion of the renal medulla region.
[0016] Preferably, the edge blur of the renal medulla region is obtained according to the position distribution of edge pixels in the renal medulla region, and the specific method includes:
[0017] Get the normal vector of each edge pixel in the renal medulla region. edge pixels, The normal vector of the edge pixel is The square value of the difference between the normal vectors of edge pixels is recorded as The first square value of the edge pixel; The edge pixel and the The Euclidean distance between edge pixels is denoted as The first distance value of the edge pixel; The first square value of the edge pixel is The product of the first distance values of edge pixels is recorded as The edge change value of each edge pixel point is calculated; and the accumulated sum of the edge change values of all edge pixels in the renal medulla region is taken as the edge blur of the renal medulla region.
[0018] Preferably, the degree to which the renal medulla region is affected by the lesion is obtained according to the change amplitude of the renal medulla region at different stages, including the following specific methods:
[0019] The first The first image block in the stage The regional grayscale dispersion of the renal medulla region is related to the first The first image block in the stage The absolute value of the difference in the grayscale dispersion of the renal medulla region is recorded as The absolute value of the first difference in the stage period; the first The first image block in the stage The relationship between the edge blur of the renal medulla and the first The first image block in the stage The absolute value of the difference in edge blurriness of the renal medulla region is recorded as The absolute value of the second difference in the stage period; The absolute value of the first difference in the stage period and the The sum of the absolute values of the second differences in the stage period is recorded as The first sum value under the stage period; the cumulative sum of the first sum values under all stages of kidney enhanced CT is taken as the first The degree to which the medullary region of each kidney is affected by the lesion.
[0020] Preferably, the method of obtaining the medullary enhancement degree of the renal medullary region according to the degree of influence of the lesion and the difference in regional grayscale dispersion and edge blur between different renal medullary regions in the image block includes the following specific methods:
[0021] For any image block renal medullary region, The Euclidean distance between the renal medulla region and the centroid of the image block is recorded as The first distance between the medullary regions of the kidney; if any one of the medullary regions of the kidney is The first distance between the renal medulla regions is the same, and the renal medulla region is recorded as The reference renal medullary region for the first renal medullary region; The medullary region of the kidney A reference renal medullary region The reference renal medullary region and The absolute value of the difference in grayscale dispersion between the renal medulla regions is recorded as The grayscale information difference of the reference renal medulla region; The reference renal medullary region and The absolute value of the difference in edge blur between the renal medulla regions is recorded as The edge information difference of the reference renal medulla region; The sum of the edge information difference and grayscale information difference of the reference renal medulla region is recorded as The combined differences of the medullary regions of the first reference kidneys; The sum of the comprehensive differences of all reference renal medullary regions in the first renal medullary region is equal to the sum of the comprehensive differences of all reference renal medullary regions in the first renal medullary region. The product of the degree of influence of the lesion on the medullary region of the kidney is taken as the The degree of medullary enhancement in the medullary region of each kidney.
[0022] Preferably, the method of weighted fusion of the noise performance degree and medullary enhancement degree of the renal medullary region by the grayscale distribution in the renal medullary region to obtain the detail distinction degree of each renal medullary region includes the following specific methods:
[0023] For any renal medulla region of the image block, a window of any filter window size is constructed, and when the window slides in the renal medulla region at any time, all pixels in the window are scanned in a Z-shape to obtain a pixel point sequence of the window; the grayscale values of all pixels in the pixel point sequence of the window are fitted to obtain a grayscale fluctuation curve of the window;
[0024] According to the grayscale fluctuation curves of the window at all sliding times in the renal medulla region, the regional edge detail weight of the renal medulla region is obtained;
[0025] The product of the regional edge detail weight of the renal medulla region, the possibility that the image block belongs to the kidney edge and the noise representation degree of the image block is taken as the detail distinction degree of the renal medulla region.
[0026] Preferably, the method of obtaining the regional edge detail weight of the renal medulla region according to the grayscale fluctuation curve of the window at all sliding times in the renal medulla region includes the following specific methods:
[0027] For any sliding window in the renal medulla region, the maximum extreme value in the grayscale fluctuation curve of the window is recorded as the first extreme value of the window; the first extreme values of the window in all sliding times in the renal medulla region are fitted to obtain the regional edge detail curve of the renal medulla region;
[0028] The normalized value of the mean of all extreme values in the regional edge detail curve is used as the regional edge detail weight of the renal medulla region.
[0029] Preferably, the obtaining of the degree of preference of the image block under different filter window sizes according to the degree of detail distinction includes the following specific methods:
[0030] For any filter window size, if the detail distinction degree of any renal medulla region in the image block under the filter window size is greater than or equal to a preset parameter, the renal medulla region is recorded as a high detail region; if the detail distinction degree is less than the preset parameter, the renal medulla region is recorded as a low detail region;
[0031] The ratio of the number of high-detail areas of the image block under the filtering window size to the number of low-detail areas of the image block under the filtering window size is used as the preference degree of the image block under the filtering window size.
[0032] The beneficial effects of the technical solution of the present invention are as follows: the present invention obtains the degree of medullary enhancement of the renal medullary region according to the noise performance degree, regional grayscale dispersion, edge blur and degree of influence of the lesion in the renal medullary region; obtains the degree of detail distinction of each renal medullary region according to the degree of medullary enhancement; obtains the degree of preference of image blocks under different filter window sizes according to the degree of detail distinction; all filtered image blocks are fused to obtain an enhanced renal CT image; thereby, the renal CT images at different stages are denoised and enhanced by adaptively filtering windows, and the enhanced renal CT images at different stages are obtained, so that the enhancement of the renal cortex and medulla can be accurately observed. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 A flowchart of the steps of a method for optimizing and enhancing digital images of urology surgery according to the present invention;
[0035] Figure 2 The present invention is a characteristic relationship flow chart of a method for optimizing and enhancing digital images of urology. DETAILED DESCRIPTION
[0036] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the optimization and enhancement method for urology digital images proposed by the present invention, its specific implementation, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0037] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0038] The following is a detailed description of a specific scheme of the optimization and enhancement method for urology digital images provided by the present invention in conjunction with the accompanying drawings.
[0039] See also Figure 1 , which shows a flowchart of a method for optimizing and enhancing digital images of urology provided by an embodiment of the present invention, the method comprising the following steps:
[0040] Step S001: Acquire renal CT images of the patient at different stages.
[0041] It should be noted that renal enhanced CT is usually divided into three stages: cortical phase, parenchymal phase and excretory phase; the scanning time of each phase is different, corresponding to different physiological processes and image characteristics; the enhancement of renal parenchyma changes over time: in the cortical phase, the renal blood vessels, peripheral renal cortex and renal columns extending between the pyramids are significantly enhanced, while the medulla enhancement is not obvious, and the cortical-medullary boundary is obvious; in the parenchymal phase, the degree of medulla enhancement decreases, the medulla density increases, approaching the cortex and gradually exceeding the cortex.
[0042] Specifically, we first need to collect renal CT images of patients at different stages. The specific process is as follows:
[0043] Renal CT images of patients at different stages were obtained using renal enhanced CT technology.
[0044] Among them, kidney enhanced CT technology is an existing technology and will not be described in detail in this embodiment.
[0045] So far, the renal CT images of the patient at different stages are obtained through the above method.
[0046] Step S002: Divide all renal CT images into several image blocks; obtain all renal medullary regions in the image blocks; analyze the morphological characteristics and position distribution of connected domains in the renal medullary regions to obtain the noise performance of each renal medullary region; obtain the regional grayscale dispersion of the renal medullary region according to the distribution difference of grayscale values in the renal medullary region; obtain the edge blur of the renal medullary region according to the position distribution between edge pixels in the renal medullary region; obtain the degree of influence of the renal medullary region by the lesion according to the change amplitude of the renal medullary region in different stages; obtain the degree of medullary enhancement of the renal medullary region according to the degree of influence of the lesion and the difference in regional grayscale dispersion and edge blur between different renal medullary regions in the image blocks.
[0047] It should be noted that in kidney CT images, glomerular cells are often mistaken for noise because of the similar grayscale features between noise and glomerular cells; in renal CT images at the cortical stage, there are usually lesions, which make the renal medullary region show uneven enhancement in renal enhanced CT, that is, its internal grayscale distribution is relatively dispersed, with a relatively blurred edge; in different stages of renal enhanced CT, the edge fuzziness and regional grayscale dispersion of the renal cortex and medulla first decrease and then increase, but due to the influence of the lesion area, the degree of change in patients is greater than that in normal people; due to the structural distribution of the cortex and medulla on the kidney, different renal medulla regions in the image block on the same image at the same enhancement stage have similar characteristics of grayscale information and edge information.
[0048] 1. Divide all renal CT images into several image blocks and obtain all renal medullary areas in the image blocks.
[0049] It should be noted that by performing image segmentation operations on renal CT images, image segmentation can reduce the amount and complexity of calculations and improve the overall calculation efficiency of the image; and image segmentation can accurately control the area to be processed, providing reasonable conditions for subsequent adaptive enhancement of image blocks with different filter windows.
[0050] Preferably, a parameter is preset , wherein this embodiment is based on This example is described as an example, and this embodiment is not specifically limited. It depends on the specific implementation situation.
[0051] For any period of renal CT images, use the preset size The sliding window is performed on the renal CT image with a step size of A sliding window operation is performed to obtain a plurality of windows, and each window is used as an image block to obtain a plurality of image blocks of the kidney CT image; wherein, in order to enable the sliding window to evenly divide the kidney CT image into a plurality of windows, the size of the sliding window is set to a common factor of the size of the kidney CT image.
[0052] Preferably, for any image block, the Canny edge detection algorithm is used to perform edge detection on the image block to obtain an edge detection result map of the image block; each pixel point with a grayscale value not equal to 0 in the edge detection result map is recorded as an initial edge pixel point; and each closed area enclosed by all the initial edge pixels in the edge detection result map is recorded as a renal medulla area.
[0053] Among them, the Canny edge detection algorithm is a prior art and will not be described in detail in this embodiment.
[0054] At this point, all renal medulla regions in the image block are obtained.
[0055] 2. Obtain the noise performance level of each renal medullary region.
[0056] It should be noted that, as glomerular cells are one of the important components of renal tissue cells, in renal CT images, noise is often mistaken for glomerular cells because of their similar grayscale characteristics. For glomerular cells, their shape is elliptical, the internal grayscale distribution is relatively consistent, there are obvious edges, the overall shape is closed, and the distribution is concentrated. For noise, although the internal grayscale distribution is relatively consistent, its shape is circular and the distribution is relatively discrete.
[0057] Preferably, in some implementations of the embodiments of the present invention, by analyzing the morphological characteristics and position distribution of the connected domains in the renal medulla region, a specific method for obtaining the noise performance level of each renal medulla region is:
[0058] For any image block, a gradient image of the image block is obtained, and a watershed segmentation algorithm is performed on the gradient image of the image block to obtain multiple regions of the image block, and each region is regarded as a connected domain; for any connected domain, if the mean value of the distance difference between all edge pixels of the connected domain and its centroid is less than or equal to a preset threshold, the connected domain is recorded as a suspected noise connected domain;
[0059] The product of the mean of the Euclidean distances between the centroids of all suspected noise connected domains in the image block and the total number of all suspected noise connected domains in the image block is taken as the noise representation degree of the image block.
[0060] The specific formula is:
[0061]
[0062] In the formula, Indicates the degree of noise performance in the renal medullary region; represents the total number of all suspected noise connected domains in the renal medulla region; Represents the mean of the Euclidean distances between the centroids of all suspected noise connected domains in the renal medulla region.
[0063] Thus, the noise performance level of the renal medulla region is obtained.
[0064] 3. Obtain the regional grayscale dispersion and edge blur of the renal medulla region.
[0065] It should be noted that in the renal CT images at the cortical stage, there are usually lesions, which makes the renal medullary area appear unevenly enhanced in renal enhanced CT, that is, its internal grayscale distribution is more dispersed and has a more blurred edge.
[0066] Preferably, in some implementations of the embodiments of the present invention, according to the distribution difference of the grayscale values in the renal medulla region, the specific method for obtaining the regional grayscale dispersion of the renal medulla region is:
[0067] For any pixel in the renal medulla region, the square value of the difference between the grayscale value of the pixel and the mean grayscale value of all pixels in the renal medulla region is recorded as the first difference of the pixel; the product of the cumulative sum of the first differences of all pixels in the renal medulla region and the mean grayscale value of all pixels in the renal medulla region is taken as the regional grayscale dispersion of the renal medulla region.
[0068] The specific formula is:
[0069]
[0070] In the formula, Represents the regional grayscale dispersion of the kidney medulla region; Represents the mean gray value of all pixels in the renal medulla region; Represents the number of all pixels in the renal medulla region; The renal medullary region The gray value of a pixel.
[0071] Preferably, in some implementations of the embodiments of the present invention, according to the position distribution of edge pixels in the renal medulla region, the specific method for obtaining the edge blur of the renal medulla region is:
[0072] Get the normal vector of each edge pixel in the renal medulla region. edge pixels, The normal vector of the edge pixel is The square value of the difference between the normal vectors of edge pixels is recorded as The first square value of the edge pixel; The edge pixel and the The Euclidean distance between edge pixels is denoted as The first distance value of the edge pixel; The first square value of the edge pixel is The product of the first distance values of edge pixels is recorded as The edge change value of each edge pixel point is calculated; and the accumulated sum of the edge change values of all edge pixels in the renal medulla region is taken as the edge blur of the renal medulla region.
[0073] The specific formula is:
[0074]
[0075] In the formula, Indicates the blurriness of the edges of the medullary region of the kidney; Represents the number of all edge pixels in the renal medulla region; Indicates the renal medullary region Normal vector of edge pixels; Indicates the renal medullary region The edge pixel and the The Euclidean distance between edge pixels; Indicates the renal medullary region The normal vector of each edge pixel.
[0076] At this point, the regional grayscale dispersion and edge blur of the renal medulla region are obtained.
[0077] 4. Obtain the degree of medullary enhancement in the medullary region of the kidney.
[0078] It should be noted that in the different stages of kidney enhanced CT, the renal cortex and medulla of normal people are first accumulated due to the effect of contrast agent, and the corresponding medulla will accumulate after a certain period of time. In the cortical period, the cortex and medulla will have a relatively obvious boundary due to the different accumulation of contrast agent, and their grayscale information will also have a clustering feature; in the parenchymal period, due to the gradual ineffectiveness of the contrast agent, the medulla will begin to disperse after a certain period of time, making the boundary between the cortex and medulla blurred, and the grayscale information of the medulla will have a discrete feature, that is, the enhancement degree of the boundary between the cortex and medulla is first obvious and then weakened, that is, the edge fuzziness and regional grayscale dispersion of the renal medulla area are first reduced and then increased; in patients with lesions, due to the poor accumulation effect of contrast agent caused by the influence of the lesion area, the boundary between the cortex and medulla has been unevenly enhanced, and the boundary between the cortex and medulla is very blurred, that is, the edge fuzziness and regional grayscale dispersion of the renal medulla area are also first reduced and then increased, but the degree of change is greater than that of normal patients.
[0079] Preferably, in some implementations of the embodiments of the present invention, according to the change amplitude of the renal medulla region at different stages, the specific method for obtaining the degree of influence of the renal medulla region by the lesion is:
[0080] The first The first image block in the stage The regional grayscale dispersion of the renal medulla region is related to the first The first image block in the stage The absolute value of the difference in the grayscale dispersion of the renal medulla region is recorded as The absolute value of the first difference in the stage period; the first The first image block in the stage The relationship between the edge blur of the renal medulla and the first The first image block in the stage The absolute value of the difference in edge blurriness of the renal medulla region is recorded as The absolute value of the second difference in the stage period; The absolute value of the first difference in the stage period and the The sum of the absolute values of the second differences in the stage period is recorded as The first sum value under the stage period; the cumulative sum of the first sum values under all stages of kidney enhanced CT is taken as the first The degree to which the medullary region of each kidney is affected by the lesion.
[0081] The specific formula is:
[0082]
[0083] In the formula, Indicates The extent to which the medullary region of each kidney is affected by the lesion; It represents the number of all phases of renal enhanced CT; Indicates the first The first image block in the stage The regional grayscale dispersion of each renal medulla region; Indicates the first The first image block in the stage The blurriness of the edges of the medullary regions of each kidney; Indicates the first The first image block in the stage The regional grayscale dispersion of each renal medulla region; Indicates the first The first image block in the stage The blurriness of the edges of the medullary regions of each kidney; Indicates taking the absolute value.
[0084] It should be noted that when performing renal enhanced CT, different renal medulla regions are in uneven enhancement, so the edge blur and regional grayscale dispersion between different renal medulla regions in the image block on the same image at the same enhancement stage are quite different; due to the structural distribution of the cortex and medulla on the kidney, the area composed of different renal medulla is similar to a circle, and the renal medulla region is uniformly enhanced due to the effect of the contrast agent, so that different renal medulla regions located in the same radius area in the image block on the same image at the same enhancement stage have similar characteristics of grayscale information and edge information.
[0085] Preferably, in some implementations of the embodiments of the present invention, according to the degree of influence of the lesion and the difference in regional grayscale dispersion and edge blur between different renal medulla regions in the image block, the specific method for obtaining the medulla enhancement degree of the renal medulla region is:
[0086] For any image block renal medullary region, The Euclidean distance between the renal medulla region and the centroid of the image block is recorded as The first distance between the medullary regions of the kidney; if any one of the medullary regions of the kidney is The first distance between the renal medulla regions is the same, and the renal medulla region is recorded as The reference renal medullary area of 1 renal medullary area;
[0087] For The medullary region of the kidney A reference renal medullary region The reference renal medullary region and The absolute value of the difference in grayscale dispersion between the renal medulla regions is recorded as The grayscale information difference of the reference renal medulla region; The reference renal medullary region and The absolute value of the difference in edge blur between the renal medulla regions is recorded as The edge information difference of the reference renal medulla region; The sum of the edge information difference and grayscale information difference of the reference renal medulla region is recorded as The combined differences of the medullary regions of the first reference kidneys; The sum of the comprehensive differences of all reference renal medullary regions in the first renal medullary region is equal to the sum of the comprehensive differences of all reference renal medullary regions in the first renal medullary region. The product of the degree of influence of the lesion on the medullary region of the kidney is taken as the The degree of medullary enhancement in the medullary region of each kidney.
[0088] The specific formula is:
[0089]
[0090] In the formula, Indicates The degree of medullary enhancement in each renal medullary region; Indicates The total number of all reference kidney medullary regions in the kidney medullary regions; Indicates The medullary region of the kidney The regional grayscale dispersion of the reference kidney medulla region; Indicates the image block The regional grayscale dispersion of each renal medulla region; Indicates The medullary region of the kidney The edge blurriness of the reference kidney medullary region; Indicates the image block The blurriness of the edges of the medullary regions of each kidney; Indicates taking the absolute value.
[0091] It should be noted that This reflects that the renal medulla area is affected by the diseased area, resulting in a small difference between the renal medulla and cortex. Therefore, it is necessary to increase the enhancement effect of the renal medulla area.
[0092] At this point, the degree of medullary enhancement in the renal medullary region is obtained through the above method.
[0093] Step S003: weighted fusion of the noise performance and medullary enhancement of the renal medullary region is performed based on the grayscale distribution in the renal medullary region to obtain the detail distinction of each renal medullary region; and based on the detail distinction, the preferred degree of the image block under different filter window sizes is obtained.
[0094] It should be noted that since the renal medulla area appears as a dark area in the renal CT image, in order to accurately distinguish the renal cortex and medulla, the detailed structure of the renal cortex and medulla should be retained as much as possible, and the window size of the median filter will be dynamically and adaptively adjusted according to the degree of noise expression and the degree of detail distinction, so that the image noise density is small but the degree of detail distinction is high.
[0095] It should be noted that, due to the conventional method of selecting central pixels by median filtering, it is impossible to reflect the characteristics of the region with low image noise density but high detail distinction; among them, the noise is randomly distributed, so it has no effect on the selection method, while the edge needs to be selected in a correct way to reflect the edge detail structure of the cortex and medulla. Therefore, according to the distribution of the grayscale value of each pixel in the renal medulla region, a sequence of pixel grayscale extreme values is constructed when the window slides in the renal medulla region, so that it reflects the influence of noise and the influence of the edge detail structure of the cortex and medulla when the window slides in the region; according to the grayscale difference between each adjacent pixel in the pixel sequence of the renal medulla region, the noise expression degree and the medulla enhancement degree are weightedly fused to obtain the detail distinction degree of the renal medulla region in the image block.
[0096] Preferably, in some implementations of the embodiments of the present invention, the noise performance degree and medullary enhancement degree of the renal medullary region are weightedly fused according to the grayscale distribution in the renal medullary region, and the specific method for obtaining the detail distinction degree of each renal medullary region is:
[0097] For any renal medulla region of the image block, a window of any filter window size is constructed, and when the window slides in the renal medulla region at any time, all pixels in the window are scanned in a Z-shape to obtain a pixel point sequence of the window; the grayscale values of all pixels in the pixel point sequence of the window are fitted to obtain a grayscale fluctuation curve of the window;
[0098] According to the grayscale fluctuation curves of the window at all sliding times in the renal medulla region, the regional edge detail weight of the renal medulla region is obtained;
[0099] The product of the regional edge detail weight of the renal medulla region, the possibility that the image block belongs to the kidney edge and the noise representation degree of the image block is taken as the detail distinction degree of the renal medulla region.
[0100] The specific formula is:
[0101]
[0102] In the formula, Indicates the degree of detail differentiation of the renal medullary region; Indicates the degree of medullary enhancement of the image block; Indicates the degree of noise representation of the image block; Represents the weight of regional edge details.
[0103] Preferably, in some implementations of the embodiments of the present invention, the specific method for obtaining the regional edge detail weight of the renal medulla region according to the grayscale fluctuation curve of the window at all sliding times in the renal medulla region is:
[0104] For any sliding window in the renal medulla region, the maximum extreme value in the grayscale fluctuation curve of the window is recorded as the first extreme value of the window; the first extreme values of the window in all sliding times in the renal medulla region are fitted to obtain the regional edge detail curve of the renal medulla region;
[0105] The normalized value of the mean of all extreme values in the regional edge detail curve is used as the regional edge detail weight of the renal medulla region.
[0106] The specific formula is:
[0107]
[0108] In the formula, Indicates the number of extreme points in the area edge detail curve; Indicates the area edge detail curve extreme values; represents the linear normalization function; Represents the weight of regional edge details.
[0109] It should be noted that the greater the weight of the regional edge detail, the more drastic the fluctuation of the extreme value of the edge detail curve of the renal medulla region, and the greater the degree of detail distinction of the renal medulla region; the smaller the value, the more the extreme value of the regional edge detail curve is affected by noise.
[0110] At this point, the degree of detail differentiation of the renal medullary region is obtained.
[0111] Preferably, in some implementations of the embodiments of the present invention, the specific method for obtaining the preferred degree of the image block under different filter window sizes according to the detail distinction degree is:
[0112] Preset a threshold parameter , wherein this embodiment is based on This example is described as an example, and this embodiment is not specifically limited. It depends on the specific implementation situation.
[0113] For any filter window size, if the detail distinction of any renal medulla region in the image block under the filter window size is greater than or equal to the threshold parameter , the renal medulla region is recorded as a high detail region; if the detail distinction is less than the threshold parameter , the renal medulla region is recorded as a low-detail region;
[0114] The ratio of the number of high-detail areas of the image block under the filtering window size to the number of low-detail areas of the image block under the filtering window size is used as the preference degree of the image block under the filtering window size.
[0115] So far, the optimization degree of each image block under each filter window size is obtained through the above method.
[0116] Step S004: According to the optimization degree, adaptively filter the image blocks to obtain filtered image blocks; fuse all filtered image blocks to obtain an enhanced kidney CT image.
[0117] It should be noted that the larger the value of the preferred degree of each image block under different filter window sizes, the better the effect of distinguishing the cortex and medulla of the image block under the filter window size, and therefore the greater the possibility of selecting the filter window size. Then, the preferred degree of the image block under each filter window size can be used to complete the adaptive filter window size screening of each image block.
[0118] Preferably, for any image block, the filter window size with the highest degree of preference is selected as the optimal filter window size of the image block; a median filter operation is performed on the image block according to the optimal filter window size to obtain a filtered image block; and all image blocks are fused using an image block fusion algorithm based on guided filtering to obtain an enhanced kidney CT image.
[0119] See also Figure 2 , which shows a characteristic relationship flow chart of an optimization enhancement method for urology digital images.
[0120] At this point, this embodiment is completed.
[0121] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for optimizing and enhancing digital images of urology, characterized in that: The method comprises the following steps: Obtain renal CT images of patients at different stages; All renal CT images are divided into several image blocks; all renal medullary regions in the image blocks are obtained; the morphological characteristics and position distribution of the connected domains in the renal medullary regions are analyzed to obtain the noise performance of each renal medullary region; the regional grayscale dispersion of the renal medullary region is obtained according to the distribution difference of the grayscale values in the renal medullary regions; the edge blur of the renal medullary region is obtained according to the position distribution between the edge pixels in the renal medullary regions; the degree of influence of the renal medullary region by the lesion is obtained according to the change amplitude of the renal medullary region in different stages; the degree of medullary enhancement of the renal medullary region is obtained according to the degree of influence of the lesion and the difference in regional grayscale dispersion and edge blur between different renal medullary regions in the image blocks; The noise performance and medullary enhancement of the renal medullary region are weightedly fused by the grayscale distribution in the renal medullary region to obtain the detail distinction of each renal medullary region; based on the detail distinction, the preferred degree of the image block under different filter window sizes is obtained; According to the preferred degree, adaptively filtering the image blocks to obtain filtered image blocks; fusing all filtered image blocks to obtain an enhanced kidney CT image; The specific method of analyzing the morphological characteristics and position distribution of the connected domains in the renal medulla region to obtain the noise performance level of each renal medulla region includes: For any image block, a gradient image of the image block is obtained, and a watershed segmentation algorithm is performed on the gradient image of the image block to obtain multiple regions of the image block, and each region is regarded as a connected domain; for any connected domain, if the mean value of the distance difference between all edge pixels of the connected domain and its centroid is less than or equal to a preset threshold, the connected domain is recorded as a suspected noise connected domain; The product of the mean of the Euclidean distances between the centroids of all suspected noise connected domains in the image block and the total number of all suspected noise connected domains in the image block is taken as the noise representation degree of the image block; The specific method of obtaining the regional grayscale dispersion of the renal medulla region according to the distribution difference of the grayscale value in the renal medulla region is as follows: For any pixel in the renal medulla region, the square value of the difference between the gray value of the pixel and the mean gray value of all pixels in the renal medulla region is recorded as the first difference of the pixel; the product of the cumulative sum of the first differences of all pixels in the renal medulla region and the mean gray value of all pixels in the renal medulla region is recorded as the regional gray dispersion of the renal medulla region; The method of obtaining the edge blur of the renal medulla region according to the position distribution of edge pixels in the renal medulla region includes: Get the normal vector of each edge pixel in the renal medulla region. edge pixels, The normal vector of the edge pixel is The square value of the difference between the normal vectors of edge pixels is recorded as The first square value of the edge pixel; The edge pixels and The Euclidean distance between edge pixels is denoted as The first distance value of the edge pixel; The first square value of the edge pixel is The product of the first distance values of edge pixels is recorded as The edge change value of each edge pixel point is calculated; the cumulative sum of the edge change values of all edge pixels in the renal medulla region is used as the edge fuzziness of the renal medulla region; The specific method of obtaining the degree of influence of the renal medulla region on the lesion according to the change amplitude of the renal medulla region at different stages is as follows: The first The first image block in the stage The regional grayscale dispersion of the renal medulla region is related to the first The first image block in the stage The absolute value of the difference in the grayscale dispersion of the renal medulla region is recorded as The absolute value of the first difference in the stage period; the first The first image block in the stage The relationship between the edge blur of the renal medulla and the first The first image block in the stage The absolute value of the difference in edge blurriness of the renal medulla region is recorded as The absolute value of the second difference in the stage period; The absolute value of the first difference in the stage period and the The sum of the absolute values of the second differences under the stage period is recorded as The first sum value under the stage period; the cumulative sum of the first sum values under all stages of kidney enhanced CT is taken as the first The extent to which the medullary region of each kidney is affected by the lesion; The method of obtaining the medullary enhancement degree of the renal medullary region according to the degree of influence of the lesion and the difference in regional grayscale dispersion and edge blur between different renal medullary regions in the image block includes the following specific methods: For any image block renal medullary region, The Euclidean distance between the renal medulla region and the centroid of the image block is recorded as The first distance between the medullary regions of the kidney; if any one of the medullary regions of the kidney is The first distance between the renal medulla regions is the same, and the renal medulla region is recorded as The reference renal medullary region for the first renal medullary region; The medullary region of the kidney A reference renal medullary region The reference renal medullary region and The absolute value of the difference in grayscale dispersion between the renal medulla regions is recorded as The grayscale information difference of the reference renal medulla region; The reference renal medullary region and The absolute value of the difference in edge blur between the renal medulla regions is recorded as The edge information difference of the reference renal medulla region; The sum of the edge information difference and grayscale information difference of the reference renal medulla region is recorded as The combined differences of the medullary regions of the first reference kidneys; The sum of the combined differences of all reference renal medullary regions in the first renal medullary region is equal to the sum of the combined differences of all reference renal medullary regions in the first renal medullary region. The product of the degree of influence of the lesion on the medullary region of the kidney is taken as the The degree of medullary enhancement in each renal medullary region; The method of weighted fusion of the noise performance degree and medullary enhancement degree of the renal medullary region by the grayscale distribution in the renal medullary region to obtain the detail distinction degree of each renal medullary region includes: For any renal medulla region of the image block, a window of any filter window size is constructed, and when the window slides in the renal medulla region at any time, all pixels in the window are scanned in a Z-shape to obtain a pixel point sequence of the window; the grayscale values of all pixels in the pixel point sequence of the window are fitted to obtain a grayscale fluctuation curve of the window; According to the grayscale fluctuation curves of the window at all sliding times in the renal medulla region, the regional edge detail weight of the renal medulla region is obtained; The product of the regional edge detail weight of the renal medulla region, the possibility that the image block belongs to the kidney edge and the noise performance degree of the image block is used as the detail distinction degree of the renal medulla region; The specific method of obtaining the regional edge detail weight of the renal medulla region according to the grayscale fluctuation curve of the window during all sliding times in the renal medulla region is as follows: For any sliding window in the renal medulla region, the maximum extreme value in the grayscale fluctuation curve of the window is recorded as the first extreme value of the window; the first extreme values of the window in all sliding times in the renal medulla region are fitted to obtain the regional edge detail curve of the renal medulla region; The normalized value of the mean of all extreme values in the regional edge detail curve is used as the regional edge detail weight of the renal medulla region.
2. The optimization and enhancement method for urology digital images according to claim 1, characterized in that: The specific method of obtaining all renal medulla regions in the image block includes: For any image block, the Canny edge detection algorithm is used to perform edge detection on the image block to obtain the edge detection result map of the image block; each pixel point with a gray value not equal to 0 in the edge detection result map is recorded as an initial edge pixel point; each closed area surrounded by all the initial edge pixels in the edge detection result map is recorded as the renal medulla area.
3. The optimization and enhancement method for urology digital images according to claim 1, characterized in that: The specific method of obtaining the preferred degree of the image block under different filter window sizes according to the detail distinction degree is as follows: For any filter window size, if the detail distinction degree of any renal medulla region in the image block under the filter window size is greater than or equal to a preset parameter, the renal medulla region is recorded as a high detail region; if the detail distinction degree is less than the preset parameter, the renal medulla region is recorded as a low detail region; The ratio of the number of high-detail areas of the image block under the filtering window size to the number of low-detail areas of the image block under the filtering window size is used as the preference degree of the image block under the filtering window size.
Citation Information
Patent Citations
Tumor CT image area dynamic enhancement method based on image features
CN117408929A
Ultrasonic image assisted positioning method based on machine vision
CN117974652A
Tumor radio frequency accurate ablation system based on CT image
CN118314067A
Diabetes kidney image intelligent classification method
CN118314393A
Image information enhancing method, for use in radiography, involves normalizing acquired image to form normalized image, and enhancing contrast of threshold-processed image by non-linear function to form contrast-enhanced image
DE102006029512A1
