A method for enhancing glomerular pathological images based on renal biopsy sections
By performing pixel point classification and grayscale change trend sequence analysis on the glomerular image area, blank pixel points are inserted and corrected in the glomerular image area, the image edge blur problem caused by traditional linear interpolation algorithm is solved, and image enhancement effect with higher resolution and clarity is achieved.
Patent Information
- Application Number
- CN202311034479.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-17
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2043-08-17
AI Technical Summary
Traditional linear interpolation algorithms can easily lead to blurred image edges during glomerular image enhancement, and the enhancement effect is not ideal.
By obtaining the pixel point classification of glomerular image areas, different categories are obtained and the grayscale change trend sequence of each category is obtained. Then insert blank pixel points into the glomerular image area, and correct the pixel values of blank pixel points according to the category of pixel points in their neighborhood and the grayscale change trend sequence to achieve image enhancement.
It improves the resolution and edge clarity of glomerular images, and avoids edge blur problems caused by linear interpolation.
Smart Images

Figure CN117058033B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly relates to a glomerular pathological image enhancement method based on renal biopsy sections. Background Art
[0002] The specific process of renal biopsy pathological examination is to use a puncture needle to penetrate the living renal tissue, and take a small amount of renal tissue specimens under the guidance of B-ultrasound. After the renal tissue specimens go through steps such as fixation, dehydration, clearing, impregnation with paraffin, embedding, sectioning, staining and sealing, they are made into tissue sections that can be observed under a microscope. Then, the renal biopsy tissue sections are examined by an optical microscope and photographed by a microscopic digital camera to obtain digital pathological images, which contain several glomeruli. Pathological experts will conduct pathological analysis based on the number and morphology of the glomeruli in the pathological images. However, due to reasons such as the complex technological process in the production process of renal biopsy tissue sections, the old age of image acquisition equipment, and the unsatisfactory lighting conditions, the glomerular images in the finally collected pathological tissue section images may have problems such as blurred images. Therefore, it is necessary to enhance the glomerular images in the obtained pathological images to make them more in line with human vision or easier for computer recognition and analysis.
[0003] Currently, the common method for enhancing glomerular images is to directly change the low resolution to high resolution through linear interpolation to achieve the enhancement of glomerular images. When the gray-scale changes between the generated interpolation pixel values are uniform, this method will cause blurred image edges, resulting in an unsatisfactory enhancement effect of glomerular images. Summary of the Invention
[0004] In order to solve the technical problem that image enhancement using the traditional linear interpolation algorithm will cause blurred image edges, the purpose of the present invention is to provide a glomerular pathological image enhancement method based on renal biopsy sections, and the specific technical solution adopted is as follows:
[0005] Obtain the glomerular image area in the renal biopsy tissue section image;
[0006] Classify the pixel points in the glomerular image area to obtain at least two categories, and obtain the category images corresponding to each category; based on the edge points in each category image, obtain the shared edge points that coincide in any two category images; along the gradient direction of each shared edge point, according to the change rate of the pixel point gray-scale values in the neighborhood of the shared edge point, obtain the gray-scale change trend sequences of the two categories corresponding to the shared edge point;
[0007] Insert blank pixels into the glomerulus image region; obtain the necessity for correction according to the categories to which the glomerulus image pixels in the neighborhood of the blank pixels belong; screen out the blank pixels to be corrected based on the necessity for correction; correct the pixel values of the blank pixels to be corrected according to the gray-scale change trend sequence of the glomerulus image pixels in the neighborhood of the blank pixels to be corrected, so as to obtain an enhanced glomerulus enhanced image.
[0008] Preferably, along the gradient direction of each shared edge point, according to the change rate of the gray-scale values of the pixels in the neighborhood of the shared edge point, obtaining the gray-scale change trend sequences of the two categories corresponding to the shared edge point includes:
[0009] For each shared edge point, along the gradient direction of each shared edge point, a gray-scale value sequence is formed by the gray-scale values of the pixels adjacent to the left and right of the shared edge point; according to the gray-scale value sequences of all the shared edge points corresponding to the two categories, a corresponding gray-scale value matrix is constructed;
[0010] Select any pixel point in the gray-scale value matrix as the target pixel point, calculate the difference between the gray-scale value of the pixel point adjacent to the right of the target pixel point and the gray-scale value of the target pixel point as the first difference; use the ratio of the first difference to the gray-scale value of the target pixel point as the gray-scale change rate corresponding to the target pixel point;
[0011] Calculate the mean value of the gray-scale change rates corresponding to the pixel points in each column of the gray-scale value matrix as the gray-scale change trend of each column; the gray-scale change trend sequences of the two categories corresponding to the shared edge point are formed by the gray-scale change trends corresponding to all the column pixel points in the gray-scale value matrix.
[0012] Preferably, the correcting the pixel value of the blank pixel to be corrected according to the gray-scale change trend sequence of the glomerulus image pixels in the neighborhood of the blank pixel to be corrected includes:
[0013] When the blank pixel to be corrected is located on a line formed by two glomerulus image pixels in the neighborhood, the blank pixels to be corrected between the two glomerulus image pixels are arranged in position order to construct a spacing pixel point sequence; obtain the position digit of the blank pixel to be corrected in the spacing pixel point sequence, obtain the mean value of the gray-scale change rates in the gray-scale change rate sequence corresponding to the category to which the pixel point with the smaller gray-scale value among the two glomerulus image pixels belongs as the gray-scale change rate mean value; use the product of the position digit of the blank pixel to be corrected and the gray-scale change rate mean value corresponding to the pixel point with the smaller gray-scale value among the two glomerulus image pixels as the adjusted gray-scale value; use the sum value of the adjusted gray-scale value and the smaller gray-scale value corresponding to the two glomerulus image pixels as the target gray-scale value, and use the target gray-scale value as the gray-scale value of the corrected blank pixel to be corrected;
[0014] When the blank pixel to be corrected is located on multiple lines formed by pixel points of two glomerular images in the neighborhood, calculate the target gray value corresponding to the blank pixel to be corrected when it is located on each line; take the mean value of the target gray values corresponding to the blank pixel to be corrected as the gray value of the corrected blank pixel to be corrected;
[0015] For the blank pixel to be corrected that is not located on the line connecting two pixel points of the glomerular image in the neighborhood, obtain the gray value of the blank pixel to be corrected through linear interpolation.
[0016] Preferably, the obtaining of the necessity for correction according to the category to which the pixel points of the glomerular image in the neighborhood of the blank pixel belong includes:
[0017] Round up to the next integer half of the number of blank pixels inserted between adjacent rows and columns, take twice the resulting value as the initial neighborhood side length, and take the value obtained by adding one to the initial neighborhood side length as the neighborhood side length of the blank pixel;
[0018] Based on the neighborhood side length, take the number of categories to which the pixel points of the glomerular image in the neighborhood of the blank pixel belong as the necessity for correction corresponding to the blank pixel.
[0019] Preferably, the obtaining of the category image corresponding to each category includes:
[0020] Obtain the mask image corresponding to each category; for each category, multiply the corresponding mask image by the glomerular image area to obtain the category image corresponding to the category.
[0021] Preferably, the screening out of the blank pixels to be corrected based on the necessity for correction includes:
[0022] When the necessity for correction is greater than the preset correction threshold, take the corresponding blank pixel as the blank pixel to be corrected.
[0023] Preferably, the inserting of blank pixels into the glomerular image area includes:
[0024] Insert blank pixels between adjacent rows and columns of the glomerular image area.
[0025] Preferably, the constructing of the corresponding gray value matrix according to the gray value sequences of all shared edge points corresponding to two categories includes:
[0026] Take the elements in the gray value sequences corresponding to each shared edge point in the two categories as the elements in each row of the gray value matrix to construct the corresponding gray value matrix.
[0027] Preferably, the classifying of the pixel points in the glomerular image area to obtain at least two categories includes:
[0028] Use the k-means algorithm to cluster the pixel points in the glomerular image area to obtain at least two categories.
[0029] Preferably, the obtaining of the glomerular image area in the renal biopsy tissue section image includes:
[0030] Adopt semantic segmentation technology to identify the glomerular image area in the renal biopsy tissue section image.
[0031] The embodiments of the present invention have at least the following beneficial effects:
[0032] The present invention first obtains the glomerular image area, obtains the gray-scale change trend sequence between different classes after segmentation. This gray-scale change trend sequence reflects the gray-scale change trends of the two classes, and combines the gray-scale change trend sequence to adjust the gray-scale values of the blank pixel points added between the two types of pixel points subsequently; add blank pixel points in the glomerular image area to improve the resolution of the glomerular image area, obtain the necessity of correction of the blank pixel points according to the number of categories of the glomerular image pixel points in the neighborhood of the blank pixel points. The necessity of correction reflects the location of the blank pixel points. When the number of categories of the glomerular image pixel points in the neighborhood is large, it reflects that the blank pixel points are located at the junction, and when the categories of the glomerular image pixel points in the neighborhood are relatively single, it reflects that the blank pixel points are located in the area of the corresponding class. This necessity of correction reflects the necessity of correction of the blank pixel points; screen out the blank pixel points to be corrected based on the necessity of correction, screen out the blank pixel points to be corrected based on the necessity of correction, and perform subsequent correction operations on them, avoiding the need to correct all blank pixel points subsequently, reducing the calculation amount; according to the gray-scale change trend sequence of the glomerular image pixel points in the neighborhood of the blank pixel points to be corrected, correct the pixel values of the blank pixel points to be corrected to obtain an enhanced glomerular enhanced image. The present invention improves the resolution and edge clarity of the glomerular image by correcting the pixel values of the blank pixel points to be corrected. Description of the Drawings
[0033] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required to be used in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0034] Figure 1 It is a method flow chart of a method for enhancing glomerular pathological images based on renal biopsy sections provided by an embodiment of the present invention. Detailed Embodiments
[0035] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following will, in combination with the accompanying drawings and preferred embodiments, elaborate in detail on a method for enhancing glomerular pathological images based on renal biopsy sections according to the present invention, including its specific implementation manner, structure, features, and effects. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0036] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0037] The embodiment of the present invention provides a specific implementation method of a method for enhancing glomerular pathological images based on renal biopsy sections, and this method is applicable to the scenario of enhancing glomerular case images. In order to solve the technical problem that using the traditional linear interpolation algorithm for image enhancement will cause image edge blurring. The present invention first obtains the glomerular image area and obtains the gray-scale change trend sequence between different classes after segmentation; then increases blank pixel points to improve the resolution of the glomerular image area, and obtains the correction necessity of the blank pixel points according to the number of glomerular image pixel points belonging to different classes in the neighborhood of the blank pixel points; for the blank pixel points with a correction necessity equal to 1, use linear interpolation to obtain the pixel gray value of this point, and for the blank pixel points to be corrected with a correction necessity greater than 1, obtain the pixel gray value of the corrected blank pixel points according to the gray-scale change trend sequence, so as to achieve the enhancement of the glomerular image area through accurate interpolation, and then obtain the enhanced glomerular enhanced image.
[0038] The following will specifically describe the specific solution of a method for enhancing glomerular pathological images based on renal biopsy sections provided by the present invention with reference to the accompanying drawings.
[0039] Please refer to Figure 1 , which shows the flowchart of a method for enhancing glomerular pathological images based on renal biopsy sections provided by an embodiment of the present invention. The method includes the following steps:
[0040] Step S100, obtain the glomerular image area in the renal biopsy tissue section image.
[0041] Obtain the renal biopsy tissue section image, and use semantic segmentation technology to identify the glomerular image area in the renal biopsy tissue section image. Specifically:
[0042] The data used is the dataset of renal biopsy tissue section images obtained during the acquisition process of the present invention; the pixel points to be segmented in the renal biopsy tissue section images are divided into two categories. That is, the corresponding label annotation process for the training set is: for the single-channel semantic label, the pixel points belonging to the non-glomerular image at the corresponding position are labeled as 0, and the pixel points belonging to the glomerular image are labeled as 1; since the task of the network is classification, the loss function used is the cross-entropy loss function.
[0043] Input the obtained renal biopsy tissue section image to be processed into the trained neural network to obtain the glomerular image area in the renal biopsy tissue section image.
[0044] Step S200: Classify the pixel points in the glomerular image area to obtain at least two categories, and obtain the category image corresponding to each category; based on the edge points in each category image, obtain the shared edge points that coincide in any two category images; along the gradient direction of each shared edge point, according to the change rate of the pixel gray values in the neighborhood of the shared edge point, obtain the gray change trend sequences of the two categories corresponding to the shared edge point.
[0045] After being stained with a staining agent, there are obvious color differences in each part of the glomerular image area. The k-means algorithm can be used to segment the glomerular image area. k-means is a very classic clustering algorithm and can also be used for image segmentation in image processing. Obtain the pixel gray change trend at the intersection edge of each type of pixel. After inserting blank pixel points between different types of pixels, if linear interpolation is used, the gray values between different types of pixel points change evenly, which will cause the edges in the enhanced image to be blurred and not obvious. However, if the gray values of these blank pixel points are determined by the above gray change trend, it will make the gray change of the blank pixel points conform to the gray change situation of the original image, resulting in a significant improvement in the edge sharpness of the enhanced image.
[0046] First, use the k-means algorithm to segment the obtained glomerular image area, classify the pixel points in the glomerular image area into N categories, and realize the classification of the pixel points in the glomerular image area using the k-means algorithm to obtain at least two categories.
[0047] After obtaining multiple categories, obtain the category image corresponding to each category. Specifically: obtain the mask image corresponding to each category; for each category, multiply the corresponding mask image by the glomerular image area to obtain the category image corresponding to the category. Among them, the mask image means that for the pixels classified as i (i = 1, 2,..., N), their pixel values are assigned as 1, and the gray values of the remaining pixels are assigned as 0, and multiply them point by point with the glomerular image area to obtain the category image of the i-th category pixels.
[0048] Further, use the Canny operator to perform edge detection on the category images corresponding to each category to obtain the edge points of each category, that is, obtain the edge points in each category image. Based on the edge points in each category image, obtain the shared edge points that coincide in any two category images.
[0049] Obtain the shared edge points at the junction of any two types of pixels, that is, obtain the shared edge points that coincide in two category images. Adjacent pixels of different categories share a boundary. Perform edge detection on these two category pixels, and at this boundary, the edge detection results coincide. The coincident edge points detected within the two categories are the shared edge points.
[0050] Further, along the gradient direction of each shared edge point, according to the change rate of the gray values of the pixel points in the neighborhood of the shared edge point, obtain the gray change trend sequences of the two categories corresponding to the shared edge point. These two gray change trend sequences can also be said to be the gray change trend sequences of the glomerular image pixel points within the two categories. To obtain the gray change trend sequences, specifically:
[0051] For each shared edge point, along the gradient direction of each shared edge point, form a gray value sequence from the gray values of the pixel points adjacent to the left and right of the shared edge point, and construct a corresponding gray value matrix according to all the shared edge points corresponding to the two categories. Take the elements in the gray value sequence corresponding to each shared edge point in the two categories as the elements in each row of the gray value matrix to form the corresponding gray value matrix. The elements in this gray value matrix are the gray values of the pixel points at the corresponding positions. It should be noted that the order of the gray value sequences in each row of the gray value matrix is sorted according to the order of the shared edge points in the preset direction. For example, when the direction presented by the shared edge points is horizontal, the order of the gray value sequences in each row of the gray value matrix is sorted according to the order of the shared edge points in the horizontal direction. At this time, the preset direction can be from left to right or from right to left; when the direction presented by the shared edge points is vertical, the order of the gray value sequences in each row of the gray value matrix is sorted according to the order of the shared edge points in the vertical direction. At this time, the preset direction can be from top to bottom or from bottom to top; when the shared edge points form an arc, with the endpoints of the arc as the starting points, the order of the gray value sequences in each row of the gray value matrix is sorted along the direction of the shared edge points in the arc formed by the shared edge points, that is, it can be summarized that the order of the gray value sequences in each row of the gray value matrix is sorted along the extension order of the shared edge points.
[0052] In an embodiment of the present invention, along the gradient direction of the shared edge point, the gray values of 7 pixel points are taken on each of the left and right sides of the shared edge point to form a gray value sequence. For a shared edge point, including its own gray value, there are a total of 15 gray values in the gray value sequence corresponding to the shared edge point. In other embodiments, the number of gray values in the gray value sequence corresponding to each shared edge point can be adjusted by the implementer according to the actual situation. Among them, the gray value sequence corresponding to each shared edge point reflects the gray value fluctuation of the area adjacent to the shared edge point.
[0053] Select any pixel point in the gray value matrix as the target pixel point, calculate the difference between the gray value of the adjacent pixel point on the right side of the target pixel point and the gray value of the target pixel point as the first difference; take the ratio of the first difference to the gray value of the target pixel point as the gray change rate corresponding to the target pixel point; calculate the mean value of the gray change rates corresponding to the pixel points in each column of the gray value matrix as the gray change trend corresponding to the column; and form a gray change trend sequence from the gray change trends corresponding to all the column pixel points in the gray value matrix. The number of gray change trends in the gray change trend sequence is the same as the number of columns of the gray value matrix. The gray change trend sequence reflects the gray change trend between the two categories corresponding to the corresponding gray value matrix. Among them, the first difference is the gray difference between the target pixel point and its adjacent pixel point on the right side, and this gray difference reflects the similarity of the gray values of the two pixel points. Based on the similarity of the gray values of the two pixel points, the blank pixel points inserted in the glomerular image area are adjusted, so that after inserting the blank pixel values, the blank pixel points can better conform to the change trends of the adjacent two categories, and reduce the blurring of the edges in the enhanced image.
[0054] Step S300, insert blank pixel points in the glomerular image area; obtain the necessity for correction according to the category to which the glomerular image pixel points in the neighborhood of the blank pixel points belong; screen out the blank pixel points to be corrected based on the necessity for correction; and correct the pixel values of the blank pixel points to be corrected according to the gray change trend sequence of the glomerular image pixel points in the neighborhood of the blank pixel points to be corrected, so as to obtain the enhanced glomerular enhanced image.
[0055] Insert blank pixel points between adjacent rows and columns of the glomerulus image region to expand the size of the glomerulus image region and improve the resolution. Then, according to the number of categories of the glomerulus image pixel points in the neighborhood of the blank pixel points, obtain the necessity of correcting the blank pixel points. If the glomerulus image pixel points in the neighborhood of a certain blank pixel point belong to only one category, it means that the blank pixel point is located in the region corresponding to the category, and using linear interpolation does not affect the clarity of the edge, so there is no need to correct it; if the glomerulus image pixel points in the neighborhood of the blank pixel point belong to two or more categories, it means that the blank pixel point is located at the edge junction corresponding to multiple categories, and using linear interpolation will affect the clarity of the edge. It is necessary to perform interpolation according to the gray change trend of the glomerulus image region to obtain a clearer edge and enhance the glomerulus image region through more accurate interpolation.
[0056] First, insert b - 1 blank pixel points between adjacent row pixel points of the glomerulus image region, and insert b - 1 blank pixel points between adjacent column pixel points to expand the glomerulus image region by b times. It should be noted that the blank pixel point is a pixel point with a gray value of 0. In the embodiment of the present invention, the value of b is 4, and in other embodiments, the implementer can adjust this value according to the actual situation. For example, insert 1 blank pixel point between adjacent row pixel points of the glomerulus image region, and insert 1 blank pixel point between adjacent column pixel points to expand the glomerulus image region by 2 times; insert 3 blank pixel points between adjacent row pixel points of the glomerulus image region, and insert 3 blank pixel points between adjacent column pixel points to expand the glomerulus image region by 4 times.
[0057] Obtain the necessity of correction according to the category to which the glomerulus image pixel points in the neighborhood of the blank pixel points belong.
[0058] Round up half of the number of blank pixel points inserted between adjacent rows and columns, and use twice the result value obtained by rounding up as the initial neighborhood side length. Use the result value obtained by adding one to the initial neighborhood side length as the neighborhood side length of the blank pixel point That is, according to the number of categories to which the glomerulus image pixel points in the neighborhood of the blank pixel point belong to obtain the necessity of correction. Specifically: use the number of categories to which the glomerulus image pixel points in the neighborhood of the blank pixel point belong as the correction necessity corresponding to the blank pixel point.
[0059] Further, the blank pixel points to be corrected are screened based on the necessity of correction. When the necessity of correction is greater than the preset correction threshold, the corresponding blank pixel points are used as the blank pixel points to be corrected. In the embodiment of the present invention, the value of the preset correction threshold is 1. In other embodiments, the implementer can adjust this value according to the actual situation. When the necessity of correction corresponding to the blank pixel point is greater than 1, it reflects that the blank pixel point is located at the junction of two types of glomerular image pixel points, and the gray value of the blank pixel point should be determined by the gray change trend between these two types of glomerular image pixel points, rather than directly using linear interpolation; when the necessity of correction corresponding to the blank pixel point is equal to the preset correction threshold, the gray value of the blank pixel point is directly obtained by linear interpolation based on the gray values of the glomerular image pixel points in the neighborhood of the blank pixel point. That is, when the necessity of correction corresponding to the blank pixel point is 1, it reflects that the blank pixel point is located inside a certain type of glomerular image pixel point, and the gray value of the blank pixel point can be directly obtained by linear interpolation. As another embodiment of the present invention, the average gray value of the pixel points in the glomerular image area can also be used as the gray value of the blank pixel point with a necessity of correction of 1.
[0060] After obtaining the blank pixel points to be corrected, the step of correcting the pixel value of the blank pixel points to be corrected according to the gray change trend sequence of the glomerular image pixel points in the neighborhood of the blank pixel points to be corrected is as follows:
[0061] When the blank pixel point to be corrected is located on a line formed by two glomerular image pixel points in the neighborhood. The blank pixel points to be corrected between the two glomerular image pixel points are arranged in position order to construct a spacing pixel point sequence; the position digit of the blank pixel point to be corrected in the spacing pixel point sequence is obtained; the product of the position digit of the blank pixel point to be corrected and the average gray change rate of the pixel point with the smaller gray value among the two glomerular image pixel points is used as the adjusted gray value; the sum of the adjusted gray value and the smaller gray values corresponding to the two glomerular image pixel points is used as the target gray value, and the target gray value is used as the gray value of the corrected blank pixel point to be corrected. That is, the correction of the blank pixel point to be corrected is realized through the glomerular image pixel points related to the blank pixel point to be corrected. Compared with the method of directly using linear interpolation, the situation of edge blurring will be reduced when determining the gray value of the blank pixel point to be corrected.
[0062] When the blank pixel point to be corrected is located on multiple lines formed by two glomerular image pixel points in the neighborhood, calculate the target gray value corresponding to the blank pixel point to be corrected when it is located on each line; use the mean value of the target gray values corresponding to the blank pixel point to be corrected as the gray value of the corrected blank pixel point to be corrected. When the blank pixel point to be corrected is located on multiple lines formed by two glomerular image pixel points in the neighborhood, the blank pixel point to be corrected is adjusted by taking the mean value, so as to determine the blank pixel point to be corrected according to the gray value change trends in multiple directions.
[0063] For the blank pixel point to be corrected that is not located on the line connecting two glomerular image pixel points in the neighborhood, obtain the gray value of the blank pixel point to be corrected through linear interpolation, that is, the gray value corresponding to the blank pixel point to be corrected is directly obtained by linear interpolation. The probability of the blank pixel point to be corrected that is not located on the line connecting two glomerular image pixel points in the neighborhood between two categories is small. Using the method of linear interpolation to obtain the gray value of the blank pixel point to be corrected will not cause the edge of the glomerular image to become blurred.
[0064] Perform the operations of steps S100 to S300 on each glomerular image region in the renal biopsy tissue section image, map the enhanced glomerular image region to the blank image, and obtain the enhanced glomerular enhanced image, so as to realize the enhancement of the glomerular image region.
[0065] In summary, the present invention relates to the technical field of image processing. The method first obtains the glomerular image region and obtains the gray value change trend sequence between different classes after segmentation; then increases the blank pixel points to improve the resolution of the glomerular image region, and obtains the correction necessity of the blank pixel points according to the number of glomerular image pixel points belonging to different classes in the neighborhood of the blank pixel points; for the blank pixel points with the correction necessity equal to 1, use linear interpolation to obtain the pixel gray value of this point, and for the blank pixel points to be corrected with the correction necessity greater than 1, obtain the pixel gray value of the corrected blank pixel point according to the gray value change trend sequence, so as to realize the enhancement of the glomerular image region through accurate interpolation, and then obtain the enhanced glomerular enhanced image.
[0066] It should be noted that the above sequence of embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0067] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the key points of each embodiment are the differences from other embodiments.
Claims
1. A method for enhancing glomerular pathological images based on renal biopsy sections, characterized in that, The method comprises the following steps: Obtain the glomerular image region in the renal biopsy tissue section image; Classify the pixel points in the glomerular image region to obtain at least two categories, and obtain the category image corresponding to each category; based on the edge points in each category image, obtain the shared edge points that coincide in any two category images; along the gradient direction of each shared edge point, according to the change rate of the gray values of the pixel points in the neighborhood of the shared edge point, obtain the gray change trend sequences of the two categories corresponding to the shared edge point; Insert blank pixel points in the glomerular image region; obtain the correction necessity according to the category to which the glomerular image pixel points in the neighborhood of the blank pixel points belong; screen out the blank pixel points to be corrected based on the correction necessity; correct the pixel values of the blank pixel points to be corrected according to the gray change trend sequences of the glomerular image pixel points in the neighborhood of the blank pixel points to be corrected, and obtain the enhanced glomerular enhanced image; Wherein, the method for obtaining the gray change trend sequences of the two categories corresponding to the shared edge points is: for each shared edge point, along the gradient direction of each shared edge point, form a gray value sequence from the gray values of the pixel points adjacent to the left and right of the shared edge point; according to the gray value sequences of all the shared edge points corresponding to the two categories, construct the corresponding gray value matrix; select any pixel point in the gray value matrix as the target pixel point, calculate the difference between the gray value of the pixel point adjacent to the right of the target pixel point and the gray value of the target pixel point as the first difference; take the ratio of the first difference to the gray value of the target pixel point as the gray change rate corresponding to the target pixel point; calculate the mean value of the gray change rates corresponding to the pixel points in each column of the gray value matrix as the gray change trend of each column; from the gray change trends corresponding to all the column pixel points in the gray value matrix, form the gray change trend sequences of the two categories corresponding to the shared edge point; Wherein, the method for obtaining the correction necessity is: round up the half of the number of blank pixel points inserted between adjacent rows and columns, take twice the obtained result value as the initial neighborhood side length, and take the value obtained by adding one to the initial neighborhood side length as the neighborhood side length of the blank pixel point; based on the neighborhood side length, take the number of categories to which the glomerular image pixel points in the neighborhood of the blank pixel point belong as the correction necessity corresponding to the blank pixel point; Among them, the method for correcting the pixel value of the blank pixel point to be corrected is as follows: when the blank pixel point to be corrected is located on a line formed by two glomerular image pixel points in the neighborhood, the blank pixel points to be corrected between the two glomerular image pixel points are constructed into a sequence of spaced pixel points according to the position order; obtain the position digit of the blank pixel point to be corrected in the sequence of spaced pixel points, and obtain the average value of the gray-scale change rates in the gray-scale change rate sequence corresponding to the category to which the pixel point with the smaller gray-scale value among the two glomerular image pixel points belongs, as the average gray-scale change rate; multiply the position digit of the blank pixel point to be corrected by the average gray-scale change rate corresponding to the pixel point with the smaller gray-scale value among the two glomerular image pixel points as the adjusted gray-scale value; take the sum of the adjusted gray-scale value and the smaller gray-scale value corresponding to the two glomerular image pixel points as the target gray-scale value, and take the target gray-scale value as the gray-scale value of the corrected blank pixel point to be corrected; when the blank pixel point to be corrected is located on multiple lines formed by two glomerular image pixel points in the neighborhood, calculate the target gray-scale value corresponding to the blank pixel point to be corrected when located on each line respectively; take the average value of the target gray-scale values corresponding to the blank pixel point to be corrected as the gray-scale value of the corrected blank pixel point to be corrected; for the blank pixel point to be corrected that is not located on the line between two glomerular image pixel points in the neighborhood, obtain the gray-scale value of the blank pixel point to be corrected by linear interpolation.
2. The method for enhancing glomerular pathological images based on renal biopsy sections according to claim 1, characterized in that, The obtaining of the category image corresponding to each category includes: Obtain the mask image corresponding to each category; for each category, multiply the corresponding mask image by the glomerular image region to obtain the category image corresponding to the category.
3. The method for enhancing glomerular pathological images based on renal biopsy sections according to claim 1, characterized in that, The screening of the blank pixel points to be corrected based on the necessity of correction includes: When the necessity of correction is greater than the preset correction threshold, take the corresponding blank pixel point as the blank pixel point to be corrected.
4. The method for enhancing glomerular pathological images based on renal biopsy sections according to claim 1, characterized in that, The inserting of blank pixel points into the glomerular image region includes: Insert blank pixel points into the adjacent rows and columns of the glomerular image region.
5. The method for enhancing glomerular pathological images based on renal biopsy sections according to claim 1, characterized in that, The constructing of the corresponding gray-scale value matrix according to the gray-scale value sequences of all shared edge points corresponding to the two categories includes: Take the elements in the gray-scale value sequences corresponding to each shared edge point in the two categories as the elements in each row of the gray-scale value matrix to construct the corresponding gray-scale value matrix.
6. The method for enhancing glomerular pathological images based on renal biopsy sections according to claim 1, characterized in that, The classifying of the pixel points in the glomerular image region to obtain at least two categories includes: Use the k-means algorithm to cluster the pixel points in the glomerular image region to obtain at least two categories.
7. The method for enhancing glomerular pathological images based on renal biopsy sections according to claim 1, characterized in that, The obtaining of the glomerular image region in the renal biopsy tissue section image includes: Adopt the technology of semantic segmentation to identify the glomerular image region in the renal biopsy tissue section image.
Citation Information
Patent Citations
Anti-wear hydraulic oil pollution particle detection method
CN115965624A
Enhancement optimization method for liver ultrasonic image
CN116523802A