An automatic generation system for effective coordinate regions of pathological images
Through image acquisition, preprocessing and image block generation modules, the effective coordinate area of the pathological image is automatically generated, which solves the complex operation problems in the prior art and improves the analysis efficiency and diagnostic accuracy of the pathological image.
Patent Information
- Application Number
- CN202411585413.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2044-11-08
AI Technical Summary
The prior art has complex operations when generating effective coordinate areas of pathological images, resulting in low analysis efficiency and insufficient diagnostic accuracy.
Through image acquisition, preprocessing, image block generation and position determination modules, the effective coordinate area of the pathological image is automatically generated, including image noise reduction, enhancement, and normalization processing, and dividing image blocks and determining their position information according to preset generation rules.
It realizes the simple and effective generation of effective coordinate regions of pathological images, and improves analysis efficiency and diagnostic accuracy.
Smart Images

Figure CN119599953B_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 advancement of medical imaging technology, pathology images are becoming increasingly important in clinical diagnosis and treatment. Pathology images are typically high-resolution and large in size, containing a wealth of pathological information. When analyzing and processing these images, they need to be divided into small image blocks for more refined tasks such as lesion detection, region localization, and feature extraction. However, manually defining the positions of image blocks is time-consuming and error-prone. Therefore, a technical solution is needed to automatically generate valid coordinate regions in pathology images to improve analysis efficiency and accuracy.
[0003] Application publication number: CN115294126A, discloses a method for intelligent cancer cell recognition in pathological images, 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, by removing the invalid area to significantly improve the image recognition processing speed, removing the background area includes the following steps: A1: sampling the pathological image, scaling the pathological image to a first size; A2: binarizing the reduced pathological image; A3: performing a morphological dilation operation on the area where the pixels of the pathological image after the binarization operation are 0; A4: extracting the area where the pixels of the pathological image after the binarization operation are 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 corresponding 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 consists of five cascade modules, and the feature fusion network consists of five cascade sub-modules; the feature fusion network outputs n types 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 rectangularly cut into blocks to obtain an image block set, and the back-propagation strategy is used to train the cancer cell recognition network parameters to obtain the final network parameters; S4: cancer cell recognition inference, 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, using a parallel strategy to assign a sub-computing thread to each image block, and 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] While the above technical solution achieves the generation of valid coordinate regions for pathological images, the operation process is relatively complex. Therefore, how to simply and effectively generate valid coordinate regions in pathological images, thereby improving the efficiency of pathological image analysis and diagnostic accuracy, is one of the urgent problems to be solved in the field of pathological image processing technology. Summary of the Invention
[0005] The present invention aims to at least partially address the technical problems of the above-mentioned technologies. To this end, the present invention provides a system for automatically generating effective coordinate regions in pathological images. This system divides a pre-processed pathological image into several image blocks, determines the position information of the image blocks, and then determines the effective coordinate regions of the pathological image based on the position information. This system achieves the technical effect of simply and effectively generating effective coordinate regions in pathological images, thereby improving the analysis efficiency and diagnostic accuracy of 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, configured to process the preprocessed image according to a preset generation rule to generate a plurality 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 effective coordinate region of the image according to the processing result.
[0012] Preferably, the system for automatically generating effective coordinate areas of pathological images, the image preprocessing module, includes:
[0013] An image denoising submodule is used to perform image denoising operations on pathological images to obtain denoised images;
[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, includes:
[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 for:
[0019] Obtain N clear images from a pathology image library, determine the H channel mean and V channel mean corresponding to all pixels in each clear image, and determine the total H channel mean and V channel mean of the N clear images based on the N H channel means and 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] Grayscale value correction submodule, used for:
[0022] Determine any pixel in the color-corrected image as the center pixel, and determine a 64*64 area centered on the center pixel 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 and minimum grayscale values 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] Perform the above operations 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;
[0027] The filtering submodule is used to perform Laplace filtering on the grayscale 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 areas of pathological images, the image block generation module, includes:
[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 the 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 get the first step length;
[0035] The ratio of the width of the upper edge of the image to the generated parameter is used as the second ratio, and the second ratio is rounded down to obtain the 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, includes:
[0038] An image block judgment submodule is used to judge whether the position of a predicted image block exceeds the original image boundary according to a preset judgment rule, and obtain an 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, includes:
[0042] A first judgment submodule is configured to judge whether the first ratio is an integer, and further 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 configured to judge whether the second ratio is an integer, and further judge whether the right side of the predicted image block in the last row in the vertical direction exceeds the boundary of the original image, 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 configured to determine a 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 effective coordinate areas of pathological images, the information determination submodule, includes:
[0047] a non-over-boundary image block position determination submodule, configured to determine a first position determination rule based on generation parameters of the predicted image block, a first step length, and a second step length, and determine position information of the non-over-boundary predicted image block based on the first position determination rule;
[0048] a first out-of-bounds image block position determination submodule configured to, when a first judgment result indicates that the bottom of the predicted image block in the last column in the horizontal direction exceeds the boundary of the original image, use the predicted image block as the first out-of-bounds image block, traverse the position in the horizontal direction, determine a second position determination rule based on generation parameters of the predicted image block, a first step size, a second step size, and the height of the left edge of the pre-processed image, and determine position information of the first out-of-bounds predicted image block based on the second position determination rule;
[0049] a second out-of-bounds image block position determination submodule configured to, when the second judgment result is that the right side of the predicted image block in the last vertical row exceeds the original image boundary, use the predicted image block as the second out-of-bounds image block, traverse the vertical position, determine a third position determination rule based on generation parameters of the predicted image block, the first step size, the second step size, and the width of the upper edge of the pre-processed image, and determine position information of the second out-of-bounds predicted image block based on the third position determination rule;
[0050] The third out-of-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 out-of-boundary image block, determine the fourth position determination rule based on the generation parameters of the predicted image block, the first step length, the second step length, the left image height of the preprocessed image, and the top image width of the preprocessed image, and determine the position information of the third out-of-boundary predicted image block according to the fourth position determination rule.
[0051] Preferably, the system for automatically generating effective coordinate regions of pathological images, and the effective coordinate region generation module, include:
[0052] A parameter acquisition submodule is used to obtain 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 upper left corner of the predicted image block in the original image according to the difference between the horizontal coordinate of the upper left corner of the predicted image block and the position parameter;
[0055] Determine the vertical coordinate of the upper left corner of the predicted image block in the original image according to the difference between the vertical coordinate of the upper left corner 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 coordinates and vertical coordinates of the upper left corner position;
[0057] An initialization submodule, used to assign position parameters to the horizontal offset and vertical offset of the predicted image block respectively, so as to initialize the offset of the predicted image block;
[0058] a first processing submodule, configured 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;
[0059] a second processing submodule, configured 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 coordinates 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;
[0060] a third processing submodule, configured 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;
[0061] a fourth processing submodule, configured 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 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 based on 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 effective coordinate regions;
[0064] Contour marking module, including:
[0065] An image conversion submodule, used to convert the pathological image corresponding to the valid 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 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 standard deviation, and a preset binarization parameter;
[0069] The pixels in the image whose pixel values are lower than the pixel threshold are set to black, and the remaining pixels are set to white, to obtain a binary image corresponding to the first detection image;
[0070] The image operation submodule is used to 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 and obtain a number of contour curves;
[0072] The 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 valid 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 includes an image output module for outputting the contour-marked pathological image to a terminal interface for display.
[0075] The present invention provides a system for automatically generating effective coordinate areas 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 area generation module for determining whether to perform image area processing according to the position information of the predicted image blocks, and determining the effective coordinate area of the image according to the processing results, thereby achieving the technical effect of simply and effectively generating effective coordinate areas in pathological images, thereby improving the analysis efficiency and diagnostic accuracy of pathological images.
[0076] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be 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 areas 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 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 with reference to 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 is used to acquire 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 is configured to process the pre-processed image according to a preset generation rule to generate a plurality of predicted image blocks;
[0088] A position determination module 40, configured 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 effective coordinate region of the image 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 performing enhancement processing on the pathological image, performing noise reduction processing on the pathological image, performing filtering processing on the pathological image, performing normalization processing on the pathological image, and the like.
[0092] In this embodiment, the preset generation rule may be to calculate the ratio of the height and width of the pathological image to 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, a specific implementation method for determining whether to perform image area processing based on the position information of the predicted image block may 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 that side needs to be cropped.
[0095] The technical principle and technical effect of the above technical solution 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 effective coordinate area of the image according to the processing result, thereby realizing the simple and effective generation of the effective 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 areas of pathological images, and an image preprocessing module, including:
[0097] An image denoising submodule is used to perform image denoising operations on pathological images to obtain denoised images;
[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 the image enhancement operation on the denoised image can be: performing spatial transformation on the denoised image, performing color correction and grayscale value correction on the image after the transformation is completed, and filtering the image after the grayscale value correction to achieve the image enhancement operation on the denoised image.
[0102] In this embodiment, the specific implementation method of the image normalization operation on the enhanced image can 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; and 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 user's visual effect.
[0104] The embodiment of the present invention provides a system for automatically generating effective coordinate areas of pathological images, and 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 for:
[0107] Obtain N clear images from a pathology image library, determine the H channel mean and V channel mean corresponding to all pixels in each clear image, and determine the total H channel mean and V channel mean of the N clear images based on the N H channel means and 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] Grayscale value correction submodule, used for:
[0110] Determine any pixel in the color-corrected image as the center pixel, and determine a 64*64 area centered on the center pixel 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 and minimum grayscale values 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] Perform the above operations 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;
[0115] The filtering submodule is used to perform Laplace filtering on the grayscale 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 spatial conversion submodule is configured to convert the fused image from the HSV color space to the RGB color space to obtain an enhanced image. In this embodiment, a specific implementation of determining a target grayscale histogram corresponding to a target area based on grayscale values and the frequency of occurrence of grayscale values may be as follows: the target grayscale histogram corresponding to the target area is determined using the grayscale value as the horizontal axis and the frequency of occurrence of the grayscale value as the vertical axis.
[0118] In this embodiment, the preset coefficient may be 255.
[0119] In this embodiment, a specific implementation method of performing Laplace filtering on the grayscale value corrected image to obtain a Laplace image may be: selecting any pixel point of the grayscale value corrected image, obtaining the pixel value of the pixel point and the four pixel points above, below, left and right of the pixel point, adding the pixel values of the four pixel points above, below, left and right to obtain a pixel value sum, multiplying the pixel value of the selected pixel point by 4 to obtain a 4-fold pixel value, obtaining the difference between the pixel value sum and the 4-fold pixel value, obtaining the difference between the pixel value of the selected pixel point and the difference, and using 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; performing the above operations on all pixel points in the grayscale value corrected image, completing the Laplace filtering of the grayscale value corrected image, and obtaining a Laplace image.
[0120] The technical principle and technical effect of the above technical solution are: the H channel value and V channel value of the denoised image after spatial conversion are corrected to obtain a color-corrected image; by determining the central pixel sub-region of the color-corrected image, the target grayscale histogram of the sub-region is obtained, and the pixel value of the central pixel point 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 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 thereby improving the analysis and diagnosis efficiency of pathological images.
[0121] Reference Figure 2 The embodiment of the present invention provides a system for automatically generating effective coordinate areas of pathological images, and an image block generation module, including:
[0122] The size acquisition submodule 301 is used to acquire the left edge height and top edge width of the pre-processed image;
[0123] The parameter receiving submodule 302 is used to receive generation parameters of the predicted image block;
[0124] The step size 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 get the first step length;
[0126] The ratio of the width of the upper edge of the image to the generated parameter is used as the second ratio, and the second ratio is rounded down to obtain the second step length;
[0127] The division submodule 304 is used to divide the pre-processed 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 the 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 that stores the left image height and the 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 used as the first ratio, and the first step length is obtained by rounding down the first ratio. The code implementation can 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 code implementation of rounding down the second ratio to obtain the second step length 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 solution are: obtaining the left height and top width of the preprocessed image; receiving the generation parameters of the predicted image block; taking the ratio of the left height of the image 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 width of the image 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 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, thereby realizing 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 effective coordinate areas of pathological images, and a position determination module, including:
[0135] An image block judgment submodule is used to judge whether the position of a predicted image block exceeds the original image boundary according to a preset judgment rule, and obtain an 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, the traversal of the plurality of predicted image blocks may be performed starting from the first predicted image block.
[0139] The technical principle and technical effect of the above technical solution are: according to preset judgment rules, 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 areas of pathological images, and an image block judgment submodule, including:
[0141] A first judgment submodule is configured to judge whether the first ratio is an integer, and further 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 configured to judge whether the second ratio is an integer, and further judge whether the right side of the predicted image block in the last row in the vertical direction exceeds the boundary of the original image, 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 configured to determine a 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 by 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, whether the second ratio is an integer can be determined by the code if not width%config.PREDEFINED_SIZE==0. 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 == 0 or width% config.PREDEFINED_SIZE == 0) can be used to determine whether the first ratio and the second ratio are both integers. If both 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 subsequent operation based on the judgment result.
[0149] The embodiment of the present invention provides a system for automatically generating effective coordinate areas of pathological images, and an information determination submodule, including:
[0150] a non-over-boundary image block position determination submodule, configured to determine a first position determination rule based on generation parameters of the predicted image block, a first step length, and a second step length, and determine position information of the non-over-boundary predicted image block based on the first position determination rule;
[0151] a first out-of-bounds image block position determination submodule configured to, when a first judgment result indicates that the bottom of the predicted image block in the last column in the horizontal direction exceeds the boundary of the original image, use the predicted image block as the first out-of-bounds image block, traverse the position in the horizontal direction, determine a second position determination rule based on generation parameters of the predicted image block, a first step size, a second step size, and the height of the left edge of the pre-processed image, and determine position information of the first out-of-bounds predicted image block based on the second position determination rule;
[0152] a second out-of-bounds image block position determination submodule configured to, when the second judgment result is that the right side of the predicted image block in the last vertical row exceeds the original image boundary, use the predicted image block as the second out-of-bounds image block, traverse the vertical position, determine a third position determination rule based on generation parameters of the predicted image block, the first step size, the second step size, and the width of the upper edge of the pre-processed image, and determine position information of the second out-of-bounds predicted image block based on the third position determination rule;
[0153] The third out-of-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 out-of-boundary image block, determine the fourth position determination rule based on the generation parameters of the predicted image block, the first step length, the second step length, the left image height of the preprocessed image, and the top image width of the preprocessed image, and determine the position information of the third out-of-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. Here, 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. Where x ranges from 0 to the second step size, and y_step is the first step size.
[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 the regions.append() function is a position information acquisition function, and width-config.PREDEFINED_SIZE is a position information acquisition function. 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. y ranges from 0 to the first step size, and x_step is the second step size.
[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 the regions.append() function is a position information acquisition function, and 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. 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 solution are: determining a first position determination rule according to the generation parameters, the first step length and the second step length of the predicted image block, 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, the first step length, the second step length and the height of the left side of the preprocessed image of the predicted image block, 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. Position, determine the third position determination rule 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 determine the position information of the second super-boundary predicted image block 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 boundary of the original image, use the predicted image block as the third super-boundary image block, and 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, 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 through 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] The parameter acquisition submodule 501 is used to obtain 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 upper left corner of the predicted image block in the original image according to the difference between the horizontal coordinate of the upper left corner of the predicted image block and the position parameter;
[0163] Determine the vertical coordinate of the upper left corner of the predicted image block in the original image according to the difference between the vertical coordinate of the upper left corner 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 coordinates and vertical coordinates 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, to initialize the offset of the prediction image block;
[0166] The first processing submodule 504 is configured 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 configured 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 configured 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 configured 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 valid 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 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 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 coordinate of the predicted image block at the upper left corner position in the original image based on the difference between the horizontal coordinate in the upper left corner coordinate 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 coordinate of the predicted image block at the upper left corner position in the original image, region[0] is the current horizontal coordinate of the upper left corner of the image block, and region[] is an array storing the image block position information.
[0173] In this embodiment, the code implementation for determining the vertical coordinates of the predicted image block at the upper left corner position 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 at the upper left corner position in the original image, region[1] is the current vertical coordinates of the upper left corner 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 the area whose left side exceeds the original image does not need to be cropped can be: if region[0]==0:shifted_region_x=shifted_region_x+config.BORDER_SIZE, clip_region_x=0, where 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 represents 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 coordinate of the predicted image block at the upper left corner position in the original image is 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 the area that needs to be cropped and exceeds the right side of the original image 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: determining the position information of the image block in the original image through the current position information and position parameters of the image block, ensuring the consistency of the size of the image block, and modifying the position and offset of the image block in the original image by judging whether the upper left corner of the image block is at a certain boundary of the original image, thereby achieving the technical effect of minimizing the invalid area to the greatest extent 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, the system further comprising a contour marking module for contour marking effective coordinate regions;
[0181] Contour marking module, including:
[0182] An image conversion submodule, used to convert the pathological image corresponding to the valid 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 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 standard deviation, and a preset binarization parameter;
[0186] The pixels in the image whose pixel values are lower than the pixel threshold are set to black, and the remaining pixels are set to white, to obtain a binary image corresponding to the first detection image;
[0187] The image operation submodule is used to 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 and obtain a number of contour curves;
[0189] The 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 valid 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 use 1 / 3 of the sum obtained by adding the three channel values as the pixel value of the pixel point. The above operation is performed 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 pixel points in the first detection image are obtained, and the specific implementation method of determining the pixel threshold of the first detection image based on 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 solution 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, realizing 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] An embodiment of the present invention provides a system for automatically generating effective coordinate areas of pathological images. The system further includes an image output module for outputting contour-marked pathological images to a terminal interface for display.
[0196] In this embodiment, the terminal interface can 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 pathology image to the terminal interface for display, realizing the intuitive display of the contour-marked pathology image, which is conducive to the image analysis and diagnosis of the contour-marked pathology image.
[0198] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
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, configured to preprocess the pathological image to obtain a preprocessed image; An image block generation module, configured to process the pre-processed image according to a preset generation rule to generate a plurality of predicted image blocks; A position determination module, configured to determine position information of the predicted image block; An effective coordinate region generating module, configured to determine whether to perform image region processing based on the position information of the predicted image block, and determine an image effective coordinate region based on the processing result; The image block generation module includes: 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 the 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; a division submodule, configured 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; The position determination module includes: An image block judgment submodule is used to judge whether the position of a predicted image block exceeds the original image boundary according to a preset judgment rule, and obtain an 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; An 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.
2. The automatic generation system of effective coordinate areas of pathological images according to claim 1, characterized in that: The image preprocessing module includes: An image denoising submodule is used to perform image denoising operations on pathological images to obtain denoised images; An image enhancement submodule, configured 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 automatic generation system of effective coordinate areas of pathological images according to claim 2, characterized in that: The image enhancement submodule includes: 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 for: Obtain N clear images from a pathology image library, determine the H channel mean and V channel mean corresponding to all pixels in each clear image, and determine the total H channel mean and V channel mean of the N clear images based on the N H channel means and 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; Grayscale 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 based on the grayscale values and the frequency of occurrence of the grayscale values; Determine the difference between the maximum and minimum grayscale values according to the target grayscale histogram, and use the ratio of a 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 grayscale minimum 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 correct the grayscale values of the pixels in the color-corrected image, thereby obtaining a grayscale-corrected image; The filtering submodule is used to perform Laplace filtering on the grayscale 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 areas of pathological images according to claim 1, wherein: The image block judgment submodule includes: A first judgment submodule is configured to judge whether the first ratio is an integer, and further 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 configured to judge whether the second ratio is an integer, and further judge whether the right side of the predicted image block in the last row in the vertical direction exceeds the boundary of the original image, 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 configured to determine a prediction image block judgment result according to the first judgment result, the second judgment result, and the third judgment result.
5. The automatic generation system of effective coordinate areas of pathological images according to claim 4, characterized in that: The information determination submodule includes: a non-over-boundary image block position determination submodule, configured to determine a first position determination rule based on generation parameters of the predicted image block, a first step length, and a second step length, and determine position information of the non-over-boundary predicted image block based on the first position determination rule; a first out-of-bounds image block position determination submodule configured to, when a first judgment result indicates that the bottom of the predicted image block in the last column in the horizontal direction exceeds the boundary of the original image, use the predicted image block as the first out-of-bounds image block, traverse the position in the horizontal direction, determine a second position determination rule based on generation parameters of the predicted image block, a first step size, a second step size, and the height of the left edge of the pre-processed image, and determine position information of the first out-of-bounds predicted image block based on the second position determination rule; a second out-of-bounds image block position determination submodule configured to, when the second judgment result is that the right side of the predicted image block in the last vertical row exceeds the original image boundary, use the predicted image block as the second out-of-bounds image block, traverse the vertical position, determine a third position determination rule based on generation parameters of the predicted image block, the first step size, the second step size, and the width of the upper edge of the pre-processed image, and determine position information of the second out-of-bounds predicted image block based on the third position determination rule; The third out-of-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 out-of-boundary image block, determine the fourth position determination rule based on the generation parameters of the predicted image block, the first step length, the second step length, the left image height of the preprocessed image, and the top image width of the preprocessed image, and determine the position information of the third out-of-boundary predicted image block according to the fourth position determination rule.
6. The system for automatically generating effective coordinate areas of pathological images according to claim 1, wherein: The effective coordinate area generation module includes: A parameter acquisition submodule is used to obtain position parameters used to calculate the position of the predicted image block in the original image; The original position determination submodule is used to: Determining 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; Determining the vertical coordinates of the predicted image block at the upper left corner position in the original image according to the difference between the vertical coordinates of the upper left corner coordinates of the predicted image block and the position parameter; Determining the upper left corner position of the predicted image block in the original image according to the horizontal coordinates and the vertical coordinates of the upper left corner position; an initialization submodule, configured to assign the position parameters to the horizontal offset and the vertical offset of the predicted image block, respectively, to initialize the offset of the predicted image block; a first processing submodule, configured 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; a second processing submodule, configured 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 coordinates 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; a third processing submodule, configured 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; a fourth processing submodule, configured 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 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 based on the above processing results.
7. The system for automatically generating effective coordinate areas of pathological images according to claim 1, wherein: The system further comprises a contour marking module for contour marking the valid coordinate area; The contour marking module includes: An image conversion submodule, used to convert the pathological image corresponding to the valid 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 a preset binarization parameter; The pixels in the image whose pixel values are lower than the pixel threshold are set to black, and the remaining pixels are set to white, to obtain a binary image corresponding to the first detection image; An image operation submodule, configured to perform an erosion operation and then a dilation operation on the binary image to obtain an operation image; A second detection submodule is used to perform contour detection on the calculated image to obtain a plurality of contour curves; 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; The marking submodule is used to perform contour marking on the target contour curve.
8. The system for automatically generating effective coordinate areas of pathological images according to claim 7, characterized in that: The system also includes an image output module for outputting the contour-marked pathological image to a terminal interface for display.
Citation Information
Patent Citations
Intelligent cancer cell identification method for pathological image
CN115294126A
A beta plaque digital reconstruction method for mouse brain three-dimensional image data
CN116958422A
Online injection mold quality detection system based on machine vision
CN117764981A