Medical image processing method and system based on image processing

By adjusting texture information on medical images, the problem of image enhancement damage to texture information is solved and the accuracy of diagnosis is improved.

CN119228703BActive Publication Date: 2025-03-11SHAANXI RUNZHICHEN IND CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411713255.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-11
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

When the prior art enhances the image of medical images, it is easy to lead to loss and change of texture information, affecting the accuracy of diagnosis.

Method used

By adjusting the grayscale value of pixels whose texture information has changed in the image before and after the enhancement, using the corrected reference pixel and grayscale value stretching technology, it is ensured that the adjusted grayscale value more accurately reflects the texture information in the image.

Benefits of technology

It effectively prevents image enhancement from destroying texture information, improves the accuracy of texture information extraction, and ensures the reliability of diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228703B_ABST
    Figure CN119228703B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing, and in particular to a medical image processing method and system based on image processing. The method comprises the steps of: acquiring a medical image; performing enhancement processing on the medical image to obtain an enhanced image; obtaining a binary image of the medical image and the enhanced image; using pixels with differences in the binary image of the medical image and the enhanced image as texture-changed pixels; judging whether there is a correction reference pixel; if there is a correction reference pixel, using the grayscale value of the correction reference pixel that is most similar to the texture-changed pixel in the enhanced image as the adjusted grayscale value of the texture-changed pixel; if there is no correction reference pixel, calculating the adjusted grayscale value of the texture-changed pixel; and using the grayscale value of the texture-changed pixel as the adjusted grayscale value to obtain a final enhanced image. By adjusting the grayscale value of the enhanced texture-changed pixel, the influence of image enhancement on texture information is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a medical image processing method and system based on image processing. Background Art

[0002] The information carried in medical images plays an important role in disease diagnosis. If the imaging effect of medical images is poor, the information carried in medical images is difficult to be identified. In order to make medical images better present the information they carry, the imaging effect of medical images needs to be improved. Image enhancement can effectively improve the imaging effect, so image enhancement can be used to improve the imaging quality of medical images.

[0003] The histogram equalization method is a simple image enhancement algorithm with good effect of improving the imaging effect of medical images. It realizes image enhancement by balancing the pixel amount of each gray level. When the histogram equalization algorithm balances the pixel amount of each gray level, some gray levels will be merged, and the gray level merging will lose the information carried by each gray level. The loss of gray level information will cause some textures to change, such as partial texture loss or partial texture area reduction. The information carried by each texture information in the medical image is different. Texture changes will lead to partial information loss, and the missing information is likely to affect the doctor's diagnosis. Therefore, how to reduce the impact of image enhancement on texture information becomes the research focus of the present invention.

[0004] A method for preprocessing medical image data is disclosed in a patent application document with publication number CN114822780A. The patent application document uses an existing enhancement method to enhance the medical image, but does not consider the effect of image enhancement on texture. Therefore, the method in the patent application document cannot solve the technical problem in the present invention. Summary of the invention

[0005] In order to solve the problem of how to reduce the influence of image enhancement on texture information, the present invention provides a medical image processing method and system based on image processing.

[0006] In a first aspect, the present invention provides a medical image processing method based on image processing, which adopts the following technical solution:

[0007] The medical image processing method based on image processing comprises the following steps:

[0008] Collect medical imaging images;

[0009] Performing enhancement processing on the medical image to obtain an enhanced image; performing threshold segmentation on the medical image and the enhanced image to obtain respective corresponding binary images;

[0010] The pixels with differences in the binary images of the medical image and the enhanced image are taken as texture-changed pixels; the connected domain analysis is performed on the binary images of the medical image and the enhanced image respectively, and the connected domain to which the texture-changed pixels belong is obtained in the binary image of the medical image, recorded as the real connected domain, and it is determined whether there is a corrected reference pixel, the corrected reference pixel is a pixel in the pixel area corresponding to the real connected domain of the binary image of the enhanced image, and has a different value from the texture-changed pixel; if there is a corrected reference pixel, the corrected reference pixel with the smallest grayscale value difference from the texture-changed pixel is obtained in the medical image, and its grayscale value in the enhanced image is used as the adjusted grayscale value of the texture-changed pixel; if there is no corrected reference pixel, the adjusted grayscale value of the texture-changed pixel is calculated , , represents the gray value of the texture-changed pixel in the medical image, Represent the gray value of the i-th pixel in the enhanced image and the medical imaging image, respectively. Represents the number of pixels in a medical image. It represents the mean gray value of the pixels that do not belong to the real connected domain and are adjacent to the edge of the real connected domain. Indicates rounding up. represents a limit function, which can replace the original data with data whose values ​​are between [0,255], replace the data whose values ​​are greater than 255 with 255, and replace the data whose values ​​are less than 0 with 0;

[0011] The grayscale values ​​of the texture-changed pixels in the medical image are replaced with the adjusted grayscale values ​​to obtain the final enhanced image.

[0012] The present invention adjusts the grayscale values ​​of pixels whose texture information has changed in the image before and after enhancement, thereby effectively preventing the problem of texture change caused by image enhancement; further, when adjusting the texture-changed pixels, the adjustment is performed according to different situations, so that the adjusted grayscale value can more accurately reflect the texture information in the image; further, when adjusting the texture-changed pixels, if there are corrected reference pixels, the grayscale values ​​of the corrected reference pixels that can better represent the texture information corresponding to the texture-changed pixels are used for adjustment, so that the adjusted grayscale value can more accurately present the texture information in the image; further, when adjusting the texture-changed pixels, if there are no corrected reference pixels, the texture-changed pixels are adjusted according to the grayscale value stretching situation of the image before and after enhancement in the image, so that the adjusted grayscale value can not only better reflect the texture information situation, but also make the image information after adjustment more consistent with the image information of the overall image, thereby avoiding the problem of image disharmony caused by the adjustment.

[0013] Preferably, the step of performing threshold segmentation on the medical imaging image and the enhanced image to obtain respective corresponding binary images comprises:

[0014] Taking each pixel in the medical image as the center, a square window with a preset side length is obtained, taking any pixel as the target pixel, obtaining several windows containing the target pixel as reference windows, performing threshold segmentation processing on the reference window to obtain a binary image of the reference window, counting the grayscale values ​​of the target pixel in the binary images of all reference windows, and taking the grayscale value with the highest frequency as the segmented value of the target pixel in the medical image; taking the image composed of the segmented values ​​of the medical image as the binary image of the medical image;

[0015] Get the binary image of the enhanced image.

[0016] The present invention effectively avoids the inconsistency of segmentation thresholds caused by differences in brightness of different regions through regional enhancement processing, thereby extracting texture information more accurately; further, by referring to the segmentation results of multiple reference windows, the final segmentation result of the pixel is determined. This method can effectively avoid the problem of incomplete extraction of texture information caused by inaccurate selection of surrounding pixels, thereby improving the accuracy of texture information extraction.

[0017] Preferably, the method for obtaining the preset side length includes:

[0018] Perform threshold segmentation on the medical image to obtain an initial binary image. Consecutive pixels with a grayscale value of 255 in each row of the initial binary image form a row pixel segment. The average length of all row pixel segments in all rows is calculated and recorded as the row continuous length.

[0019] The continuous pixels with grayscale values ​​of 255 in each column of the initial binary image form a column pixel segment, and the average of the lengths of all column pixel segments in all columns is calculated and recorded as the column continuous length;

[0020] The cumulative sum of the row continuous length and the column continuous length is taken as the preset side length.

[0021] The present invention introduces row and column continuous lengths to reflect the continuous length of the texture when calculating the preset side length, so that the preset side length calculated in this way can be greater than the texture length, so that the window extracted based on the preset side length can include both texture information and background information, thereby providing a basis for accurate texture extraction.

[0022] Preferably, the step of performing enhancement processing on the medical image to obtain an enhanced image includes:

[0023] The histogram equalization method is used to enhance the medical image to obtain the enhanced image.

[0024] Preferably, the taking pixels having differences in the binary image between the medical imaging image and the enhanced image as texture-changed pixels comprises:

[0025] The grayscale values ​​of pixels at corresponding positions of the binary image of the medical imaging image and the binary image of the enhanced image are compared, and pixels with different grayscale values ​​are regarded as texture-changed pixels.

[0026] The present invention extracts texture-changed pixels by comparing grayscale values, and the extraction method is simpler and more efficient.

[0027] Preferably, the connecting domain analysis is performed on the binary images of the medical imaging image and the enhanced image respectively, including:

[0028] Connected domain analysis is performed on pixels with grayscale values ​​of 255 in binary images of medical imaging images to obtain several positive connected domains;

[0029] Conducting connected domain analysis on pixels with gray value 0 in binary images of medical imaging images to obtain several negative connected domains;

[0030] Get the positive connected domain and negative connected domain of the binary image of the enhanced image.

[0031] In a second aspect, the present invention provides a medical image processing system based on image processing, which adopts the following technical solution:

[0032] The medical image processing system based on image processing comprises: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the medical image processing method based on image processing is implemented.

[0033] By adopting the above technical solution, the above-mentioned medical image processing method based on image processing is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a terminal device based on the memory and the processor for easy use.

[0034] The present invention has the following technical effects:

[0035] The present invention adjusts the grayscale values ​​of pixels whose texture information is changed in the image before and after enhancement, thereby effectively preventing the problem of texture change caused by image enhancement.

[0036] Furthermore, when adjusting the texture-changed pixels, the adjustments are made according to the situation, so that the adjusted grayscale values ​​more accurately reflect the texture information in the image;

[0037] Furthermore, when adjusting the texture-changed pixel, if there is a corrected reference pixel, the grayscale value of the corrected reference pixel that can better represent the texture information corresponding to the texture-changed pixel is used for adjustment, so that the adjusted grayscale value can more accurately present the texture information in the image;

[0038] Furthermore, when adjusting the texture-changed pixels, if there is no corrected reference pixel, the texture-changed pixels are adjusted according to the grayscale value stretching of the image before and after enhancement, so that the adjusted grayscale value can not only better reflect the texture information, but also make the image information after adjustment more consistent with the overall image, thereby avoiding the image disharmony problem caused by the adjustment. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts.

[0040] Figure 1 is a flow chart of a method in a medical image processing method based on image processing according to an embodiment of the present invention;

[0041] Figure 2 A schematic diagram of connected domains in a medical image and an enhanced image provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0043] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.

[0044] The present invention discloses a medical image processing method based on image processing, referring to Figure 1 , comprising steps S1 to S4:

[0045] S1: Collect medical imaging images.

[0046] Specifically, a medical image is obtained from a medical image library, and the medical image may be an X-ray image, an ultrasound image, or a nuclear magnetic resonance image.

[0047] S2: Performing enhancement processing on the medical image to obtain an enhanced image; performing threshold segmentation processing on the medical image and the enhanced image to obtain their respective corresponding binary images.

[0048] S20: Performing enhancement processing on the medical image to obtain an enhanced image.

[0049] It should be noted that in order to analyze the impact of image enhancement on texture information, the image needs to be enhanced first.

[0050] Preferably, as an example, performing enhancement processing on a medical image to obtain an enhanced image includes:

[0051] The histogram equalization method is used to enhance the medical image to obtain the enhanced image.

[0052] S21: Perform threshold segmentation on the medical imaging image and the enhanced image to obtain their respective corresponding binary images.

[0053] It should be noted that in order to analyze the changes in texture information of medical images before and after enhancement, it is necessary to extract texture information from the medical images before and after enhancement. In this embodiment, texture information in the image is extracted by image segmentation.

[0054] Optionally, as an example, threshold segmentation is performed on the medical imaging image and the enhanced image to obtain respective corresponding binary images, including:

[0055] The medical image is processed using the Otsu threshold method to obtain a segmentation threshold. The grayscale values ​​of pixels in the medical image whose grayscale values ​​are greater than the segmentation threshold are set to 255, and the grayscale values ​​of pixels whose grayscale values ​​are less than the segmentation threshold are set to 0, thereby obtaining a binary image of the medical image.

[0056] In the same way, the enhanced image is processed using the Otsu threshold method to obtain a binary image of the enhanced image.

[0057] It should be noted that due to the difference in brightness of each area, some areas require a smaller threshold to segment the texture, while some areas require a larger threshold to segment the texture. Therefore, segmenting the entire image using one threshold can easily cause some areas to be over-segmented and some areas to be under-segmented. In other words, some areas that are not textures are extracted in some areas, while some areas that belong to textures are not extracted in some areas. Therefore, in order to solve this problem, segmentation processing needs to be performed by region.

[0058] It should be further explained that texture information is generally obtained by the grayscale value difference between each pixel and the surrounding pixels, so some surrounding pixels need to be selected as comparison objects to extract texture information. Since it is unknown which surrounding pixels have better texture performance relative to the pixel, the final texture of the pixel is determined based on the texture information extracted from a variety of different surrounding pixels.

[0059] Preferably, as an example, threshold segmentation is performed on the medical image and the enhanced image to obtain respective corresponding binary images, including:

[0060] Perform threshold segmentation on the medical image to obtain an initial binary image. Consecutive pixels with a grayscale value of 255 in each row of the initial binary image form a row pixel segment. The average length of all row pixel segments in all rows is calculated and recorded as the row continuous length.

[0061] The continuous pixels with grayscale values ​​of 255 in each column of the initial binary image form a column pixel segment, and the average of the lengths of all column pixel segments in all columns is calculated and recorded as the column continuous length;

[0062] The cumulative sum of the row continuous length and the column continuous length is taken as the preset side length.

[0063] It is understandable that texture information can be better extracted only when the surrounding pixels include both background pixels and texture pixels. Therefore, by analyzing the continuous length of the texture and setting the window size according to the continuous length of the texture, the surrounding pixels extracted in the window include both background pixels and texture pixels.

[0064] Taking each pixel in the medical image as the center, a square window with a preset side length is obtained, taking any pixel as the target pixel, obtaining several windows containing the target pixel as reference windows, performing threshold segmentation processing on the reference window to obtain a binary image of the reference window, performing statistics on the grayscale values ​​of the target pixel in the binary images of all reference windows, and taking the grayscale value with the highest frequency as the segmented value of the target pixel in the medical image; taking an image composed of the segmented values ​​of the medical image as the binary image of the medical image;

[0065] In the same way, obtain the binary image of the enhanced image.

[0066] It is understandable that there are many windows containing target pixels, and each window contains different surrounding pixels. Therefore, multiple surrounding pixels of the target pixel can be extracted in this way, so that the texture conditions of the target pixel under multiple surrounding pixels can determine the final texture value.

[0067] S3: Pixels with differences in the binary images of the medical image and the enhanced image are taken as texture-changed pixels; connected domain analysis is performed on the binary images of the medical image and the enhanced image respectively, and the connected domain to which the texture-changed pixels belong is obtained in the binary image of the medical image, which is recorded as the real connected domain; it is determined whether there is a corrected reference pixel, the corrected reference pixel is a pixel in the pixel area corresponding to the real connected domain of the binary image of the enhanced image, and has a different value from the texture-changed pixel; if there is a corrected reference pixel, the grayscale value of the corrected reference pixel that is most similar to the texture-changed pixel value in the enhanced image is taken as the adjusted grayscale value of the texture-changed pixel; if there is no corrected reference pixel, the adjusted grayscale value of the texture-changed pixel is calculated.

[0068] S30: Pixels that differ in the binary images of the medical image and the enhanced image are taken as texture-changed pixels; connected domain analysis is performed on the binary images of the medical image and the enhanced image respectively, and the connected domain to which the texture-changed pixels belong is obtained in the binary image of the medical image, which is recorded as the real connected domain.

[0069] It should be noted that image enhancement will cause some texture areas to decrease or even disappear. Therefore, it is necessary to compare and analyze the binary images before and after enhancement to filter out the pixels with changed textures. In order to prevent the loss of texture information of pixels with changed textures, it is necessary to adjust the grayscale values ​​of pixels with changed textures in the enhanced image.

[0070] Preferably, as an example, pixels with differences in the binary images of the medical image and the enhanced image are taken as texture-changed pixels; connected domain analysis is performed on the binary images of the medical image and the enhanced image respectively, and the connected domain to which the texture-changed pixels belong is obtained in the binary image of the medical image, which is recorded as the real connected domain, including:

[0071] The grayscale values ​​of pixels at corresponding positions of the binary image of the medical imaging image and the binary image of the enhanced image are compared, and pixels with different grayscale values ​​are regarded as texture-changed pixels.

[0072] It can be understood that the grayscale value of a binary image has only two values, 255 and 0. If the texture of the medical image does not change before and after enhancement, the grayscale values ​​of the pixels at corresponding positions in the binary images of the images before and after enhancement are the same. Therefore, by comparing the differences in the grayscale values ​​of the pixels at corresponding positions in the binary images of the images before and after enhancement, pixels with changed texture can be screened out.

[0073] A connected domain analysis is performed on pixels with a gray value of 255 in the binary image of the medical image to obtain several positive connected domains; a connected domain analysis is performed on pixels with a gray value of 0 in the binary image of the medical image to obtain several negative connected domains. The positive connected domains and negative connected domains obtained from the binary image of the medical image are collectively referred to as the connected domain of the binary image of the medical image.

[0074] In the same way, the positive connected domain and the negative connected domain of the binary image of the enhanced image are obtained, and the positive connected domain and the negative connected domain of the binary image of the enhanced image are collectively referred to as the connected domain of the binary image of the enhanced image.

[0075] The connected domain to which the texture-changed pixel belongs is obtained in the binary image of the medical imaging image and recorded as the real connected domain.

[0076] It can be understood that the real connected domain is the texture area of ​​the texture-changed pixels in the image before enhancement. This area has not been enhanced and can reflect the texture information relatively accurately.

[0077] S31: Determine whether there is a corrected reference pixel, the corrected reference pixel being a pixel in a pixel area corresponding to a real connected domain of a binary image of an enhanced image and having a value different from that of the texture-changed pixel; if there is a corrected reference pixel, use the grayscale value of the corrected reference pixel in the enhanced image that is most similar to the texture-changed pixel as the adjusted grayscale value of the texture-changed pixel; if there is no corrected reference pixel, calculate the adjusted grayscale value of the texture-changed pixel.

[0078] It should be noted that image enhancement mainly causes two defects: one is the reduction of the texture area, and the other is the disappearance of the texture area as a whole. Figure 2 The schematic diagram of the connected domain in the medical image and the enhanced image is shown in the figure. Figure 2There are two sub-images in it, where the first sub-image reflects the schematic diagram of the connected domain of the medical image, and the second sub-image reflects the schematic diagram of the connected domain of the enhanced image. The connected domain a1 in the first sub-image and the connected domain a2 in the second sub-image reflect the same texture area, but the area of ​​the connected domain a1 in the first sub-image is larger, and the area of ​​the connected domain a2 in the second sub-image is smaller. This is because the area of ​​the texture area is reduced due to image enhancement; the connected domain b1 in the first sub-image corresponds to the connected domain b2 in the second sub-image. The two connected domains reflect the same texture area. The two connected domains are relatively similar, and the image enhancement has little effect on the texture area; the connected domain c1 in the first sub-image cannot find the corresponding connected domain in the second sub-image. This is because the texture information corresponding to the connected domain c1 disappears due to image enhancement. For the first defect case, some pixel information will still remain in the texture area. At this time, the retained pixel information can be used to adjust the grayscale value of the texture-changed pixel. For the second defect case, no pixel information is left in the texture area. At this time, the grayscale value of the texture-changed pixel can only be adjusted according to the overall stretching of the grayscale value of the pixel after enhancement relative to that before enhancement, thereby supplementing the texture information loss caused by enhancement.

[0079] Preferably, as an example, judging whether there is a modified reference pixel, the modified reference pixel being a pixel in a pixel area corresponding to a real connected domain of a binary image of an enhanced image and having a value different from that of the texture-changed pixel; if there is a modified reference pixel, taking the gray value of the modified reference pixel in the enhanced image that is most similar to the value of the texture-changed pixel as the adjusted gray value of the texture-changed pixel; if there is no modified reference pixel, calculating the adjusted gray value of the texture-changed pixel, including:

[0080] The pixels in the pixel area corresponding to the real connected domain of the binary image of the enhanced image and having different values ​​from the texture changed pixels are used as correction reference pixels. It is determined whether there is a correction reference pixel in the real connected domain of the binary image of the enhanced image.

[0081] If there is a corrected reference pixel, the corrected reference pixel with the smallest grayscale value difference from the texture-changed pixel is obtained in the medical image, and its grayscale value in the enhanced image is used as the adjusted grayscale value of the texture-changed pixel.

[0082] It is understandable that if Figure 2As described above, the modified reference pixel can be regarded as a pixel in the connected domain a2, that is, image enhancement only causes the texture area to be reduced, but the texture does not completely disappear. At this time, there are still some pixels in the texture area, and these pixels are the modified reference pixels. Since the texture-changed pixel and the modified reference pixel belong to the same texture, their grayscale values ​​are relatively similar, and thus the enhanced grayscale value of the modified reference pixel that is relatively similar to the grayscale value of the texture-changed pixel can be used as the modified grayscale value of the texture-changed pixel.

[0083] If there is no modified reference pixel, calculate the adjusted grayscale value of the texture changed pixel:

[0084] ;

[0085] in, represents the gray value of the texture-changed pixel in the medical image, Represent the gray value of the i-th pixel in the enhanced image and the medical imaging image, respectively. Represents the number of pixels in a medical image. It represents the mean gray value of the pixels that do not belong to the real connected domain and are adjacent to the edge of the real connected domain. Indicates rounding up. The limit function can be used to convert data with values ​​between [0, 255] to original data, data with values ​​greater than 255 to 255, and data with values ​​less than 0 to 0, thereby preventing the pixel values ​​in the image from exceeding the bounds. Represents the adjusted grayscale value of the texture-changed pixel.

[0086] It can be understood that if there is no modified reference pixel, it can be understood as a situation where the texture is removed due to image enhancement, e.g. Figure 2 In the first sub-image, the texture of the connected domain c3 is removed by image enhancement, so that the corresponding connected domain cannot be found in the second sub-image. At this time, the gray value cannot be adjusted by referring to the residual pixels. It reflects the contrast stretching of the image before and after enhancement. Generally, image enhancement will cause the grayscale values ​​of pixels with lower grayscale values ​​to be lower, and the grayscale values ​​of pixels with higher grayscale values ​​to be higher, thereby increasing the contrast between pixels. Can be transformed into , Reflects the contrast between texture and background by adding the contrast stretch value of the overall image Get the contrast value after stretching, because Value relative to is larger, its value should be made larger to increase the contrast with the surrounding area, so Adding the stretched contrast value gives you the adjusted grayscale value. Can be transformed into ,because Relative to is smaller, its value should be made smaller to increase the contrast with the surrounding area, so Subtracting the stretched contrast value will give you the adjusted grayscale value.

[0087] S4: Taking the grayscale value of the texture-changed pixel as the adjusted grayscale value to obtain the final enhanced image.

[0088] Preferably, as an example, taking the grayscale value of the texture-changed pixel as the adjusted grayscale value to obtain the final enhanced image includes:

[0089] The grayscale values ​​of the texture-changed pixels in the enhanced image are replaced with the adjusted grayscale values ​​to obtain the final enhanced image.

[0090] An embodiment of the present invention further discloses a medical image processing system based on image processing, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a medical image processing method based on image processing according to the present invention is implemented.

[0091] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0092] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory, a dynamic random access memory, a static random access memory, an enhanced dynamic random access memory, a high bandwidth memory, a hybrid storage cube, etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of the device or accessible or connectable to the device.

[0093] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

[0094] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A medical image processing method based on image processing, characterized in that: Includes steps: Collect medical imaging images; Performing enhancement processing on the medical image to obtain an enhanced image; performing threshold segmentation on the medical image and the enhanced image to obtain respective corresponding binary images; The method comprises: comparing the grayscale values ​​of pixels at corresponding positions of the binary image of the medical image and the binary image of the enhanced image, and taking pixels with different grayscale values ​​as texture-changed pixels; Connected domain analysis is performed on the binary images of the medical image and the enhanced image respectively, and the connected domain to which the texture-changed pixel belongs is obtained in the binary image of the medical image, recorded as the real connected domain, and it is determined whether there is a corrected reference pixel, the corrected reference pixel is a pixel in the pixel area corresponding to the real connected domain of the binary image of the enhanced image, and has a different value from the texture-changed pixel; if there is a corrected reference pixel, the corrected reference pixel with the smallest grayscale value difference from the texture-changed pixel is obtained in the medical image, and its grayscale value in the enhanced image is used as the adjusted grayscale value of the texture-changed pixel; if there is no corrected reference pixel, the adjusted grayscale value of the texture-changed pixel is calculated , , represents the gray value of the texture-changed pixel in the medical image, Represent the gray value of the i-th pixel in the enhanced image and the medical image, respectively. Represents the number of pixels in a medical image. It represents the mean gray value of the pixels that do not belong to the real connected domain and are adjacent to the edge of the real connected domain. Indicates rounding up. represents a limit function, which can replace the original data with data whose values ​​are between [0,255], replace the data whose values ​​are greater than 255 with 255, and replace the data whose values ​​are less than 0 with 0; The grayscale values ​​of the texture-changed pixels in the medical image are replaced with the adjusted grayscale values ​​to obtain the final enhanced image.

2. The medical image processing method based on image processing according to claim 1, characterized in that: The step of performing threshold segmentation on the medical image and the enhanced image to obtain respective corresponding binary images includes: Taking each pixel in the medical image as the center, a square window with a preset side length is obtained, taking any pixel as the target pixel, obtaining several windows containing the target pixel as reference windows, performing threshold segmentation processing on the reference window to obtain a binary image of the reference window, counting the grayscale values ​​of the target pixel in the binary images of all reference windows, and taking the grayscale value with the highest frequency as the segmented value of the target pixel in the medical image; taking the image composed of the segmented values ​​of the medical image as the binary image of the medical image; Get the binary image of the enhanced image.

3. The medical image processing method based on image processing according to claim 2, characterized in that: The method for obtaining the preset side length includes: Perform threshold segmentation on the medical image to obtain an initial binary image. Consecutive pixels with a grayscale value of 255 in each row of the initial binary image form a row pixel segment. The average length of all row pixel segments in all rows is calculated and recorded as the row continuous length. The continuous pixels with grayscale values ​​of 255 in each column of the initial binary image form a column pixel segment, and the average of the lengths of all column pixel segments in all columns is calculated and recorded as the column continuous length; The cumulative sum of the row continuous length and the column continuous length is taken as the preset side length.

4. The medical image processing method based on image processing according to claim 1, characterized in that: The step of performing enhancement processing on the medical image to obtain an enhanced image comprises: The histogram equalization method is used to enhance the medical image to obtain the enhanced image.

5. The medical image processing method based on image processing according to claim 1, characterized in that: The connecting domain analysis is performed on the binary images of the medical image and the enhanced image respectively, including: Conducting connected domain analysis on pixels with grayscale value of 255 in binary images of medical images to obtain several positive connected domains; Conducting connected domain analysis on pixels with gray value 0 in binary images of medical images to obtain several negative connected domains; Get the positive connected domain and negative connected domain of the binary image of the enhanced image.

6. A medical image processing system based on image processing, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the medical image processing method based on image processing according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Medical image data preprocessing method

    CN114822780A

  • Processing method and device for pixels in image, medium and electronic equipment

    CN113506231A

  • Image enhancement method for ultrasonic imaging gas leakage detector

    CN118333919A