Pathological image effective coordinate area automatic generation system
By preprocessing and dividing the pathological images, generating image blocks and determining their position information, the complex problem of generating effective coordinate areas of pathological images in the prior art is solved, and the analysis efficiency and diagnostic accuracy are improved.
Patent Information
- Application Number
- CN202411585413.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-08
AI Technical Summary
The prior art is complex in generating effective coordinate areas of pathological images, making it difficult to improve analysis efficiency and diagnostic accuracy.
By dividing the preprocessed pathological images, several image blocks are generated, the position information of the image blocks is determined, and the effective coordinate area of the pathological image is determined based on the position information, thereby achieving simple and efficient generation of the effective coordinate area in the pathological image.
It improves the analysis efficiency and diagnostic accuracy of pathological images, and simplifies the process of generating effective coordinate areas.
Smart Images

Figure CN119599953A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pathological image processing, and in particular to a system for automatically generating effective coordinate areas of pathological images. Background Art
[0002] With the development of medical imaging technology, the importance of pathological images in clinical diagnosis and treatment has become increasingly prominent. Pathological images are usually high-resolution and large in size, and contain rich pathological information. When analyzing and processing these images, they need to be divided into small image blocks for more sophisticated tasks such as lesion detection, region localization, and feature extraction. However, manually defining the location of image blocks is very time-consuming and error-prone, so a technical solution is needed to automatically generate valid coordinate areas of pathological images to improve analysis efficiency and accuracy.
[0003] The application publication number is CN115294126A, which discloses a method for intelligently identifying cancer cells in a pathological image, including: S1: extracting the effective area of the pathological slice in the pathological image, removing the background area that does not contain effective tissue, and setting the background area that does not contain effective tissue as an invalid area, and significantly improving the image recognition processing speed by removing the invalid area. Removing the background area includes the following steps: A1: performing a sampling operation on the pathological image, scaling the pathological image to a first size; A2: performing a binarization operation on the reduced pathological image; A3: performing a morphological dilation operation on the area where the pixel of the pathological image after the binarization operation is 0; A4: extracting the area where the pixel of the pathological image after the binarization operation is 0 as the effective area, and setting other areas as invalid background areas; A5: scaling the coordinates of the effective area to the coordinate scale of the original image, and after matching the effective area with the original image, marking the effective area in the original pathological image; A6: performing data enhancement on the effective area of the pathological image; S2: constructing a cancer cell recognition network The cancer cell recognition network includes a feature extraction network and a feature fusion network, wherein the feature extraction network is composed of five cascade modules, and the feature fusion network is composed of five cascade submodules; the feature fusion network outputs n kinds of convolutions with a kernel size of 1x1 for classification to obtain an output probability map, wherein n represents the type of pathological cells to be identified; S3: network parameter training and learning, using the preprocessed data obtained in S1, the image of the effective area is cut into rectangular blocks to obtain an image block set, and the back-propagation strategy is adopted to train the cancer cell recognition network parameters to obtain the final network parameters; S4: cancer cell recognition reasoning, preprocessing the pathological image to be identified, identifying the effective area, cutting the image of the effective area into blocks to obtain an image block set, adopting a parallel strategy to assign sub-computing threads to each image block, using the cancer cell recognition network to identify each image block in the image block set to obtain a probability heat map of each sub-image block, splicing the probability heat maps of the sub-image blocks to obtain a cancer cell distribution probability map of the entire pathological image.
[0004] Although the above technical solution realizes the generation of effective coordinate areas of pathological images, the operation process is relatively complicated. Therefore, how to simply and effectively generate effective coordinate areas in pathological images, thereby improving the analysis efficiency and diagnostic accuracy of pathological images, is one of the problems that need to be solved in the field of pathological image processing technology. Summary of the invention
[0005] The present invention aims to solve the technical problems in the above-mentioned technologies to at least a certain extent. To this end, the purpose of the present invention is to provide a system for automatically generating effective coordinate areas of pathological images, which can achieve the technical effect of simply and effectively generating effective coordinate areas in pathological images by dividing the pre-processed pathological images, generating a plurality of image blocks, determining the position information of the image blocks, and determining the effective coordinate areas of the pathological images according to the position information, thereby improving the analysis efficiency and diagnostic accuracy of the pathological images.
[0006] The present invention provides a system for automatically generating effective coordinate areas of pathological images, comprising:
[0007] An image acquisition module, used for acquiring pathological images to be processed;
[0008] An image preprocessing module is used to preprocess the pathological image to obtain a preprocessed image;
[0009] An image block generation module, used to process the preprocessed image according to a preset generation rule to generate a number of predicted image blocks;
[0010] A position determination module, used to determine the position information of the predicted image block;
[0011] The effective coordinate region generating module is used to determine whether to perform image region processing according to the position information of the predicted image block, and determine the image effective coordinate region according to the processing result.
[0012] Preferably, the system for automatically generating effective coordinate regions of pathological images, the image preprocessing module, comprises:
[0013] An image denoising submodule is used to perform an image denoising operation on the pathological image to obtain a denoised image;
[0014] An image enhancement submodule is used to perform an image enhancement operation on the denoised image to obtain an enhanced image;
[0015] The image normalization submodule is used to perform image normalization operation on the enhanced image to obtain a preprocessed image.
[0016] Preferably, the system for automatically generating effective coordinate regions of pathological images, the image enhancement submodule, comprises:
[0017] A first space conversion submodule is used to convert the denoised image from the RGB color space to the HSV color space to obtain a converted image;
[0018] Color correction submodule, used to:
[0019] Obtain N clear images in the pathological image library, determine the H channel mean and the V channel mean corresponding to all pixels in each clear image, and determine the H channel total mean and the V channel total mean of the N clear images based on the N H channel means and the V channel means;
[0020] The H channel value and the V channel value of the converted image are replaced by the total mean value of the H channel and the total mean value of the V channel, and the color of the converted image is corrected to obtain a color-corrected image;
[0021] Gray value correction submodule, used for:
[0022] Determine any pixel point in the color correction image as the central pixel point, and determine a 64*64 area centered on the central pixel point as the target area;
[0023] Obtain the grayscale values of all pixels in the target area, count the frequency of occurrence of each grayscale value, and determine the target grayscale histogram corresponding to the target area based on the grayscale value and the frequency of occurrence of the grayscale value;
[0024] Determine the difference between the maximum value and the minimum value of the grayscale value according to the target grayscale histogram, and use the ratio of the preset coefficient to the difference as the target grayscale value correction coefficient;
[0025] Subtract the grayscale value corresponding to the central pixel of the target area from the minimum grayscale value in the target grayscale histogram to obtain the corresponding target difference value, multiply the target grayscale value correction coefficient by the target difference value, and use the obtained product as the grayscale correction value of the central pixel of the target area;
[0026] The above operation is performed on all pixels in the color-corrected image to achieve grayscale value correction of the pixels in the color-corrected image, thereby obtaining a grayscale value-corrected image;
[0027] A filtering submodule, used for performing Laplace filtering on the gray value corrected image to obtain a Laplace image;
[0028] A fusion submodule is used to fuse the Laplacian image with the denoised image to obtain a fused image;
[0029] The second space conversion submodule is used to convert the fused image from the HSV color space to the RGB color space to obtain an enhanced image.
[0030] Preferably, the system for automatically generating effective coordinate regions of pathological images, the image block generation module, comprises:
[0031] The size acquisition submodule is used to obtain the left height and top width of the preprocessed image;
[0032] A parameter receiving submodule, used for receiving generation parameters of a predicted image block;
[0033] The step size determination submodule is used to:
[0034] The ratio of the height of the left side of the image to the generated parameter is taken as the first ratio, and the first ratio is rounded down to obtain the first step length;
[0035] The ratio of the width of the upper edge of the image to the generated parameter is taken as the second ratio, and the second ratio is rounded down to obtain a second step length;
[0036] The division submodule is used to divide the preprocessed image according to the first step length and the second step length to obtain a number of predicted image blocks; wherein the product of the first step length and the second step length is the number of generated predicted image blocks.
[0037] Preferably, the pathological image effective coordinate area automatic generation system, the position determination module, comprises:
[0038] The image block judgment submodule is used to judge whether the position of the predicted image block exceeds the original image boundary according to the preset judgment rule, and obtain the image block judgment result;
[0039] An image block traversal submodule is used to traverse a number of predicted image blocks to obtain image block traversal results;
[0040] The information determination submodule is used to determine the position information of the predicted image block according to the image block judgment result and the image block traversal result; wherein the position information includes the upper left corner coordinates, the lower right corner coordinates and the offset relative to the original image of the predicted image block.
[0041] Preferably, the system for automatically generating effective coordinate areas of pathological images, the image block judgment submodule, comprises:
[0042] A first judgment submodule is used to judge whether the first ratio is an integer, and then judge whether the bottom of the predicted image block in the last column in the horizontal direction exceeds the boundary of the original image, to obtain a first judgment result;
[0043] A second judgment submodule is used to judge whether the second ratio is an integer, and then judge whether the right side of the predicted image block of the last row in the vertical direction exceeds the original image boundary to obtain a second judgment result;
[0044] A third judgment submodule is used to judge whether the first ratio and the second ratio are both integers, and then judge whether the predicted image block in the lower right corner exceeds the boundary of the original image, to obtain a third judgment result;
[0045] The result determination submodule is used to determine the prediction image block judgment result according to the first judgment result, the second judgment result and the third judgment result.
[0046] Preferably, the automatic generation system of the effective coordinate area of the pathological image, the information determination submodule, comprises:
[0047] A non-super-boundary image block position determination submodule, used to determine a first position determination rule according to generation parameters of the predicted image block, a first step length and a second step length, and determine position information of the non-super-boundary predicted image block according to the first position determination rule;
[0048] A first beyond-boundary image block position determination submodule is used for, when the first judgment result is that the bottom of the predicted image block in the last column in the horizontal direction exceeds the boundary of the original image, using the predicted image block as the first beyond-boundary image block, traversing the position in the horizontal direction, determining a second position determination rule according to generation parameters of the predicted image block, the first step length, the second step length, and the left height of the image of the preprocessed image, and determining the position information of the first beyond-boundary predicted image block according to the second position determination rule;
[0049] A second beyond-boundary image block position determination submodule, for, when the second judgment result is that the right side of the predicted image block in the last row in the vertical direction exceeds the boundary of the original image, using the predicted image block as the second beyond-boundary image block, traversing the position in the vertical direction, determining a third position determination rule according to generation parameters of the predicted image block, the first step length, the second step length, and the image top width of the preprocessed image, and determining position information of the second beyond-boundary predicted image block according to the third position determination rule;
[0050] The third super-boundary image block position determination submodule is used to, when the third judgment result is that the predicted image block in the lower right corner exceeds the boundary of the original image, use the predicted image block as the third super-boundary image block, determine the fourth position determination rule according to the generation parameters of the predicted image block, the first step length, the second step length, the image left height of the preprocessed image, and the image top width of the preprocessed image, and determine the position information of the third super-boundary predicted image block according to the fourth position determination rule.
[0051] Preferably, the effective coordinate region automatic generation system of the pathological image, the effective coordinate region generation module, comprises:
[0052] A parameter acquisition submodule, used to acquire position parameters used to calculate the position of the predicted image block in the original image;
[0053] The original position determination submodule is used to:
[0054] Determine the horizontal coordinate of the predicted image block at the upper left corner position in the original image according to the difference between the horizontal coordinate of the upper left corner coordinate of the predicted image block and the position parameter;
[0055] Determine the vertical coordinate of the predicted image block at the upper left corner position in the original image according to the difference between the vertical coordinate of the upper left corner coordinate of the predicted image block and the position parameter;
[0056] Determine the upper left corner position of the predicted image block in the original image according to the horizontal coordinate and the vertical coordinate of the upper left corner position;
[0057] An initialization submodule, used to assign position parameters to the horizontal offset and the vertical offset of the prediction image block respectively, so as to realize the offset initialization of the prediction image block;
[0058] The first processing submodule is used to determine that the left side of the predicted image block exceeds the range of the original image when it is determined that the upper left corner of the predicted image block is at the left boundary of the original image, add the horizontal coordinate of the predicted image block at the upper left corner position in the original image to the position parameter, and modify the horizontal offset of the predicted image block to 0, mark the out-of-range area, and determine that the area whose left side exceeds the original image does not need to be cropped;
[0059] The second processing submodule is used for, when it is determined that the upper left corner of the predicted image block is at the upper boundary of the original image, determining that the upper edge of the predicted image block exceeds the range of the original image, adding the vertical coordinates of the predicted image block at the upper left corner position in the original image to the position parameter, and modifying the vertical offset of the predicted image block to 0, marking the out-of-range area, and determining that the area whose upper edge exceeds the original image does not need to be cropped;
[0060] The third processing submodule is used for, when it is determined that the upper left corner of the predicted image block is at the right boundary of the original image, determining that the right side of the predicted image block exceeds the range of the original image, subtracting the horizontal coordinate of the predicted image block at the upper left corner position in the original image from the position parameter, and modifying the horizontal offset of the predicted image block to twice the position parameter, marking the out-of-range area, and determining that the area whose right side exceeds the original image needs to be cropped;
[0061] a fourth processing submodule, for determining that the lower edge of the predicted image block exceeds the range of the original image when it is determined that the upper left corner of the predicted image block is at the lower boundary of the original image, subtracting the vertical coordinate of the predicted image block at the upper left corner position in the original image from the position parameter, and modifying the vertical offset of the predicted image block to twice the position parameter, marking the out-of-range area, and determining that the area whose lower edge exceeds the original image needs to be cropped;
[0062] The region determination submodule is used to determine the effective coordinate region of the image according to the above processing results.
[0063] Preferably, the system for automatically generating effective coordinate regions of pathological images further comprises a contour marking module for contour marking the effective coordinate regions;
[0064] Contour marking module, including:
[0065] An image conversion submodule, used for converting the pathological image corresponding to the effective coordinate area into a grayscale image;
[0066] A first detection submodule, configured to perform a first edge detection operation on the grayscale image using an edge detection operator to obtain a first detection image;
[0067] Image binarization submodule, used for:
[0068] Obtaining the grayscale mean and grayscale value standard deviation of all pixels in the first detection image, and determining the pixel threshold of the first detection image according to the grayscale mean, grayscale value standard deviation and preset binarization parameters;
[0069] The pixel points whose pixel values in the image are lower than the pixel threshold are set to black, and the remaining pixel points are set to white, so as to obtain a binary image corresponding to the first detection image;
[0070] The image operation submodule is used to first perform an erosion operation on the binary image and then perform an expansion operation to obtain an operation image;
[0071] The second detection submodule is used to perform contour detection on the operation image to obtain a plurality of contour curves;
[0072] A contour comparison submodule is used to compare the areas of the acquired contour curves, and determine the contour curve with the largest area as the target contour curve corresponding to the pathological image corresponding to the effective coordinate area;
[0073] The marking submodule is used to mark the target contour curve.
[0074] Preferably, the system for automatically generating effective coordinate areas of pathological images further comprises an image output module for outputting the contour-marked pathological images to a terminal interface for display.
[0075] The present invention provides a system for automatically generating effective coordinate regions of pathological images, comprising: an image acquisition module for acquiring pathological images to be processed; an image preprocessing module for preprocessing the pathological images to obtain preprocessed images; an image block generation module for processing the preprocessed images according to preset generation rules to generate a plurality of predicted image blocks; a position determination module for determining position information of the predicted image blocks; and an effective coordinate region generation module for determining whether to perform image region processing according to the position information of the predicted image blocks, and determining the effective coordinate region of the image according to the processing results, thereby achieving the technical effect of simply and effectively generating effective coordinate regions in pathological images, thereby improving the analysis efficiency of pathological images and the diagnostic accuracy.
[0076] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0077] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0079] Figure 1 A block diagram of a system for automatically generating effective coordinate regions of pathological images according to an embodiment of the present invention;
[0080] Figure 2 is a block diagram of an optional image block generation module in an embodiment of the present invention;
[0081] Figure 3 is a block diagram of an optional valid coordinate area generation module in an embodiment of the present invention;
[0082] Figure 4 Schematic diagram of an optional effective coordinate area of a pathological image in an embodiment of the present invention. DETAILED DESCRIPTION
[0083] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0084] Reference Figure 1 The embodiment of the present invention provides a system for automatically generating effective coordinate areas of pathological images, comprising:
[0085] An image acquisition module 10, used for acquiring pathological images to be processed;
[0086] An image preprocessing module 20 is used to preprocess the pathological image to obtain a preprocessed image;
[0087] An image block generation module 30, used to process the preprocessed image according to a preset generation rule to generate a plurality of predicted image blocks;
[0088] A position determination module 40, used to determine position information of a predicted image block;
[0089] The effective coordinate region generating module 50 is used to determine whether to perform image region processing according to the position information of the predicted image block, and determine the image effective coordinate region according to the processing result.
[0090] In this embodiment, the pathological image to be processed can be acquired by an image acquisition device such as a digital image scanner and a digital image shooting device.
[0091] In this embodiment, the preprocessing of the pathological image may include enhancing the pathological image, reducing noise on the pathological image, filtering the pathological image, and normalizing the pathological image.
[0092] In this embodiment, the preset generation rule may be to ratio the height and width of the pathological image with the preset image block generation parameters, determine the size of the generated predicted image block according to the generation parameters, and determine the number of generated predicted image blocks according to the two ratios.
[0093] In this embodiment, the position information of the predicted image block includes the coordinates of the upper left corner of the predicted image block, the offset of the predicted image block relative to the original image, and the coordinates of the lower right corner of the predicted image block.
[0094] In this embodiment, the specific implementation method of determining whether to perform image area processing based on the position information of the predicted image block can be: determining whether the upper left corner of the predicted image block is on a certain boundary of the original image based on the position information of the predicted image block, further determining whether a certain side of the predicted image block exceeds the range of the original image, and determining whether the image area on a certain side needs to be cropped.
[0095] The technical principle and technical effect of the above technical scheme are: by acquiring the pathological image to be processed; preprocessing the pathological image to obtain a preprocessed image; processing the preprocessed image according to preset generation rules to generate a number of predicted image blocks; determining the position information of the predicted image block; determining whether to perform image area processing according to the position information of the predicted image block, and determining the image valid coordinate area according to the processing result, thereby realizing the simple and effective generation of the valid coordinate area in the pathological image, thereby improving the analysis efficiency of the pathological image and the diagnostic accuracy.
[0096] The embodiment of the present invention provides a system for automatically generating effective coordinate regions of pathological images, an image preprocessing module, including:
[0097] An image denoising submodule is used to perform an image denoising operation on the pathological image to obtain a denoised image;
[0098] An image enhancement submodule is used to perform an image enhancement operation on the denoised image to obtain an enhanced image;
[0099] The image normalization submodule is used to perform image normalization operation on the enhanced image to obtain a preprocessed image.
[0100] In this embodiment, the specific implementation method of the image denoising operation on the pathological image can be: select any pixel point of the pathological image as the central pixel point, determine a 3*3 area centered on the central pixel point, obtain the grayscale values of all pixels in the area and sort the grayscale values, take the grayscale median, and use the grayscale median as the grayscale value of the central pixel point. Perform the above operations on all pixels in the pathological image to achieve image denoising operation on the pathological image.
[0101] In this embodiment, the specific implementation method of performing an image enhancement operation on the denoised image may be: performing spatial transformation on the denoised image, performing color correction and grayscale value correction on the image after the transformation is completed, filtering the image after the grayscale value correction, and realizing the image enhancement operation on the denoised image.
[0102] In this embodiment, the specific implementation method of performing an image normalization operation on the enhanced image may be: obtaining the maximum pixel value and the minimum pixel value of all pixel points in the enhanced image, obtaining the difference between the maximum pixel value and the minimum pixel value as the first difference; selecting any pixel point in the enhanced image, obtaining the difference between the pixel value of the pixel point and the minimum pixel value as the second difference; obtaining the ratio of the second difference to the first difference, and using the ratio as the pixel value of the pixel point. The above operations are performed on all pixel points in the enhanced image to implement the image normalization operation on the enhanced image.
[0103] The technical principle and technical effect of the above technical solution are: by performing image denoising operation on the pathological image, a denoised image is obtained; by performing image enhancement operation on the denoised image, an enhanced image is obtained; by performing image normalization operation on the enhanced image, a preprocessed image is obtained, thereby achieving the technical effect of improving the clarity of the pathological image and the visual effect of the user.
[0104] The embodiment of the present invention provides a system for automatically generating effective coordinate regions of pathological images, an image enhancement submodule, including:
[0105] A first space conversion submodule is used to convert the denoised image from the RGB color space to the HSV color space to obtain a converted image;
[0106] Color correction submodule, used to:
[0107] Obtain N clear images in the pathological image library, determine the H channel mean and the V channel mean corresponding to all pixels in each clear image, and determine the H channel total mean and the V channel total mean of the N clear images based on the N H channel means and the V channel means;
[0108] The H channel value and the V channel value of the converted image are replaced by the total mean value of the H channel and the total mean value of the V channel, and the color of the converted image is corrected to obtain a color-corrected image;
[0109] Gray value correction submodule, used for:
[0110] Determine any pixel point in the color correction image as the central pixel point, and determine a 64*64 area centered on the central pixel point as the target area;
[0111] Obtain the grayscale values of all pixels in the target area, count the frequency of occurrence of each grayscale value, and determine the target grayscale histogram corresponding to the target area based on the grayscale value and the frequency of occurrence of the grayscale value;
[0112] Determine the difference between the maximum value and the minimum value of the grayscale value according to the target grayscale histogram, and use the ratio of the preset coefficient to the difference as the target grayscale value correction coefficient;
[0113] Subtract the grayscale value corresponding to the central pixel of the target area from the minimum grayscale value in the target grayscale histogram to obtain the corresponding target difference value, multiply the target grayscale value correction coefficient by the target difference value, and use the obtained product as the grayscale correction value of the central pixel of the target area;
[0114] The above operation is performed on all pixels in the color-corrected image to achieve grayscale value correction of the pixels in the color-corrected image, thereby obtaining a grayscale value-corrected image;
[0115] A filtering submodule, used for performing Laplace filtering on the gray value corrected image to obtain a Laplace image;
[0116] A fusion submodule is used to fuse the Laplacian image with the denoised image to obtain a fused image;
[0117] The second space conversion submodule is used to convert the fused image from the HSV color space to the RGB color space to obtain an enhanced image. In this embodiment, the specific implementation method of determining the target grayscale histogram corresponding to the target area according to the grayscale value and the frequency of occurrence of the grayscale value can be: using the grayscale value as the horizontal axis and the frequency of occurrence of the grayscale value as the vertical axis to determine the target grayscale histogram corresponding to the target area.
[0118] In this embodiment, the preset coefficient may be 255.
[0119] In this embodiment, the gray value corrected image is subjected to Laplace filtering to obtain a Laplace image. The specific implementation method may be: select any pixel point of the gray value corrected image, obtain the pixel value of the pixel point and the four pixel points above, below, left and right of the pixel point, add the pixel values of the four pixel points above, below, left and right to obtain the pixel value sum, multiply the pixel value of the selected pixel point by 4 to obtain a 4-fold pixel value, obtain the difference between the pixel value sum and the 4-fold pixel value, obtain the difference between the pixel value of the selected pixel point and the difference, and use the difference between the pixel value of the selected pixel point and the difference as the pixel value of the selected pixel point after Laplace filtering; perform the above operations on all pixel points in the gray value corrected image, complete the Laplace filtering of the gray value corrected image, and obtain the Laplace image.
[0120] The technical principle and technical effect of the above technical scheme are: the H channel value and V channel value of the denoised image after spatial conversion are corrected to obtain a color corrected image; the central pixel sub-region of the color corrected image is determined to obtain the target grayscale histogram of the sub-region, and the pixel value of the central pixel is corrected according to the target grayscale histogram and the preset coefficient, and then the grayscale value of the entire image is corrected, and the image after the grayscale value correction is Laplace filtered and fused with the denoised image to obtain an enhanced image, thereby achieving the technical effect of improving image contrast and clarity, enhancing image details, improving user visual effects, and thus improving the efficiency of analysis and diagnosis of pathological images.
[0121] Reference Figure 2 The embodiment of the present invention provides a system for automatically generating effective coordinate regions of pathological images, and an image block generation module, comprising:
[0122] The size acquisition submodule 301 is used to acquire the left edge height and top edge width of the pre-processed image;
[0123] A parameter receiving submodule 302, used for receiving generation parameters of a predicted image block;
[0124] The step length determination submodule 303 is used to:
[0125] The ratio of the height of the left side of the image to the generated parameter is taken as the first ratio, and the first ratio is rounded down to obtain the first step length;
[0126] The ratio of the width of the upper edge of the image to the generated parameter is taken as the second ratio, and the second ratio is rounded down to obtain a second step length;
[0127] The division submodule 304 is used to divide the preprocessed image according to the first step length and the second step length to obtain a number of predicted image blocks; wherein the product of the first step length and the second step length is the number of generated predicted image blocks.
[0128] In this embodiment, the code implementation for obtaining the left image height and top image width of the preprocessed image can be: height = size[1], where height is the left image height of the preprocessed image; width = size[0], where width is the top width of the preprocessed image; size[] is an array for storing the left image height and top image width of the preprocessed image.
[0129] In this embodiment, the generation parameters of the predicted image block can be represented by config.PREDEFINED_SIZE. It should be noted that 0 <config.PREDEFINED_SIZE<=min(height,width)。
[0130] In this embodiment, the ratio of the height of the left side of the image to the generation parameter is taken as the first ratio, and the first ratio is rounded down to obtain the first step length. The code implementation may be: y_step=int(height / config.PREDEFINED_SIZE).
[0131] In this embodiment, the ratio of the width of the upper edge of the image to the generation parameter is used as the second ratio, and the second ratio is rounded down to obtain the second step length. The code implementation may be: x_step=int(width / config.PREDEFINED_SIZE).
[0132] In this embodiment, the number of predicted image blocks is y_step*x_step.
[0133] The technical principle and technical effect of the above technical scheme are: obtaining the left image height and the top image width of the preprocessed image; receiving the generation parameters of the predicted image block; taking the ratio of the left image height to the generation parameters as the first ratio, rounding the first ratio down to obtain the first step length; taking the ratio of the top image width to the generation parameters as the second ratio, rounding the second ratio down to obtain the second step length; dividing the preprocessed image according to the first step length and the second step length to obtain a plurality of predicted image blocks; wherein the product of the first step length and the second step length is the number of generated predicted image blocks, thereby achieving the technical effect of dividing the image according to the image size and the generation parameters, generating multiple image blocks, and improving the image processing efficiency.
[0134] The embodiment of the present invention provides a system for automatically generating a valid coordinate area of a pathological image, and a position determination module, comprising:
[0135] The image block judgment submodule is used to judge whether the position of the predicted image block exceeds the original image boundary according to the preset judgment rule, and obtain the image block judgment result;
[0136] An image block traversal submodule is used to traverse a number of predicted image blocks to obtain image block traversal results;
[0137] The information determination submodule is used to determine the position information of the predicted image block according to the image block judgment result and the image block traversal result; wherein the position information includes the upper left corner coordinates, the lower right corner coordinates and the offset relative to the original image of the predicted image block.
[0138] In this embodiment, traversing a plurality of prediction image blocks may be performed starting from the first prediction image block.
[0139] The technical principle and technical effect of the above technical solution are: according to the preset judgment rule, whether the position of the predicted image block exceeds the boundary of the original image is judged to obtain the image block judgment result; a number of predicted image blocks are traversed to obtain the image block traversal result; the position information of the predicted image block is determined according to the image block judgment result and the image block traversal result, thereby achieving the technical effect of improving the accuracy of the image block position information by judging whether the image block position exceeds the boundary and then determining the image block position information through traversal.
[0140] The embodiment of the present invention provides a system for automatically generating effective coordinate regions of pathological images, and an image block judgment submodule, including:
[0141] A first judgment submodule is used to judge whether the first ratio is an integer, and then judge whether the bottom of the predicted image block in the last column in the horizontal direction exceeds the boundary of the original image, to obtain a first judgment result;
[0142] A second judgment submodule is used to judge whether the second ratio is an integer, and then judge whether the right side of the predicted image block of the last row in the vertical direction exceeds the original image boundary to obtain a second judgment result;
[0143] A third judgment submodule is used to judge whether the first ratio and the second ratio are both integers, and then judge whether the predicted image block in the lower right corner exceeds the boundary of the original image, to obtain a third judgment result;
[0144] The result determination submodule is used to determine the prediction image block judgment result according to the first judgment result, the second judgment result and the third judgment result.
[0145] In this embodiment, whether the first ratio is an integer can be determined through the code if not height%config.PREDEFINED_SIZE==0. If the first ratio is not an integer, it means that the bottom of the predicted image block in the last column in the horizontal direction will exceed the boundary of the original image; if the first ratio is an integer, it means that the bottom of the predicted image block in the last column in the horizontal direction will not exceed the boundary of the original image.
[0146] In this embodiment, the code if not width%config.PREDEFINED_SIZE==0 can be used to determine whether the second ratio is an integer. If the second ratio is not an integer, it means that the bottom of the predicted image block in the last row in the vertical direction will exceed the boundary of the original image; if the second ratio is an integer, it means that the bottom of the predicted image block in the last row in the vertical direction will not exceed the boundary of the original image.
[0147] In this embodiment, the code if not (height% config.PREDEFINED_SIZE==0orwidth% config.PREDEFINED_SIZE==0) can be used to determine whether the first ratio and the second ratio are both integers. If the first ratio and the second ratio are not integers, it means that the predicted image block in the lower right corner will exceed the boundary of the original image; otherwise, the predicted image block in the lower right corner will not exceed the boundary of the original image.
[0148] The technical principle and technical effect of the above technical solution are: by judging whether the first ratio and the second ratio are integers, it is judged whether part of the image block will exceed the boundary of the original image, thereby achieving the technical effect of judging whether the image block will exceed the boundary of the original image, and then accurately obtaining the image block position information in the next operation according to the judgment result.
[0149] The embodiment of the present invention provides a system for automatically generating a valid coordinate area of a pathological image, and an information determination submodule, including:
[0150] A non-super-boundary image block position determination submodule, used to determine a first position determination rule according to generation parameters of the predicted image block, a first step length and a second step length, and determine position information of the non-super-boundary predicted image block according to the first position determination rule;
[0151] A first beyond-boundary image block position determination submodule is used for, when the first judgment result is that the bottom of the predicted image block in the last column in the horizontal direction exceeds the boundary of the original image, using the predicted image block as the first beyond-boundary image block, traversing the position in the horizontal direction, determining a second position determination rule according to generation parameters of the predicted image block, the first step length, the second step length, and the left height of the image of the preprocessed image, and determining the position information of the first beyond-boundary predicted image block according to the second position determination rule;
[0152] A second beyond-boundary image block position determination submodule, for, when the second judgment result is that the right side of the predicted image block in the last row in the vertical direction exceeds the boundary of the original image, using the predicted image block as the second beyond-boundary image block, traversing the position in the vertical direction, determining a third position determination rule according to generation parameters of the predicted image block, the first step length, the second step length, and the image top width of the preprocessed image, and determining position information of the second beyond-boundary predicted image block according to the third position determination rule;
[0153] The third super-boundary image block position determination submodule is used to, when the third judgment result is that the predicted image block in the lower right corner exceeds the boundary of the original image, use the predicted image block as the third super-boundary image block, determine the fourth position determination rule according to the generation parameters of the predicted image block, the first step length, the second step length, the image left height of the preprocessed image, and the image top width of the preprocessed image, and determine the position information of the third super-boundary predicted image block according to the fourth position determination rule.
[0154] In this embodiment, the first position determination rule is: regions.append([x*config.PREDEFINED_SIZE,y*config.PREDEFINED_SIZE,0,0,config.PREDEFINED_SIZE-1,config.PREDEFINED_SIZE-1]), where the regions.append() function is a position information acquisition function, x*config.PREDEFINED_SIZE is the horizontal coordinate of the upper left corner of the non-super-boundary prediction image block, y*config.PREDEFINED_SIZE is the vertical coordinate of the upper left corner of the non-super-boundary prediction image block, 0 is the horizontal offset of the non-super-boundary prediction image block, 0 is the vertical offset of the non-super-boundary prediction image block, config.PREDEFINED_SIZE-1 is the horizontal coordinate of the lower right corner of the non-super-boundary prediction image block, and config.PREDEFINED_SIZE-1 is the vertical coordinate of the lower right corner of the non-super-boundary prediction image block. Among them, the range of x is from 0 to the second step length, and the range of y is from 0 to the first step length.
[0155] In this embodiment, the second position determination rule is regions.append([x*config.PREDEFINED_SIZE, height-config.PREDEFINED_SIZE, 0, (y_step+1)*config.PREDEFINED_SIZE-height, config.PREDEFINED_SIZE-1, config.PREDEFINED_SIZE-1]), where regions.append() function is a position information acquisition function, x*config.PREDEFINED_SIZE IZE is the horizontal coordinate of the upper left corner of the first super-border image block, height-config.PREDEFINED_SIZE is the vertical coordinate of the upper left corner of the first super-border image block, 0 is the horizontal offset of the first super-border image block, (y_step+1)*config.PREDEFINED_SIZE-height is the vertical offset of the first super-border image block, config.PREDEFINED_SIZE-1 is the horizontal coordinate of the lower right corner of the first super-border image block, and config.PREDEFINED_SIZE-1 is the vertical coordinate of the lower right corner of the first super-border image block. Among them, the range of x is from 0 to the second step length, and y_step is the first step length.
[0156] In this embodiment, the third position determination rule is regions.append([width-config.PREDEFINED_SIZE,y*config.PREDEFINED_SIZE,(x_step+1)*config.PREDEFINED_SIZE-width,0,config.PREDEFINED_SIZE-1,config.PREDEFINED_SIZE-1]), where regions.append() function is a position information acquisition function, width-config.PREDEFINED_SIZE ED_SIZE is the horizontal coordinate of the upper left corner of the second super-border image block, y*config.PREDEFINED_SIZE is the vertical coordinate of the upper left corner of the second super-border image block, (x_step+1)*config.PREDEFINED_SIZE-width is the horizontal offset of the second super-border image block, 0 is the vertical offset of the second super-border image block, config.PREDEFINED_SIZE–1 is the horizontal coordinate of the lower right corner of the second super-border image block, and config.PREDEFINED_SIZE-1 is the vertical coordinate of the lower right corner of the second super-border image block. Among them, y ranges from 0 to the first step length, and x_step is the second step length.
[0157] In this embodiment, the fourth position determination rule is regions.append([width-config.PREDEFINED_SIZE, height-config.PREDEFINED_SIZE, (x_step+1)*config.PREDEFINED_SIZE-width, (y_step+1)*config.PREDEFINED_SIZE-height, config.PREDEFINED_SIZE-1, config.PREDEFINED_SIZE-1]), where regions.append() function is a position information acquisition function, width-config.PREDEFINED_SIZE ED_SIZE is the horizontal coordinate of the upper left corner of the third super-border image block, height-config.PREDEFINED_SIZE is the vertical coordinate of the upper left corner of the third super-border image block, (x_step+1)*config.PREDEFINED_SIZE-width is the horizontal offset of the third super-border image block, (y_step+1)*config.PREDEFINED_SIZE-height is the vertical offset of the third super-border image block, config.PREDEFINED_SIZE-1 is the horizontal coordinate of the lower right corner of the third super-border image block, and config.PREDEFINED_SIZE-1 is the vertical coordinate of the lower right corner of the third super-border image block. Among them, y_step is the first step length, and x_step is the second step length.
[0158] The technical principle and technical effect of the above technical scheme are: determining a first position determination rule according to generation parameters of the predicted image block, the first step length and the second step length, and determining the position information of the non-over-boundary predicted image block according to the first position determination rule; when the first judgment result is that the bottom of the predicted image block in the last column in the horizontal direction exceeds the boundary of the original image, the predicted image block is used as the first over-boundary image block, and the position in the horizontal direction is traversed, and the second position determination rule is determined according to the generation parameters of the predicted image block, the first step length, the second step length and the height of the left side of the image of the preprocessed image, and the position information of the first over-boundary predicted image block is determined according to the second position determination rule; when the second judgment result is that the right side of the predicted image block in the last row in the vertical direction exceeds the boundary of the original image, the predicted image block is used as the second over-boundary image block, and the position in the vertical direction is traversed. The invention discloses a method for determining a position of an image block that is beyond the original image boundary by using a third position determination rule, wherein the third position determination rule is determined according to the generation parameters of the predicted image block, the first step length, the second step length, and the image top width of the preprocessed image, and the position information of the second super-boundary predicted image block is determined according to the third position determination rule; when the third judgment result is that the predicted image block in the lower right corner exceeds the original image boundary, the predicted image block is used as the third super-boundary image block, and the fourth position determination rule is determined according to the generation parameters of the predicted image block, the first step length, the second step length, the image left height of the preprocessed image, and the image top width of the preprocessed image, and the position information of the third super-boundary predicted image block is determined according to the fourth position determination rule, thereby realizing the technical effect of determining different position determination rules according to different situations of the image block, determining the position information of the image block in different situations by using different position determination rules, and ensuring the correctness of the image block position information.
[0159] Reference Figure 3 and Figure 4 The embodiment of the present invention provides a system for automatically generating effective coordinate regions of pathological images, and an effective coordinate region generation module, including:
[0160] A parameter acquisition submodule 501 is used to acquire position parameters used to calculate the position of the predicted image block in the original image;
[0161] The original position determination submodule 502 is used to:
[0162] Determine the horizontal coordinate of the predicted image block at the upper left corner position in the original image according to the difference between the horizontal coordinate of the upper left corner coordinate of the predicted image block and the position parameter;
[0163] Determine the vertical coordinate of the predicted image block at the upper left corner position in the original image according to the difference between the vertical coordinate of the upper left corner coordinate of the predicted image block and the position parameter;
[0164] Determine the upper left corner position of the predicted image block in the original image according to the horizontal coordinate and the vertical coordinate of the upper left corner position;
[0165] An initialization submodule 503 is used to assign position parameters to the horizontal offset and the vertical offset of the prediction image block respectively, so as to realize the offset initialization of the prediction image block;
[0166] The first processing submodule 504 is used to, when it is determined that the upper left corner of the predicted image block is at the left boundary of the original image, determine that the left side of the predicted image block exceeds the range of the original image, add the horizontal coordinate of the predicted image block at the upper left corner position in the original image to the position parameter, modify the horizontal offset of the predicted image block to 0, mark the out-of-range area, and determine that the area whose left side exceeds the original image does not need to be cropped;
[0167] The second processing submodule 505 is used to, when it is determined that the upper left corner of the predicted image block is at the upper boundary of the original image, determine that the upper edge of the predicted image block exceeds the range of the original image, add the vertical coordinate of the predicted image block at the upper left corner position in the original image to the position parameter, modify the vertical offset of the predicted image block to 0, mark the out-of-range area, and determine that the area whose upper edge exceeds the original image does not need to be cropped;
[0168] The third processing submodule 506 is used to, when it is determined that the upper left corner of the predicted image block is at the right boundary of the original image, determine that the right side of the predicted image block exceeds the range of the original image, subtract the horizontal coordinate of the predicted image block at the upper left corner position in the original image from the position parameter, modify the horizontal offset of the predicted image block to twice the position parameter, mark the out-of-range area, and determine that the area whose right side exceeds the original image needs to be cropped;
[0169] The fourth processing submodule 507 is used to, when it is determined that the upper left corner of the predicted image block is at the lower boundary of the original image, determine that the lower edge of the predicted image block exceeds the range of the original image, subtract the vertical coordinate of the predicted image block at the upper left corner position in the original image from the position parameter, modify the vertical offset of the predicted image block to twice the position parameter, mark the out-of-range area, and determine the area whose lower edge exceeds the original image that needs to be cropped;
[0170] The region determination submodule 508 is used to determine the image effective coordinate region according to the above processing results.
[0171] In this embodiment, the position parameter can be expressed as config.BORDER_SIZE, which is used to expand the boundary image block outward. For example, when the size of the generated predicted image block is 100*100, and a lower left boundary image block is 90*90, the config.BORDER_SIZE at this time is 10, indicating that the lower left boundary image block is expanded by 10 pixels to the left and 10 pixels downward; when the size of the generated predicted image block is 100*100, and a upper right boundary image block is 90*90, the config.BORDER_SIZE at this time is -10, indicating that the upper right boundary image block is expanded by 10 pixels to the right and 10 pixels upward.
[0172] In this embodiment, the code implementation for determining the horizontal coordinates of the predicted image block at the upper left corner position in the original image based on the difference between the horizontal coordinates in the upper left corner coordinates of the predicted image block and the position parameter can be: shifted_region_x = region[0]-config.BORDER_SIZE, where shifted_region_x is the horizontal coordinates of the predicted image block at the upper left corner position in the original image, region[0] is the current horizontal coordinates of the upper left corner of the image block, and region[] is an array for storing the image block position information.
[0173] In this embodiment, the code implementation for determining the vertical coordinates of the predicted image block when it is at the upper left corner in the original image based on the difference between the vertical coordinates in the upper left corner coordinates of the predicted image block and the position parameter can be: shifted_region_y = region[1]-config.BORDER_SIZE, where shifted_region_y is the vertical coordinates of the predicted image block when it is at the upper left corner in the original image, region[1] is the current upper left corner vertical coordinate of the image block, and region[] is an array for storing the image block position information.
[0174] In this embodiment, when it is determined that the upper left corner of the predicted image block is at the left boundary of the original image, it is determined that the left side of the predicted image block exceeds the range of the original image, the horizontal coordinates of the predicted image block at the upper left corner position in the original image are added to the position parameter, and the horizontal offset of the predicted image block is modified to 0, the out-of-range area is marked, and the code implementation for determining that there is no need to crop the area whose left side exceeds the original image can be: if region[0]==0:shifted_region_x=shifted_region_x+config.BORDER_SIZE, clip_region_x=0, wherein if region[0]==0 indicates that the upper left corner of the predicted image block is at the left boundary of the original image, the left side of the predicted image block exceeds the range of the original image, and clip_region_x is the horizontal offset of the predicted image block.
[0175] In this embodiment, when it is determined that the upper left corner of the predicted image block is at the upper boundary of the original image, it is determined that the upper edge of the predicted image block exceeds the range of the original image, the vertical coordinates of the predicted image block at the upper left corner position in the original image are added to the position parameter, and the vertical offset of the predicted image block is modified to 0, the out-of-range area is marked, and the code implementation for determining that the area whose upper edge exceeds the original image does not need to be cropped can be: if region[1]==0:shifted_region_y=shifted_region_y+config.BORDER_SIZE, clip_region_y=0, wherein if region[1]==0 indicates that the upper left corner of the predicted image block is at the upper boundary of the original image, the upper edge of the predicted image block exceeds the range of the original image, and clip_region_y indicates the vertical offset of the predicted image block.
[0176] In this embodiment, when it is determined that the upper left corner of the predicted image block is at the right boundary of the original image, it is determined that the right side of the predicted image block exceeds the range of the original image, the horizontal coordinates of the predicted image block at the upper left corner position in the original image are subtracted from the position parameter, and the horizontal offset of the predicted image block is modified to twice the position parameter, the out-of-range area is marked, and the code implementation for determining that the area on the right side that exceeds the original image needs to be cropped can be: if region[0] == dimensions[0]-config.PREDEFINED_SIZE:shifted_region_x=shifted_region_x-config.BORDER_SIZE, clip_region_x=2*config.BORDER_SIZE, where dimensions[0] is the upper width of the original image, and if region[0] == dimensions[0]-config.PREDEFINED_SIZE indicates that the upper left corner of the predicted image block is at the right boundary of the original image, and the right side of the predicted image block exceeds the range of the original image.
[0177] In this embodiment, when it is determined that the upper left corner of the predicted image block is at the lower boundary of the original image, it is determined that the lower edge of the predicted image block exceeds the range of the original image, the vertical coordinates of the predicted image block at the upper left corner position in the original image are subtracted from the position parameter, and the vertical offset of the predicted image block is modified to twice the position parameter, the out-of-range area is marked, and the code implementation for determining the area whose lower edge exceeds the original image and needs to be clipped can be: if region[1] == dimensions[1] - config.PREDEFINED_SIZE: shifted_region_y = shifted_region_y - config.BORDER_SIZE, clip_region_y = 2*config.BORDER_SIZE, dimensions[1] is the left height of the original image, if region[1] == dimensions[1] - config.PREDEFINED_SIZE indicates that the upper left corner of the predicted image block is at the lower boundary of the original image and the lower edge of the predicted image block exceeds the range of the original image.
[0178] In this embodiment, the image effective coordinate area can be as follows: Figure 4 The area shown.
[0179] The technical principle and technical effect of the above technical solution are: the position information of the image block in the original image is determined by the current position information and position parameters of the image block, thereby ensuring the consistency of the size of the image block; by judging whether the upper left corner of the image block is at a certain boundary of the original image, the position and offset of the image block in the original image are modified, thereby achieving the technical effect of minimizing the invalid area during the cropping process and retaining the valid coordinate area of the image.
[0180] The embodiment of the present invention provides a system for automatically generating effective coordinate regions of pathological images, and the system further comprises a contour marking module for contour marking the effective coordinate regions;
[0181] Contour marking module, including:
[0182] An image conversion submodule, used for converting the pathological image corresponding to the effective coordinate area into a grayscale image;
[0183] A first detection submodule, configured to perform a first edge detection operation on the grayscale image using an edge detection operator to obtain a first detection image;
[0184] Image binarization submodule, used for:
[0185] Obtaining the grayscale mean and grayscale value standard deviation of all pixels in the first detection image, and determining the pixel threshold of the first detection image according to the grayscale mean, grayscale value standard deviation and preset binarization parameters;
[0186] The pixel points whose pixel values in the image are lower than the pixel threshold are set to black, and the remaining pixel points are set to white, so as to obtain a binary image corresponding to the first detection image;
[0187] The image operation submodule is used to first perform an erosion operation on the binary image and then perform an expansion operation to obtain an operation image;
[0188] The second detection submodule is used to perform contour detection on the operation image to obtain a plurality of contour curves;
[0189] A contour comparison submodule is used to compare the areas of the acquired contour curves, and determine the contour curve with the largest area as the target contour curve corresponding to the pathological image corresponding to the effective coordinate area;
[0190] The marking submodule is used to mark the target contour curve.
[0191] In this embodiment, the specific implementation method of converting the pathological image corresponding to the valid coordinate area into a grayscale image can be: select any pixel point in the pathological image, obtain the R channel value, G channel value and B channel value of the pixel point, and add 1 / 3 of the sum obtained by adding the three channel values as the pixel value of the pixel point. Perform the above operation on all pixel points in the pathological image to convert the pathological image corresponding to the valid coordinate area into a grayscale image.
[0192] In this embodiment, the edge detection operator may be a Canny operator, a Soper operator, or the like.
[0193] In this embodiment, the grayscale mean and grayscale standard deviation of all pixels in the first detection image are obtained, and the specific implementation method of determining the pixel threshold of the first detection image according to the grayscale mean, grayscale standard deviation and preset binarization parameters can be: setting the grayscale mean to G, the grayscale standard deviation to G1, and the preset binarization parameter to P, then the pixel threshold of the first detection image is G+P*G1, where the rounding range of P is 10-15.
[0194] The technical principle and technical effect of the above technical scheme are: by converting the pathological image into a grayscale image and performing edge detection to obtain a first detection image, by converting the first detection image into a binary image and performing morphological opening and closing operations on the binary image to obtain an operation image, by performing edge detection on the operation image to obtain multiple contour curves, selecting the curve with the largest area as the contour curve of the pathological image and marking it, thereby achieving the technical effect of obtaining and marking the contour curve of the pathological image, making the effective coordinate area of the pathological image more intuitive, and improving the efficiency of users viewing pictures.
[0195] The embodiment of the present invention provides a system for automatically generating a valid coordinate area of a pathological image. The system also includes an image output module for outputting the contour-marked pathological image to a terminal interface for display.
[0196] In this embodiment, the terminal interface may be a computer interface, a tablet interface, a mobile phone interface, etc.
[0197] The technical principle and technical effect of the above technical solution are: outputting the contour-marked pathological image to the terminal interface for display, realizing an intuitive display of the contour-marked pathological image, which is conducive to the image analysis and diagnosis of the contour-marked pathological image.
[0198] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A system for automatically generating effective coordinate areas of pathological images, characterized in that: include: An image acquisition module, used for acquiring pathological images to be processed; An image preprocessing module, used for preprocessing the pathological image to obtain a preprocessed image; An image block generation module, used to process the pre-processed image according to a preset generation rule to generate a plurality of predicted image blocks; A position determination module, used to determine the position information of the predicted image block; The effective coordinate region generating module is used to determine whether to perform image region processing according to the position information of the predicted image block, and determine the image effective coordinate region according to the processing result.
2. The system for automatically generating effective coordinate regions of pathological images according to claim 1, characterized in that: The image preprocessing module comprises: An image denoising submodule is used to perform an image denoising operation on the pathological image to obtain a denoised image; An image enhancement submodule, used to perform an image enhancement operation on the denoised image to obtain an enhanced image; The image normalization submodule is used to perform an image normalization operation on the enhanced image to obtain a preprocessed image.
3. The system for automatically generating effective coordinate regions of pathological images as claimed in claim 2, characterized in that: The image enhancement submodule comprises: A first space conversion submodule is used to convert the denoised image from the RGB color space to the HSV color space to obtain a converted image; Color correction submodule, used to: Obtain N clear images in the pathological image library, determine the H channel mean and the V channel mean corresponding to all pixels in each clear image, and determine the H channel total mean and the V channel total mean of the N clear images based on the N H channel means and the V channel means; The H channel value and the V channel value of the converted image are replaced by the total mean value of the H channel and the total mean value of the V channel, and the color of the converted image is corrected to obtain a color-corrected image; Gray value correction submodule, used for: Determine any pixel point in the color-corrected image as a central pixel point, and determine a 64*64 area centered on the central pixel point as a target area; Obtaining the grayscale values of all pixels in the target area, counting the frequency of occurrence of each grayscale value, and determining a target grayscale histogram corresponding to the target area according to the grayscale values and the frequency of occurrence of the grayscale values; Determine the difference between the maximum value and the minimum value of the grayscale value according to the target grayscale histogram, and use the ratio of the preset coefficient to the difference as the target grayscale value correction coefficient; Subtracting the grayscale value corresponding to the central pixel of the target area from the minimum grayscale value in the target grayscale histogram to obtain a corresponding target difference value, multiplying the target grayscale value correction coefficient by the target difference value, and using the obtained product as the grayscale correction value of the central pixel of the target area; Perform the above operation on all pixels in the color-corrected image to achieve grayscale value correction of the pixels in the color-corrected image, and obtain a grayscale value-corrected image; A filtering submodule, used for performing Laplace filtering on the gray value corrected image to obtain a Laplace image; A fusion submodule is used to fuse the Laplacian image with the denoised image to obtain a fused image; The second space conversion submodule is used to convert the fused image from the HSV color space to the RGB color space to obtain an enhanced image.
4. The system for automatically generating effective coordinate regions of pathological images as claimed in claim 1, characterized in that: The image block generation module comprises: The size acquisition submodule is used to obtain the left height and top width of the preprocessed image; A parameter receiving submodule, used for receiving generation parameters of a predicted image block; The step size determination submodule is used to: Taking the ratio of the height of the left side of the image to the generation parameter as a first ratio, and rounding down the first ratio to obtain a first step length; Taking the ratio of the width of the upper edge of the image to the generation parameter as a second ratio, and rounding down the second ratio to obtain a second step length; The division submodule is used to divide the preprocessed image according to the first step length and the second step length to obtain a plurality of predicted image blocks; wherein the product of the first step length and the second step length is the number of generated predicted image blocks.
5. The system for automatically generating effective coordinate regions of pathological images as claimed in claim 4, characterized in that: The position determination module comprises: The image block judgment submodule is used to judge whether the position of the predicted image block exceeds the original image boundary according to the preset judgment rule, and obtain the image block judgment result; An image block traversal submodule is used to traverse a number of predicted image blocks to obtain image block traversal results; The information determination submodule is used to determine the position information of the predicted image block according to the image block judgment result and the image block traversal result; wherein the position information includes the upper left corner coordinates, the lower right corner coordinates and the offset relative to the original image of the predicted image block.
6. The system for automatically generating effective coordinate regions of pathological images as claimed in claim 5, characterized in that: The image block judgment submodule includes: A first judgment submodule is used to judge whether the first ratio is an integer, and then judge whether the bottom of the predicted image block in the last column in the horizontal direction exceeds the boundary of the original image, to obtain a first judgment result; A second judgment submodule is used to judge whether the second ratio is an integer, and then judge whether the right side of the predicted image block of the last row in the vertical direction exceeds the original image boundary to obtain a second judgment result; A third judgment submodule is used to judge whether the first ratio and the second ratio are both integers, and then judge whether the predicted image block in the lower right corner exceeds the boundary of the original image, to obtain a third judgment result; The result determination submodule is used to determine the prediction image block judgment result according to the first judgment result, the second judgment result and the third judgment result.
7. The system for automatically generating effective coordinate regions of pathological images as claimed in claim 6, characterized in that: The information determination submodule includes: A non-super-boundary image block position determination submodule, used to determine a first position determination rule according to generation parameters of the predicted image block, a first step length and a second step length, and determine position information of the non-super-boundary predicted image block according to the first position determination rule; A first beyond-boundary image block position determination submodule is used for, when the first judgment result is that the bottom of the predicted image block in the last column in the horizontal direction exceeds the boundary of the original image, using the predicted image block as the first beyond-boundary image block, traversing the position in the horizontal direction, determining a second position determination rule according to generation parameters of the predicted image block, the first step length, the second step length, and the left height of the image of the preprocessed image, and determining the position information of the first beyond-boundary predicted image block according to the second position determination rule; A second beyond-boundary image block position determination submodule, for, when the second judgment result is that the right side of the predicted image block in the last row in the vertical direction exceeds the boundary of the original image, using the predicted image block as the second beyond-boundary image block, traversing the position in the vertical direction, determining a third position determination rule according to generation parameters of the predicted image block, the first step length, the second step length, and the image top width of the preprocessed image, and determining position information of the second beyond-boundary predicted image block according to the third position determination rule; The third super-boundary image block position determination submodule is used to, when the third judgment result is that the predicted image block in the lower right corner exceeds the boundary of the original image, use the predicted image block as the third super-boundary image block, determine the fourth position determination rule according to the generation parameters of the predicted image block, the first step length, the second step length, the image left height of the preprocessed image, and the image top width of the preprocessed image, and determine the position information of the third super-boundary predicted image block according to the fourth position determination rule.
8. The system for automatically generating effective coordinate regions of pathological images as claimed in claim 5, characterized in that: The effective coordinate area generation module includes: A parameter acquisition submodule, used to acquire position parameters used to calculate the position of the predicted image block in the original image; The original position determination submodule is used to: Determine the horizontal coordinate of the predicted image block at the upper left corner position in the original image according to the difference between the horizontal coordinate of the upper left corner coordinate of the predicted image block and the position parameter; Determine the vertical coordinate of the predicted image block at the upper left corner position in the original image according to the difference between the vertical coordinate of the upper left corner coordinate of the predicted image block and the position parameter; Determine the upper left corner position of the predicted image block in the original image according to the horizontal coordinate and the vertical coordinate of the upper left corner position; An initialization submodule, used to assign the position parameters to the horizontal offset and the vertical offset of the predicted image block respectively, so as to realize the offset initialization of the predicted image block; The first processing submodule is used for, when it is determined that the upper left corner of the predicted image block is at the left boundary of the original image, determining that the left side of the predicted image block exceeds the range of the original image, adding the horizontal coordinate of the predicted image block at the upper left corner position in the original image to the position parameter, and modifying the horizontal offset of the predicted image block to 0, marking the out-of-range area, and determining that the area whose left side exceeds the original image does not need to be cropped; A second processing submodule is used for, when it is determined that the upper left corner of the predicted image block is at the upper boundary of the original image, determining that the upper edge of the predicted image block exceeds the range of the original image, adding the vertical coordinate of the predicted image block at the upper left corner position in the original image to the position parameter, and modifying the vertical offset of the predicted image block to 0, marking the out-of-range area, and determining that the area whose upper edge exceeds the original image does not need to be cropped; A third processing submodule is used for, when it is determined that the upper left corner of the predicted image block is at the right boundary of the original image, determining that the right side of the predicted image block exceeds the range of the original image, subtracting the horizontal coordinate of the predicted image block at the upper left corner position in the original image from the position parameter, and modifying the horizontal offset of the predicted image block to twice the position parameter, marking the out-of-range area, and determining that the area whose right side exceeds the original image needs to be cropped; a fourth processing submodule, for determining that the lower edge of the predicted image block exceeds the range of the original image when it is determined that the upper left corner of the predicted image block is at the lower boundary of the original image, subtracting the vertical coordinate of the predicted image block at the upper left corner position in the original image from the position parameter, modifying the vertical offset of the predicted image block to twice the position parameter, marking the out-of-range area, and determining that the area whose lower edge exceeds the original image needs to be cropped; The region determination submodule is used to determine the effective coordinate region of the image according to the above processing results.
9. The system for automatically generating effective coordinate regions of pathological images according to claim 1, characterized in that: The system also includes a contour marking module, which is used to perform contour marking on the valid coordinate area; The contour marking module comprises: An image conversion submodule, used for converting the pathological image corresponding to the effective coordinate area into a grayscale image; A first detection submodule, configured to perform a first edge detection operation on the grayscale image using an edge detection operator to obtain a first detection image; Image binarization submodule, used for: Obtaining the grayscale mean and grayscale value standard deviation of all pixels in the first detection image, and determining the pixel threshold of the first detection image according to the grayscale mean, grayscale value standard deviation and preset binarization parameters; The pixel points whose pixel values in the image are lower than the pixel threshold are set to black, and the remaining pixel points are set to white, so as to obtain a binary image corresponding to the first detection image; An image operation submodule, used for first performing an erosion operation on the binary image, and then performing an expansion operation to obtain an operation image; A second detection submodule is used to perform contour detection on the operation image to obtain a plurality of contour curves; A contour comparison submodule, used for comparing the areas of the acquired contour curves, and determining the contour curve with the largest area as the target contour curve corresponding to the pathological image corresponding to the effective coordinate area; The marking submodule is used to mark the target contour curve.
10. The system for automatically generating effective coordinate regions of pathological images according to claim 9, characterized in that: The system also includes an image output module, which is used to output the contour-marked pathological image to a terminal interface for display.
Citation Information
Patent Citations
Automatic segmentation method for lesion area in digital pathological full slice image
CN108629777A
Flight target detection method and system based on image processing
CN109636771A
Intracranial aneurysm segmentation method and device, electronic equipment and storage medium
CN113012166A
Intelligent cancer cell identification method for pathological image
CN115294126A
A beta plaque digital reconstruction method for mouse brain three-dimensional image data
CN116958422A