Pathological image rotation method and system, computing device and computer storage medium
By acquiring and preprocessing digital pathological images, and generating rotation instructions in response to user sliding operations to perform rotation processing, the problem of complicated rotation operations in the existing technology is solved, convenient and intuitive rotation operations are achieved, and user observation and analysis efficiency is improved.
Patent Information
- Application Number
- CN202411895649.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-22
AI Technical Summary
In the prior art, the rotation operation of digital pathological images is cumbersome and cannot be implemented conveniently and intuitively, affecting the user's observation and analysis efficiency.
By acquiring and preprocessing the digital pathological image, buffering the preprocessed image, and in response to the sliding operation of the user's sliding module, a rotation command is generated according to the preset control logic, and the image rotation process is performed, and the rotation image is finally output.
It reduces the difficulty and complexity of pathological image rotation operation, improves the convenience and intuitiveness of operation, accelerates the speed and fluency of image rotation, and improves the user experience and processing efficiency of users.
Smart Images

Figure CN119861855A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital medicine, and in particular to a pathological image rotation method, system, computing device and computer storage medium. Background Art
[0002] As the degree of digitization in the medical field gradually increases, digital pathology images are also applied to various medical fields; whether in clinical medicine, medical teaching or pathology research, digital pathology images can help doctors, pathologists and researchers to better complete the comprehensive observation and analysis of pathology images; because pathology images usually contain a large number of cells, tissues and lesion areas, if only observed from a single direction, it is difficult for the observer to accurately and fully obtain all relevant pathological information from the pathology images; therefore, rotating the pathology images can effectively assist the observer in observing and analyzing the pathology images.
[0003] Currently, common digital image rotation technologies usually achieve image rotation by clicking a rotation button or a rotation menu item in an image display program; using these two methods, users need to frequently click or select operations in the menu to complete image rotation; it can be seen that these two methods are cumbersome for users to operate and cannot intuitively and conveniently achieve the rotation of digital pathology images. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a pathological image rotation method and a corresponding pathological image rotation system, a computing device and a computer storage medium.
[0005] According to one aspect of the present invention, a pathological image rotation method is provided, the method comprising:
[0006] Acquire a digitized first pathological image, preprocess the first pathological image, and cache the preprocessed first pathological image;
[0007] In response to a user's sliding operation on the sliding module, generating a rotation instruction according to a preset control logic;
[0008] Based on the rotation instruction, the preprocessed first pathological image is rotated to obtain a second pathological image;
[0009] The second pathological image is output and displayed.
[0010] In the above solution, the step of obtaining a digitized first pathological image and preprocessing the first pathological image includes:
[0011] Acquire a first digitized pathological image, and perform grayscale processing on the first digitized pathological image to obtain a grayscale image;
[0012] In the grayscale image, any pixel point is selected as the first pixel point to be detected, and the first pixel point to be detected is taken as the center and the preset distance is taken as the radius to determine the first area to be detected;
[0013] Calculate the first grayscale mean of other pixels in the first area to be detected except the pixel to be detected;
[0014] Calculate the difference between the grayscale value of the pixel to be detected and the first grayscale mean, compare the difference with a preset edge difference threshold, and determine that the pixel whose difference is greater than the preset edge difference threshold is an edge point;
[0015] Based on the above method, edge points in the grayscale image are determined, and a first edge point set is generated;
[0016] Randomly select a pixel point in the first edge point set, determine whether it is an outlier point, and delete it if it is determined to be an outlier point to obtain a second edge point set;
[0017] Determine edge contour lines based on a pre-trained contour extraction model and a second edge point set, segment the grayscale image based on the edge contour lines, and obtain a plurality of local images of the first pathological image;
[0018] Perform image denoising on several local images.
[0019] In the above solution, in response to the user's sliding operation on the sliding module, generating a rotation instruction according to a preset control logic further includes:
[0020] Determine the corresponding relationship between the sliding length and the rotation angle according to the preset control logic;
[0021] The sliding length is determined according to the sliding operation; the image rotation angle is determined according to the sliding length and the corresponding relationship between the sliding length and the rotation angle, and a rotation instruction corresponding to the sliding operation is generated.
[0022] In the above scheme, image denoising is performed on a local image, including:
[0023] In the local image, a pixel point is randomly selected as a second pixel point to be detected, and a second area to be detected is determined with the second pixel point to be detected as the center and a preset distance as the radius;
[0024] Obtain the grayscale value of each pixel in the second area to be detected, determine the pixel with the maximum grayscale value in the second area to be detected as the first type of noise point; determine the pixel with the minimum grayscale value in the second area to be detected as the second type of noise point;
[0025] Determine a first difference between the grayscale value of the first type of noise point and the second largest grayscale value in the second area to be detected, and select the first type of noise point whose first difference is greater than the preset difference as the third pixel point to be detected;
[0026] Determine a second difference between the grayscale value of the second type of noise point and the second minimum grayscale value in the second to-be-detected area, and select the second type of noise point whose second difference is greater than the preset difference as the fourth to-be-detected pixel point;
[0027] Determine a third area to be detected with the third pixel point to be detected as the center and a preset distance as the radius;
[0028] Obtaining the grayscale value of each pixel in the third area to be detected, and calculating the second grayscale mean;
[0029] Calculate the first discreteness of the grayscale value of each pixel in the third area to be detected, and compare it with the preset discreteness; when the discreteness is less than or equal to the preset discreteness, replace the grayscale value of the third pixel to be detected with the second grayscale mean; when the first discreteness is greater than the preset discreteness, remove the grayscale maximum value and the grayscale minimum value in the third area to be detected, and recalculate the first discreteness of the grayscale value of each pixel in the third area to be detected, until the first discreteness of the grayscale value of each pixel in the third area to be detected is less than or equal to the preset discreteness, calculate the first final grayscale mean when the first discreteness of the grayscale value of each pixel in the third area to be detected is less than or equal to the preset discreteness, and replace the grayscale value of the third pixel to be detected with the first final grayscale mean;
[0030] Determine a fourth area to be detected with the fourth pixel point to be detected as the center and the preset distance as the radius;
[0031] Obtaining the grayscale value of each pixel in the fourth area to be detected, and calculating the third grayscale mean;
[0032] Calculate the second discreteness of the grayscale value of each pixel in the fourth area to be detected, and compare it with the preset discreteness; when the second discreteness is less than or equal to the preset discreteness, replace the grayscale value of the fourth pixel to be detected with the third grayscale mean; if the second discreteness is greater than the preset discreteness, remove the grayscale maximum value and the grayscale minimum value in the fourth area to be detected, and recalculate the second discreteness of the grayscale value of each pixel in the fourth area to be detected, until the second discreteness of the grayscale value of each pixel in the fourth area to be detected is less than or equal to the preset discreteness, calculate the second final grayscale mean when the second discreteness of the grayscale value of each pixel in the fourth area to be detected is less than or equal to the preset discreteness, and replace the grayscale value of the fourth pixel to be detected with the second final grayscale mean;
[0033] Based on replacing the grayscale values of all the third pixels to be detected and the fourth pixels to be detected, image denoising is completed for the local image.
[0034] In the above solution, in response to the user's sliding operation on the sliding module, generating a rotation instruction according to a preset control logic also includes:
[0035] Based on the position selection operation or the preset position, a rotation center point of the first pathological image is determined.
[0036] In the above scheme, the method of rotating the preprocessed first pathological image based on the rotation instruction to obtain the second pathological image further includes:
[0037] extracting a preprocessed first pathological image from a cache;
[0038] Using an asynchronous image processing algorithm, image processing is performed on the preprocessed first pathological image based on the rotation instruction to generate a second pathological image;
[0039] Adjust the parameters of the asynchronous image processing algorithm to optimize the animation of the pathological image rotation process.
[0040] In the above solution, the step of outputting and displaying the second pathological image further includes:
[0041] After displaying the animation of the pathological image rotation process, the second pathological image is displayed.
[0042] According to another aspect of the present invention, a pathological image rotation system is provided, comprising: a preprocessing module, an instruction generating module, a rotation module and a display module; wherein,
[0043] The preprocessing module is used to obtain a digitized first pathological image, preprocess the first pathological image, and cache the preprocessed first pathological image;
[0044] The instruction generating module is used to generate a rotation instruction according to a preset control logic in response to a user's sliding operation on the sliding module;
[0045] The rotation module is used to rotate the preprocessed first pathological image based on the rotation instruction to obtain a second pathological image;
[0046] The display module is used to output and display the second pathological image.
[0047] In the above scheme, the sliding module includes a sliding track and a sliding button, and the sliding button slides on the sliding track to implement the sliding operation; the sliding operation responded by the sliding button includes: pressing and dragging operation, cursor dragging operation, cursor clicking operation, and knob rotating operation;
[0048] The display module includes a display interface; wherein the display interface is used to display a target output image, a sliding track and a sliding button.
[0049] According to another aspect of the present invention, there is provided a computing device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0050] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the above-mentioned pathological image rotation method.
[0051] According to another aspect of the present invention, a computer storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute operations corresponding to the above-mentioned pathological image rotation method.
[0052] According to the technical solution provided by the present invention, a digital first pathological image is obtained, the first pathological image is preprocessed, and the preprocessed first pathological image is cached; in response to the user's sliding operation on the sliding module, a rotation instruction is generated according to a preset control logic; based on the rotation instruction, the preprocessed first pathological image is rotated to obtain a second pathological image; the second pathological image is output and displayed; by rotating the digital pathological image in response to the user's sliding operation on the sliding module, the difficulty and complexity of the operation are greatly reduced, thereby reducing the user's learning cost, so that the user can easily complete the rotation of the digital pathological image, and by preprocessing and caching the digital pathological image, the speed and smoothness of the image rotation process are greatly accelerated, so that the rotation process of the pathological picture is intuitive and clear, and the display effect is soothing and smooth, so that the user can comprehensively and carefully observe and analyze the pathological image, which helps medical workers to better discover pathological information therefrom, and effectively improves the processing efficiency and user experience.
[0053] 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 may be understood by practicing the present invention; the purposes and other advantages of the present invention may be realized and obtained through the structures particularly pointed out in the written description and the accompanying drawings.
[0054] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] 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:
[0056] Figure 1 A flow chart of a pathological image rotation method according to an embodiment of the present invention is shown;
[0057] Figure 2 A flow chart of a method for generating a rotation instruction based on a sliding module according to an embodiment of the present invention is shown;
[0058] Figure 3 A structural block diagram of a pathological image rotation system according to an embodiment of the present invention is shown;
[0059] Figure 4 A schematic diagram of the structure of a computing device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0060] 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.
[0061] Figure 1 A pathological image rotation method according to an embodiment of the present invention is shown, and the method comprises the following steps:
[0062] Step S101: acquiring a digitized first pathological image, preprocessing the first pathological image, and caching the preprocessed first pathological image.
[0063] Specifically, the step of acquiring a digitized first pathological image and preprocessing the first pathological image further includes:
[0064] Extracting all digital image information of the first pathological image; and performing image rendering and preloading on the first pathological image based on the all digital image information of the first pathological image.
[0065] Preferably, the step of acquiring a digitized first pathological image and preprocessing the first pathological image includes:
[0066] Acquire a first digitized pathological image, and perform grayscale processing on the first digitized pathological image to obtain a grayscale image;
[0067] In the grayscale image, any pixel point is selected as the first pixel point to be detected, and the first pixel point to be detected is taken as the center and the preset distance is taken as the radius to determine the first area to be detected;
[0068] Calculate the first grayscale mean of other pixels in the first area to be detected except the pixel to be detected;
[0069] Calculate the difference between the grayscale value of the pixel to be detected and the first grayscale mean, compare the difference with a preset edge difference threshold, and determine that the pixel whose difference is greater than the preset edge difference threshold is an edge point;
[0070] Based on the above method, edge points in the grayscale image are determined, and a first edge point set is generated;
[0071] Randomly select a pixel point in the first edge point set, determine whether it is an outlier point, and delete it if it is determined to be an outlier point to obtain a second edge point set;
[0072] Determine edge contour lines based on a pre-trained contour extraction model and a second edge point set, segment the grayscale image based on the edge contour lines, and obtain a plurality of local images of the first pathological image;
[0073] Perform image denoising on several local images.
[0074] In this embodiment, grayscale processing is a method of converting an image from color to grayscale. Common grayscale processing methods include maximum method, average method and weighted average method. The advantage of grayscale is that compared with color images, grayscale images occupy less memory and run faster. At the same time, they can increase visual contrast and highlight the target area.
[0075] In this embodiment, the outlier point is, in order to detect the outlier point, we can calculate the Euclidean distance between each point and its adjacent points and sort these distances; then, we can select a threshold and regard the points with a distance greater than the threshold as outliers.
[0076] In this embodiment, in a possible implementation, the contour extraction model can be obtained in the following manner:
[0077] Collect sample image information;
[0078] Establishing a training set and a test set according to the sample image information;
[0079] Using the training set to train a preset feature extraction network model to obtain a contour extraction model;
[0080] The contour extraction model is tested and adjusted using the test set to obtain the contour extraction model.
[0081] In this embodiment, image noise reduction is to reduce the noise in the image, thereby improving the quality of the image.
[0082] In this embodiment, edge points usually correspond to locations in the image where the grayscale value changes significantly, that is, the boundary points of the object. The change in grayscale value can reflect the color and brightness changes of the pixels in the image. In practical applications, edge detection usually considers the information of edge points and grayscale values at the same time.
[0083] In this embodiment, the local image is the image after the first pathological image is segmented.
[0084] In this embodiment, the edge contour lines are lines or contours at the edge positions of objects in the image. These edge contour lines usually correspond to the boundaries of the objects in the image and can provide information such as the position, shape and size of the objects.
[0085] In this embodiment, the edge point is a position where the gray level in the image changes significantly, and usually corresponds to a boundary point of an object in the image.
[0086] In this embodiment, the preset edge difference threshold is a preset standard value for determining the edge difference.
[0087] In this embodiment, the grayscale mean is the average value of the grayscale values of the pixels.
[0088] The above technical beneficial effects are as follows: grayscale processing is performed on the digitized first pathological image to increase visual contrast, highlight the target area, and improve the running speed; a pixel point is randomly selected in the grayscale image, and the first area to be detected is determined with the first pixel point to be detected as the center and the preset distance as the radius; edge point detection is performed based on the area to be detected, all pixels in the grayscale image are traversed, and the first edge point set is determined to complete the first screening of the pixels in the grayscale image; based on the Euclidean distance, it is determined whether the pixel points in the first edge point set are outliers, and the second edge point set is determined to complete the second screening of the pixels in the grayscale image; the accuracy of the edge detection points is improved based on the two screenings, and the edge contour lines are determined by the pre-trained contour extraction model and the second edge point set, and the grayscale image is segmented based on the edge contour lines to obtain several local images of the first pathological image; by detecting and determining the edge contour of the first pathological image, the grayscale image is segmented based on the edge contour lines, thereby improving the accuracy of the segmentation of the first pathological image.
[0089] Preferably, based on all digitized image information of the first pathological image, the first pathological image is rendered by an image rendering technology, and is preloaded after the rendering is completed, so that the corresponding pathological image can be quickly displayed.
[0090] Preferably, after image rendering is completed, the preprocessed first pathological image is cached to facilitate subsequent rapid reading and processing of the pathological image.
[0091] Step S102 , in response to a user's sliding operation on the sliding module, generating a rotation instruction according to a preset control logic.
[0092] Step S103: rotating the preprocessed first pathological image based on the rotation instruction to obtain a second pathological image.
[0093] Specifically, a preprocessed first pathological image is extracted from a cache; an asynchronous image processing algorithm is used to perform image processing on the preprocessed first pathological image based on a rotation instruction to generate a second pathological image; and the parameters of the asynchronous image processing algorithm are adjusted to optimize the process animation of the pathological image rotation.
[0094] Step S104: output and display the second pathological image.
[0095] Specifically, after displaying the animation of the pathological image rotating process, the second pathological image is displayed.
[0096] According to the pathological image rotation method provided in this embodiment, a digital first pathological image is obtained, the first pathological image is preprocessed, and the preprocessed first pathological image is cached; in response to the user's sliding operation on the sliding module, a rotation instruction is generated according to a preset control logic; based on the rotation instruction, the preprocessed first pathological image is rotated to obtain a second pathological image; the second pathological image is output and displayed; by rotating the digital pathological image in response to the user's sliding operation on the sliding module, the difficulty and complexity of the operation are greatly reduced, thereby reducing the user's learning cost, so that the user can easily complete the rotation of the digital pathological image, and by preprocessing and caching the digital pathological image, the speed and smoothness of the image rotation process are greatly accelerated, while ensuring the image quality and detail integrity, the rotation process of the pathological image is intuitive and clear, and the display effect is soothing and smooth, so that the user can comprehensively and carefully observe and analyze the pathological image, which helps medical workers to better discover pathological information therefrom, and effectively improves the processing efficiency and user experience.
[0097] Figure 2 FIG. 4 shows a method for generating a rotation instruction based on a sliding module according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0098] Step S201, determining the corresponding relationship between the sliding length and the rotation angle according to a preset control logic.
[0099] Preferably, the total length of the sliding track in the sliding module is matched with the rotation angle (360°) of one rotation to obtain the corresponding relationship between the sliding length and the rotation angle.
[0100] Step S202: determining a sliding length according to the sliding operation.
[0101] Step S203: determining a rotation center point of the first pathological image based on a position selection operation or a preset position.
[0102] Preferably, the preset position of the rotation center point is the midpoint of the first pathological image; in addition, the user can also determine a new rotation center point to replace the preset position at the position where observation is required through a position selection operation based on observation needs. The position selection operation can determine the rotation center point by clicking a cursor, pressing a touch screen, or inputting position coordinates, and the specific method is not limited here.
[0103] Step S204, according to the sliding length, the rotation center point, and the corresponding relationship between the sliding length and the rotation angle, the image rotation angle is determined and a rotation instruction corresponding to the sliding operation is generated.
[0104] Specifically, according to the sliding length, the rotation angle of the digital pathological image is determined by utilizing the corresponding relationship between the sliding length and the rotation angle.
[0105] Specifically, based on the rotation angle and the rotation center point, the rotation mode of the first pathological image is determined, and then the corresponding rotation instruction is generated accordingly.
[0106] Preferably, by selecting a smaller unit angle, the precision of the corresponding relationship between the sliding length and the rotation angle is increased, such as changing 10 mm corresponding to 10° to 10 mm corresponding to 1°, so as to improve the accuracy of the rotation process. The corresponding relationship between the sliding length and the rotation angle can be automatically generated or pre-set by the user according to needs.
[0107] Preferably, the sliding module slides from left to right and the corresponding first pathological image rotates clockwise.
[0108] According to the above method, a rotation instruction can be generated based on the sliding operation and the corresponding relationship between the sliding length and the rotation angle, and the sliding operation can be converted into the rotation of the pathological picture. At the same time, by determining the rotation center point by itself, the degree of freedom of the rotation operation is increased, so that users can conduct more targeted observations and analysis, and more effectively assist users in pathological analysis; by increasing the precision of the corresponding relationship between the sliding length and the rotation angle, the rotation process corresponding to the sliding operation is made more accurate and smoother, greatly improving the user experience.
[0109] Preferably, performing image denoising on the local image includes:
[0110] In the local image, a pixel point is randomly selected as a second pixel point to be detected, and a second area to be detected is determined with the second pixel point to be detected as the center and a preset distance as the radius;
[0111] Obtain the grayscale value of each pixel in the second area to be detected, determine the pixel with the maximum grayscale value in the second area to be detected as the first type of noise point; determine the pixel with the minimum grayscale value in the second area to be detected as the second type of noise point;
[0112] Determine a first difference between the grayscale value of the first type of noise point and the second largest grayscale value in the second area to be detected, and select the first type of noise point whose first difference is greater than the preset difference as the third pixel point to be detected;
[0113] Determine a second difference between the grayscale value of the second type of noise point and the second minimum grayscale value in the second to-be-detected area, and select the second type of noise point whose second difference is greater than the preset difference as the fourth to-be-detected pixel point;
[0114] Determine a third area to be detected with the third pixel point to be detected as the center and a preset distance as the radius;
[0115] Obtaining the grayscale value of each pixel in the third area to be detected, and calculating the second grayscale mean;
[0116] Calculate the first discreteness of the grayscale value of each pixel in the third area to be detected, and compare it with the preset discreteness; when the discreteness is less than or equal to the preset discreteness, replace the grayscale value of the third pixel to be detected with the second grayscale mean; when the first discreteness is greater than the preset discreteness, remove the grayscale maximum value and the grayscale minimum value in the third area to be detected, and recalculate the first discreteness of the grayscale value of each pixel in the third area to be detected, until the first discreteness of the grayscale value of each pixel in the third area to be detected is less than or equal to the preset discreteness, calculate the first final grayscale mean when the first discreteness of the grayscale value of each pixel in the third area to be detected is less than or equal to the preset discreteness, and replace the grayscale value of the third pixel to be detected with the first final grayscale mean;
[0117] Determine a fourth area to be detected with the fourth pixel point to be detected as the center and the preset distance as the radius;
[0118] Obtaining the grayscale value of each pixel in the fourth area to be detected, and calculating the third grayscale mean;
[0119] Calculate the second discreteness of the grayscale value of each pixel in the fourth area to be detected, and compare it with the preset discreteness; when the second discreteness is less than or equal to the preset discreteness, replace the grayscale value of the fourth pixel to be detected with the third grayscale mean; if the second discreteness is greater than the preset discreteness, remove the grayscale maximum value and the grayscale minimum value in the fourth area to be detected, and recalculate the second discreteness of the grayscale value of each pixel in the fourth area to be detected, until the second discreteness of the grayscale value of each pixel in the fourth area to be detected is less than or equal to the preset discreteness, calculate the second final grayscale mean when the second discreteness of the grayscale value of each pixel in the fourth area to be detected is less than or equal to the preset discreteness, and replace the grayscale value of the fourth pixel to be detected with the second final grayscale mean;
[0120] Based on replacing the grayscale values of all the third pixels to be detected and the fourth pixels to be detected, image denoising is completed for the local image.
[0121] In this embodiment, image noise reduction is to reduce the noise in the image, thereby improving the quality of the image.
[0122] In this embodiment, in a grayscale image, the grayscale value and the brightness value are equivalent; the grayscale value range is 0-255, where 0 represents black and 255 represents white; the brightness value range can also be 0-255, where 0 represents black and 255 represents white; therefore, the grayscale value and the brightness value can be converted to each other; in a grayscale image, the grayscale value is the brightness value, because the grayscale image only has brightness information but no color information.
[0123] In this embodiment, the grayscale value of the impulse noise can be a maximum value or a minimum value; specifically, the grayscale value of the salt and pepper noise is the maximum value or the minimum value of the grayscale level of the image; for example, in a grayscale image with a pixel value range of 0 to 255, if the grayscale value of a pixel point is 0 or 255, then this pixel point may be a salt and pepper noise point.
[0124] In this embodiment, the second largest grayscale value refers to the grayscale value ranked second highest in the second area to be detected.
[0125] In this embodiment, the preset difference value is a preset standard value for judging the difference value.
[0126] In this embodiment, dispersion is an indicator that measures the degree of deviation of a set of data from a certain central indicator distribution; it reflects the degree to which a set of data is away from its central value, and is therefore also called a deviation trend; the measurement value of dispersion is a description of another important feature of data distribution, corresponding to the central tendency of data; the smaller the dispersion value, the more concentrated the data distribution, and conversely, the larger the dispersion value, the more dispersed the data distribution; dispersion is of great significance for describing and analyzing the distribution characteristics of data and predicting future development trends; at the same time, the measurement of dispersion also helps us better understand and explain the changing trend of data and provide a basis for decision-making.
[0127] In this embodiment, the preset discreteness is a preset standard value for determining the discreteness.
[0128] In this embodiment, there are many methods for calculating dispersion, among which the commonly used ones include range, interquartile range, variance, standard deviation and coefficient of variation.
[0129] Range: The range is the difference between the maximum and minimum values in the data sample, represented by R. It reflects the numerical range of the data sample and is the most basic way to measure the degree of data dispersion, but it is greatly affected by extreme values.
[0130] Quartile difference: The quartile difference is the difference between the upper and lower quarters of the data sample, expressed as Qd. It reflects the degree of dispersion of the middle 50% of the data, and also reflects the degree of representation of the median for the data sample.
[0131] Variance and standard deviation: Variance is the average of the squares of the differences between each data sample and the mean, represented by s^2; standard deviation is the arithmetic square root of variance, represented by s. They reflect the concentration and dispersion of data samples and are more accurate measures.
[0132] Coefficient of variation: The coefficient of variation is the ratio of the standard deviation to the mean, expressed as CV. It is an indicator used to compare the degree of dispersion of different groups of data and can better reflect the degree of dispersion of different groups of data.
[0133] The above are some commonly used discreteness calculation methods. You can choose the appropriate calculation method according to the specific data type and requirements.
[0134] In this embodiment, the first final grayscale mean of the third pixel to be detected is that if the discreteness is greater than the preset discreteness, the grayscale maximum value and the grayscale minimum value in the third area to be detected are removed, and the discreteness of the grayscale values of each pixel in the third area to be detected is recalculated until the discreteness of the grayscale values of each pixel in the third area to be detected is less than or equal to the preset discreteness, at which time the grayscale mean of the pixel values in the third area to be detected is obtained.
[0135] In this embodiment, the second final grayscale mean of the fourth pixel to be detected is that if the discreteness is greater than the preset discreteness, the grayscale maximum value and the grayscale minimum value in the fourth area to be detected are removed, and the discreteness of the grayscale values of each pixel in the fourth area to be detected is recalculated until the discreteness of the grayscale values of each pixel in the fourth area to be detected is less than or equal to the preset discreteness, at which time the grayscale mean of the pixel values in the fourth area to be detected is obtained.
[0136] The above technical beneficial effects are as follows: in a local image, any pixel point is selected as the second pixel point to be detected, the second pixel point to be detected is taken as the center and the preset distance is taken as the radius, the second area to be detected is determined, the grayscale value of each pixel point in the second area to be detected is obtained, and the pixel point with the maximum grayscale value in the second area to be detected is determined as the first type of noise point; the pixel point with the minimum grayscale value in the second area to be detected is determined as the second type of noise point; based on the fact that the grayscale value of the impulse noise can be the maximum value or the minimum value, the second area to be detected is screened, the maximum grayscale value and the minimum grayscale value of the pixel points in the second area to be detected are determined, and the first type of noise points and the second type of noise points are preliminarily screened out; the first type of noise points and the second type of noise points are screened for the second time, By judging the difference between the maximum value of the pixel point in the first type of noise point and the second largest grayscale value, the first type of noise point whose first difference is greater than the preset difference is selected as the third pixel point to be detected; completing the second screening of the first type of noise point, the third pixel point to be detected is obtained; by judging the difference between the maximum value of the pixel point in the second type of noise point and the second largest grayscale value, the second type of noise point whose second difference is greater than the preset difference is selected as the fourth pixel point to be detected; completing the second screening of the second type of noise point, the fourth pixel point to be detected is obtained; at this time, the detection of the noise point is completed, and the noise point can be determined more accurately by screening the noise point twice, which is conducive to improving the quality of image noise reduction and improving the noise reduction processing effect; for each pixel point in the third area to be detected The dispersion of the grayscale value is calculated to determine the distribution of the grayscale value of each pixel in the third area to be detected. The dispersion itself is an indicator that reflects the degree of deviation of a set of data from a certain central indicator distribution. The smaller the dispersion value, the more concentrated the data distribution is. Conversely, the larger the dispersion value, the more dispersed the data distribution is. By calculating the first dispersion and comparing it with the preset dispersion, it is determined that when it is less than or equal to the preset dispersion, the grayscale value fluctuation of each pixel in the third area to be detected is relatively small, and the second grayscale mean in the third area to be detected is used to replace the grayscale value of the third pixel to be detected; if the dispersion is greater than the preset dispersion, it indicates that the grayscale value fluctuation range of each pixel in the third area to be detected is relatively large, and the grayscale value of the third pixel to be detected is removed. The maximum grayscale value and the minimum grayscale value are used to recalculate the discreteness of the grayscale values of each pixel in the third area to be detected, until the discreteness of the grayscale values of each pixel in the third area to be detected is less than or equal to the preset discreteness. At this time, the grayscale value fluctuation of each pixel in the third area to be detected is relatively small, and the grayscale mean value in the third area to be detected is used as the first final grayscale mean value to replace the grayscale value of the third pixel to be detected; through iterative calculation, the final grayscale mean value is made more stable, and the ideal noise reduction effect is achieved after replacing the grayscale value; the fourth area to be detected is operated in the same way. This scheme greatly improves the noise reduction effect by screening the noise points twice, accurately replacing the grayscale values of the noise points, and accurately locating the noise points, providing higher quality materials for subsequent image processing.
[0137] Figure 3 FIG. 4 shows a structural block diagram of a pathological image rotation system according to an embodiment of the present invention. Figure 3 As shown, the system includes: a pre-processing module 301, an instruction generating module 302, a rotation module 303 and a display module 304; wherein,
[0138] The preprocessing module 301 is used to acquire a digitized first pathological image, preprocess the first pathological image, and cache the preprocessed first pathological image.
[0139] Specifically, the preprocessing module 301 is further used to extract all digital image information of the first pathological image; and perform image rendering and preloading on the first pathological image based on the all digital image information of the first pathological image.
[0140] The instruction generating module 302 is used to generate a rotation instruction according to a preset control logic in response to a user's sliding operation on the sliding module.
[0141] Specifically, the instruction generation module 302 is further used to:
[0142] The corresponding relationship between the sliding length and the rotation angle is determined according to the preset control logic; the sliding length is determined according to the sliding operation; according to the sliding length and the corresponding relationship between the sliding length and the rotation angle, the rotation angle of the picture is determined and a rotation instruction corresponding to the sliding operation is generated.
[0143] Specifically, the instruction generating module 302 is further used to determine the rotation center point of the first pathological image based on the position selection operation or the preset position.
[0144] Preferably, in the instruction generating module 302, the sliding module includes a sliding track and a sliding button, and the sliding button slides on the sliding track to implement a sliding operation; the sliding operation responded by the sliding button includes: a press-and-drag operation, a cursor-dragging operation, a cursor-clicking operation, and a knob-rotating operation;
[0145] The display module includes a display interface; wherein the display interface is used to display a target output image, a sliding track and a sliding button.
[0146] Preferably, the sliding module can be designed by html+css.
[0147] The rotation module 303 is used to rotate the preprocessed first pathological image based on the rotation instruction to obtain the second pathological image.
[0148] Specifically, the rotation module 303 is further used to:
[0149] Extracting a preprocessed first pathological image from a cache; using an asynchronous image processing algorithm to perform image processing on the preprocessed first pathological image based on a rotation instruction to generate a second pathological image; adjusting the parameters of the asynchronous image processing algorithm to optimize the process animation of the pathological image rotation.
[0150] The display module 304 is used to output and display the second pathological image.
[0151] Specifically, the display module 304 is further configured to display the second pathological image after displaying the animation of the pathological image rotating.
[0152] According to the pathological image rotation system provided in this embodiment, a digital first pathological image is obtained, the first pathological image is preprocessed, and the preprocessed first pathological image is cached; in response to the user's sliding operation on the sliding module, a rotation instruction is generated according to the preset control logic; based on the rotation instruction, the preprocessed first pathological image is rotated to obtain a second pathological image; and the second pathological image is output and displayed. Through the pathological image rotation system provided in this embodiment, the digital pathological image is rotated by responding to the user's sliding operation on the sliding module, and the pathological image and the sliding module are directly displayed in the display interface, which makes the user understand the operation method in a simple and easy way, greatly reduces the difficulty and complexity of the operation, thereby reducing the user's learning cost, and enables the sliding module to respond to a variety of sliding operations to adapt to a variety of operating platforms, expand the use of the system, and improve the overall compatibility. In addition, it enables the convenient rotation of digital pathology images, and by preprocessing and caching digital pathology images, it greatly speeds up the speed and smoothness of the image rotation process. While ensuring the image quality and detail integrity, the rotation process of the pathology image is intuitive and clear, and the display effect is soothing and smooth, allowing users to comprehensively and carefully observe and analyze pathology images, helping medical workers to better discover pathology information from them, and effectively improving processing efficiency and user experience.
[0153] The present invention also provides a non-volatile computer storage medium, which stores at least one executable instruction, and the executable instruction can execute the pathological image rotation method in any of the above method embodiments.
[0154] Figure 4 A schematic diagram of the structure of a computing device according to an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computing device.
[0155] like Figure 4As shown, the computing device may include: a processor (processor) 402 , a communications interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .
[0156] in:
[0157] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .
[0158] The communication interface 404 is used to communicate with other devices such as clients or other servers.
[0159] The processor 402 is used to execute the program 410, and specifically can execute the relevant steps in the above-mentioned pathological image rotation method embodiment.
[0160] Specifically, the program 410 may include program codes, and the program codes include computer operation instructions.
[0161] The processor 402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0162] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0163] The program 410 can be specifically used to enable the processor 402 to execute the pathological image rotation method in any of the above-mentioned method embodiments. The specific implementation of each step in the program 410 can refer to the corresponding descriptions in the corresponding steps and units in the above-mentioned pathological image rotation method embodiments, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above-mentioned method embodiments, which will not be repeated here.
[0164] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0165] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0166] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those expressly recited in each claim. Rather, as reflected in the claims, inventive aspects lie in less than all of the features of the individual embodiments previously disclosed. Therefore, the claims that follow the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present invention.
[0167] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0168] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims, any one of the claimed embodiments may be used in any combination.
[0169] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0170] 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 pathological image rotation method, comprising: Acquire a digitized first pathological image, preprocess the first pathological image, and cache the preprocessed first pathological image; In response to a user's sliding operation on the sliding module, generating a rotation instruction according to a preset control logic; Based on the rotation instruction, the preprocessed first pathological image is rotated to obtain a second pathological image; The second pathological image is output and displayed.
2. The pathological image rotation method according to claim 1, characterized in that: The step of acquiring a digital first pathological image and preprocessing the first pathological image includes: Acquire a first digitized pathological image, and perform grayscale processing on the first digitized pathological image to obtain a grayscale image; In the grayscale image, any pixel point is selected as the first pixel point to be detected, and the first pixel point to be detected is taken as the center and the preset distance is taken as the radius to determine the first area to be detected; Calculate the first grayscale mean of other pixels in the first area to be detected except the pixel to be detected; Calculate the difference between the grayscale value of the pixel to be detected and the first grayscale mean, compare the difference with a preset edge difference threshold, and determine that the pixel whose difference is greater than the preset edge difference threshold is an edge point; Based on the above method, edge points in the grayscale image are determined, and a first edge point set is generated; Randomly select a pixel point in the first edge point set, determine whether it is an outlier point, and delete it if it is determined to be an outlier point to obtain a second edge point set; Determine edge contour lines based on a pre-trained contour extraction model and a second edge point set, segment the grayscale image based on the edge contour lines, and obtain a plurality of local images of the first pathological image; Perform image denoising on several local images.
3. The pathological image rotation method according to claim 1, characterized in that: The step of generating a rotation instruction according to a preset control logic in response to a user's sliding operation on the sliding module further includes: Determine the corresponding relationship between the sliding length and the rotation angle according to the preset control logic; The sliding length is determined according to the sliding operation; the image rotation angle is determined according to the sliding length and the corresponding relationship between the sliding length and the rotation angle, and a rotation instruction corresponding to the sliding operation is generated.
4. The pathological image rotation method according to claim 2, characterized in that: Perform image denoising on local images, including: In the local image, a pixel point is randomly selected as a second pixel point to be detected, and a second area to be detected is determined with the second pixel point to be detected as the center and a preset distance as the radius; Obtain the grayscale value of each pixel in the second area to be detected, determine the pixel with the maximum grayscale value in the second area to be detected as the first type of noise point; determine the pixel with the minimum grayscale value in the second area to be detected as the second type of noise point; Determine a first difference between the grayscale value of the first type of noise point and the second largest grayscale value in the second area to be detected, and select the first type of noise point whose first difference is greater than the preset difference as the third pixel point to be detected; Determine a second difference between the grayscale value of the second type of noise point and the second minimum grayscale value in the second to-be-detected area, and select the second type of noise point whose second difference is greater than the preset difference as the fourth to-be-detected pixel point; Determine a third area to be detected with the third pixel point to be detected as the center and a preset distance as the radius; Obtaining the grayscale value of each pixel in the third area to be detected, and calculating the second grayscale mean; Calculate the first discreteness of the grayscale value of each pixel in the third area to be detected, and compare it with the preset discreteness; when the discreteness is less than or equal to the preset discreteness, replace the grayscale value of the third pixel to be detected with the second grayscale mean; when the first discreteness is greater than the preset discreteness, remove the grayscale maximum value and the grayscale minimum value in the third area to be detected, and recalculate the first discreteness of the grayscale value of each pixel in the third area to be detected, until the first discreteness of the grayscale value of each pixel in the third area to be detected is less than or equal to the preset discreteness, calculate the first final grayscale mean when the first discreteness of the grayscale value of each pixel in the third area to be detected is less than or equal to the preset discreteness, and replace the grayscale value of the third pixel to be detected with the first final grayscale mean; Determine a fourth area to be detected with the fourth pixel point to be detected as the center and the preset distance as the radius; Obtaining the grayscale value of each pixel in the fourth area to be detected, and calculating the third grayscale mean; Calculate the second discreteness of the grayscale value of each pixel in the fourth area to be detected, and compare it with the preset discreteness; when the second discreteness is less than or equal to the preset discreteness, replace the grayscale value of the fourth pixel to be detected with the third grayscale mean; if the second discreteness is greater than the preset discreteness, remove the grayscale maximum value and the grayscale minimum value in the fourth area to be detected, and recalculate the second discreteness of the grayscale value of each pixel in the fourth area to be detected, until the second discreteness of the grayscale value of each pixel in the fourth area to be detected is less than or equal to the preset discreteness, calculate the second final grayscale mean when the second discreteness of the grayscale value of each pixel in the fourth area to be detected is less than or equal to the preset discreteness, and replace the grayscale value of the fourth pixel to be detected with the second final grayscale mean; Based on replacing the grayscale values of all the third pixels to be detected and the fourth pixels to be detected, image denoising is completed for the local image.
5. The pathological image rotation method according to claim 1 or 2, characterized in that: The method further comprises: rotating the preprocessed first pathological image based on the rotation instruction to obtain the second pathological image. extracting a preprocessed first pathological image from a cache; Using an asynchronous image processing algorithm, image processing is performed on the preprocessed first pathological image based on the rotation instruction to generate a second pathological image; Adjust the parameters of the asynchronous image processing algorithm to optimize the animation of the pathological image rotation process.
6. The pathological image rotation method according to claim 1, characterized in that: Outputting and displaying the second pathological image further includes: After displaying the animation of the pathological image rotation process, the second pathological image is displayed.
7. A pathological image rotation system, characterized in that: include: preprocessing module, instruction generation module, rotation module and display module; wherein, The preprocessing module is used to obtain a digitized first pathological image, preprocess the first pathological image, and cache the preprocessed first pathological image; The instruction generating module is used to generate a rotation instruction according to a preset control logic in response to a user's sliding operation on the sliding module; The rotation module is used to rotate the preprocessed first pathological image based on the rotation instruction to obtain a second pathological image; The display module is used to output and display the second pathological image.
8. The pathological image rotation system according to claim 7, characterized in that: The sliding module includes a sliding track and a sliding button. The sliding button slides on the sliding track to implement a sliding operation. The sliding operations responded by the sliding button include: a press-and-drag operation, a cursor-dragging operation, a cursor-clicking operation, and a knob-rotating operation. The display module includes a display interface; wherein the display interface is used to display a target output image, a sliding track and a sliding button.
9. A computing device, characterized in that include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the pathological image rotation method according to any one of claims 1-6.
10. A computer storage medium, characterized in that: The storage medium stores at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the pathological image rotation method according to any one of claims 1 to 6.