Plaque data determination method and device, equipment and medium
By reshaping the image dimensions and processing the clustering algorithm on brain tissue slice images, the plaque regions are identified and calculated, which solves the problems of large subjective bias and low efficiency in the existing technology, and achieves efficient and accurate plaque data determination.
Patent Information
- Application Number
- CN202510933249.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-10-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies suffer from significant subjective bias and low efficiency when identifying Aβ plaques in brain tissue slice images, especially when processing large numbers of images, which consumes a lot of time.
By reshaping brain tissue slice images into two-dimensional arrays, a clustering algorithm is used for pixel classification to generate masks and identify plaque regions. The area of the plaque region is calculated by combining the Sobel operator and Green's formula, thus constructing a plaque-tissue dual-scale quantization system.
It improves the accuracy of plaque identification, eliminates individual differences, reduces the analysis time of a single image, provides efficient and objective data support, and provides automated calculation and accurate analysis for the pathological study of Aβ plaques.
Smart Images

Figure BDA0005487967850000081 
Figure BDA0005487967850000091 
Figure BDA0005487967850000092
Abstract
Description
Technical Field
[0001] This application relates to the field of medical image processing technology, and in particular to a method, apparatus, device and medium for determining plaque data. Background Technology
[0002] With the rapid development of medical information technology, ultrasound imaging, as a computer-aided examination and diagnosis technique, is increasingly being used in routine clinical medical procedures. Ultrasound imaging can generate images that play a crucial role in early disease screening and medical research. For example, a typical pathological feature of Alzheimer's disease is Aβ (amyloid-β) plaques, which are widely distributed in the brains of AD patients. Differences in their distribution, density, and morphology can all influence the condition and manifestations of AD lesions. Therefore, research on the identification of Aβ plaques in brain tissue slices is particularly important for better analysis of brain tissue.
[0003] Currently, related technologies convert brain tissue slice images into grayscale images and manually adjust the contrast of the grayscale images to highlight Aβ plaques. Threshold segmentation is then performed based on the adjusted images to identify plaque regions, and the segmented plaque regions are measured to obtain plaque data. However, this approach suffers from subjective bias during operation and requires significant time investment when analyzing large numbers of images, resulting in low analysis efficiency. Summary of the Invention
[0004] The purpose of this application is to provide a method, apparatus, device, and medium for determining patch data.
[0005] To achieve the above objectives, this application provides the following solution:
[0006] In a first aspect, this application provides a method for determining patch data, including:
[0007] Acquire images of brain tissue slices to be processed;
[0008] The brain tissue slice image to be processed is subjected to image dimension reshaping processing to obtain a two-dimensional array of each pixel; each two-dimensional array includes image pixel information and color channel information, wherein the image pixel information is the product of image height and image width;
[0009] A clustering algorithm is used to classify the pixels of the two-dimensional array to obtain pixel clustering results.
[0010] Pixel labels are extracted from the pixel clustering results, and a mask is generated based on the pixel labels;
[0011] Based on the mask, plaque regions are identified from the brain tissue slice image to be processed to obtain a plaque region image;
[0012] The image of the patch region is analyzed and processed to obtain patch region data; the patch region data includes the patch region area and the tissue region area.
[0013] Optionally, a clustering algorithm is used to perform pixel classification processing on the two-dimensional array to obtain pixel clustering results, including:
[0014] The two-dimensional array is initialized with centroids by randomly selecting a pixel as the initial centroid. A set of centroids is formed based on the probability distribution of the Euclidean distance between each pixel and the initial centroid. The initial centroid is represented by a three-dimensional vector, which includes the RGB channel values of the pixel corresponding to the initial centroid.
[0015] For each pixel, calculate the Euclidean distance between the pixel and each centroid in the centroid set, assign the pixel to the cluster corresponding to the nearest centroid, and record the cluster label;
[0016] For each cluster, determine the mean value of the RGB channel values of all pixels in the cluster, and use the mean value as the new centroid;
[0017] Based on the new centroid, the change in centroid is determined, and it is judged whether the change in centroid meets the iteration stopping condition; the iteration stopping condition includes: the change in centroid is less than a preset threshold or the maximum number of iterations is reached;
[0018] If the iteration stopping condition is not met, perform distance calculation and cluster allocation operations until the iteration stopping condition is met, and obtain the pixel clustering result.
[0019] Optionally, generating a mask based on the pixel labels includes:
[0020] Obtain the size information of the pixel label; the size information includes height and width;
[0021] Based on the size information, the data is filled into a standard two-dimensional array in row-major order to obtain two-dimensional data labels; each two-dimensional data label includes multiple elements; the spatial structure of the two-dimensional data labels corresponds to the spatial structure of the brain tissue slice image to be processed.
[0022] Each element in the two-dimensional data label is compared with the target pixel label to determine the mask corresponding to the target pixel label; the target pixel label is a preset pixel label of interest.
[0023] Optionally, based on the mask, patch regions are identified from the brain tissue slice image to be processed to obtain a patch region image, including:
[0024] A bitwise logical AND operation is performed between the pixel values of the brain tissue slice image to be processed and the pixel values of the mask to obtain the operation result; the operation result includes true or false.
[0025] Determine the target pixel value whose calculation result is true from the brain tissue slice image to be processed;
[0026] The region corresponding to the target pixel value in the brain tissue slice image to be processed is taken as the patch region;
[0027] Remove the remaining images from the brain tissue slice image except for the plaque region to obtain the plaque region image.
[0028] Optionally, the patch region image is analyzed and processed to obtain the patch region area, including:
[0029] The noise in the patch region image is removed to obtain a denoised image;
[0030] The gradient magnitude and direction of the denoised image are calculated using the horizontal and vertical convolution kernels of the Sobel operator;
[0031] Non-maximum suppression is used to preserve the edge regions with the largest gradient magnitudes for edge refinement.
[0032] A dual-threshold comparison strategy is used to identify weak and strong edges, and weak edges are connected to strong edges to form a complete edge image;
[0033] The edge image is scanned to find all connected first foreground regions in the edge image, and the boundary points of the first foreground regions are used as patch contours; the first foreground region is a connected region composed of all pixels with a pixel value of 255 after binarization of the edge image.
[0034] Based on the preset Green's formula, the area of the patch region enclosed by the patch contour is calculated using the coordinates of the patch contour vertices.
[0035] Optionally, the area of the patch region enclosed by the patch contour is calculated based on Green's formula using the vertex coordinates of the patch contour, including:
[0036] Obtain the number of patch outline points and the coordinates of the patch outline vertices;
[0037] The area of the patch region enclosed by the patch outline is determined based on the number of patch outline points and the coordinates of the patch outline vertices.
[0038] Optionally, the patch region image is analyzed and processed to obtain patch region data, including:
[0039] The brain tissue slice image to be processed is converted into a grayscale image;
[0040] Thresholding is performed on the grayscale image to set the pixels corresponding to brain tissue in the grayscale image to black;
[0041] Morphological operations are performed on the grayscale image to remove noise and fill in empty areas, resulting in a processed image; the morphological operations include: opening operations (erosion followed by dilation) and closing operations (dilation followed by erosion);
[0042] The processed image is scanned to find all connected second foreground regions in the black area, and the boundary points of the second foreground regions are used as tissue contours.
[0043] The outermost contour is obtained through the hierarchical relationship of the tissue contour;
[0044] Based on the preset Green's formula, the area of the tissue region enclosed by the outermost contour is calculated using the coordinates of the tissue contour vertices.
[0045] Secondly, this application provides a patch data determination apparatus, the apparatus comprising:
[0046] The acquisition module is used to acquire images of brain tissue slices to be processed;
[0047] The reshaping module is used to perform image dimension reshaping processing on the brain tissue slice image to be processed, to obtain a two-dimensional array of each pixel; each two-dimensional array includes image pixel information and color channel information, wherein the image pixel information is the product of image height and image width;
[0048] The clustering module is used to perform pixel classification processing on the two-dimensional array using a clustering algorithm to obtain pixel clustering results;
[0049] A mask generation module is used to extract pixel labels from the pixel clustering results and generate a mask based on the pixel labels.
[0050] The plaque identification module is used to identify plaque regions from the brain tissue slice image to be processed based on the mask, and obtain a plaque region image;
[0051] The data determination module is used to analyze and process the image of the patch region to obtain patch region data; the patch region data includes the patch region area and the tissue region area.
[0052] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the patch data determination method described in any one of the above.
[0053] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the patch data determination method described in any one of the above descriptions.
[0054] According to the specific embodiments provided in this application, the following technical effects are disclosed:
[0055] This application provides a method, apparatus, device, and medium for determining plaque data. The method includes: acquiring a brain tissue slice image to be processed; performing image dimension reshaping processing on the brain tissue slice image to obtain a two-dimensional array of pixels; each two-dimensional array includes image pixel information and color channel information, where the image pixel information is the product of the image height and the image width; performing pixel classification processing on the two-dimensional array using a clustering algorithm to obtain pixel clustering results; extracting pixel labels from the pixel clustering results and generating a mask based on the pixel labels; identifying plaque regions from the brain tissue slice image to be processed based on the mask to obtain plaque region images; and analyzing and processing the plaque region images to obtain plaque region data; the plaque region data includes plaque region area and tissue region area.
[0056] Compared with existing technologies, this solution acquires brain tissue slice images and performs image dimension reshaping processing on these images. This transforms the original 3D RGB image into a 2D array that retains complete color channel information, avoiding information loss in the traditional grayscale conversion process. This provides more accurate feature input for subsequent clustering. A clustering algorithm is then used to classify the pixels in the 2D array, achieving pixel color feature grouping and accurately obtaining pixel clustering results. This replaces the subjective operation of manually adjusting contrast, improving the accuracy of patch recognition, eliminating individual differences, and enhancing the pixel clustering results. Pixel labels are extracted and masks are generated based on these labels, reducing operational bias compared to traditional manual thresholding. Using the mask, plaque regions are accurately identified from brain tissue slices, yielding corresponding plaque region images. These images are then analyzed to determine the plaque and tissue areas, constructing a dual-scale quantification system of "plaque-tissue." This system automates plaque burden calculation and reduces single-image analysis time through full-process automation, addressing the issues of large subjective bias and low efficiency in traditional methods. It provides efficient and objective data support for pathological research on Aβ plaques. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 This is a schematic diagram of the application environment of a patch data determination method according to an embodiment of this application;
[0059] Figure 2 A schematic flowchart illustrating a method for determining patch data according to an embodiment of this application;
[0060] Figure 3 This is a flowchart illustrating a method for classifying pixels in a two-dimensional array using a clustering algorithm to obtain pixel clustering results, provided in an embodiment of this application.
[0061] Figure 4 This is a schematic diagram of the functional modules of a patch data determination device provided in an embodiment of this application;
[0062] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0063] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0064] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0065] Related technologies convert brain tissue slice images into grayscale images and manually adjust the contrast of the grayscale images to highlight Aβ plaques. Threshold segmentation is then performed based on the adjusted images to identify plaque regions, and the segmented plaque regions are measured to obtain plaque data. However, this approach suffers from subjective bias during operation and requires significant time investment when analyzing large numbers of images, resulting in low analysis efficiency.
[0066] To address the aforementioned shortcomings, this application provides a method for determining patch data. Compared to existing technologies, this method acquires brain tissue slice images and performs image dimension reshaping processing on these images. This transforms the original 3D RGB image into a two-dimensional array that retains complete color channel information, avoiding information loss in traditional grayscale conversion. This provides more accurate feature input for subsequent clustering. A clustering algorithm is then used to classify the pixels in the two-dimensional array, achieving pixel color feature grouping and accurately obtaining pixel clustering results. This replaces the traditional subjective operation of manually adjusting contrast, improving patch recognition accuracy, eliminating individual differences, and providing a more accurate representation of the patch data. Clustering results are used to extract pixel labels and generate masks based on these labels, reducing operational bias compared to traditional manual thresholding. Using the masks, plaque regions are accurately identified from brain tissue slices, yielding corresponding plaque region images. These images are then analyzed to determine the plaque and tissue areas, constructing a dual-scale quantification system of "plaque-tissue." This system automates plaque burden calculation and reduces single-image analysis time through full-process automation, addressing the issues of large subjective bias and low efficiency in traditional methods. This provides efficient and objective data support for pathological research on Aβ plaques.
[0067] The patch data determination method provided in this application embodiment can be applied to, for example... Figure 1 The application environment of the plaque data determination method shown includes a terminal 102, a server 104, and a data storage system. The terminal 102 communicates with the server 104 via a network. The data storage system stores the brain tissue slice data to be processed by the server 104. The data storage system can be set up independently, integrated into the server 104, or placed in the cloud or on another server. The terminal 102 can send the acquired brain tissue slice data to the server 104. After receiving the brain tissue slice data, the server 104 performs image dimension reshaping and region recognition processing on the brain tissue slice images to obtain plaque region data. Furthermore, in some embodiments, the plaque data determination method can also be implemented independently by the server 104 or the terminal 102; for example, the terminal 102 can directly obtain plaque region data by performing image dimension reshaping and region recognition processing.
[0068] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster composed of multiple servers, or it can be a cloud server.
[0069] In one exemplary embodiment, such as Figure 2 As shown, a method for determining patch data is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps S201 to S206. Wherein:
[0070] Step S201: Obtain the image of the brain tissue slice to be processed.
[0071] It should be noted that the brain tissue slice images to be processed mentioned above are brain tissue slice images that require plaque data determination. The brain tissue slice images to be processed may include one, two or more images. Each brain tissue slice image to be processed may include one or more plaque regions. When there are multiple plaque regions, the size and dimensions of each plaque region may be the same or different.
[0072] Optionally, the brain tissue slice images to be processed can be animal brain tissue slice images. This is achieved by first obtaining animal brain tissue, fixing it with paraformaldehyde, dehydrating it with sucrose, embedding it with OCT, cutting it into 10-30 μm slices using a cryostat, and attaching them to glass slides. Alternatively, the images can be directly imported from external devices, or obtained from a blockchain or database. This embodiment does not limit the method of obtaining the brain tissue slice images to be processed.
[0073] Step S202: Perform image dimension reshaping processing on the brain tissue slice image to be processed to obtain a two-dimensional array of each pixel; each two-dimensional array includes image pixel information and color channel information, and the image pixel information is the product of the image height and the image width.
[0074] It's important to note that dimensional reshaping of brain tissue slice images is essentially a crucial preprocessing step that transforms the original image from a spatial structure into a feature space. The original brain tissue slice image to be processed can include image width, image height, and color channel information. A two-dimensional array can be represented by a two-dimensional feature matrix, where the image pixel information can be obtained by multiplying the image height by the image width. Color channel information refers to the basic building blocks in a digital image used to describe pixel color; different combinations of channels represent a rich variety of colors.
[0075] Specifically, after obtaining the brain tissue slice image to be processed, the brain tissue slice image is an RGB image, which is represented by a three-dimensional array (height, width, color channels). The color channels are composed of (R, G, B). For example, the three-dimensional shape information of a 100×100 pixel RGB image is (100, 100, 3). By performing an image dimension reshaping operation, it can be "flattened" into a two-dimensional array with a shape of (10000, 3). The number of rows represents the image pixel information, which is the total number of pixels (height × width). The number of columns represents the color channel information, which is the number of color channels (3). Each row corresponds to the color value of one pixel (e.g., [255, 128, 0]). Each column represents the values of the red, green, and blue channels, respectively.
[0076] In this step, by converting the original 3D RGB image into a 2D array that retains complete color channel information, spatially distributed pixels can be transformed into independent feature vectors. This avoids information loss and spatial location interference in color similarity judgment during the traditional grayscale conversion process, providing more accurate feature input for subsequent clustering. Furthermore, since the 2D array structure is compatible with matrix operations, it facilitates subsequent clustering processing. Compared to the 3D structure, it reduces the computational complexity of spatial dimensions. The converted 2D array can directly calculate the color similarity between pixels without considering spatial location, providing data guidance information for subsequent batch processing.
[0077] Step S203: A clustering algorithm is used to classify the pixels of the two-dimensional array to obtain the pixel clustering results.
[0078] The clustering algorithm described above can be k-means++, an improved version of k-means. It prioritizes pixels farther from the previously selected centroids as new centroids, avoiding the local optima problem caused by random initialization in traditional k-means. Furthermore, for brain tissue slice images, the RGB value distributions of Aβ patches and background tissue differ significantly, allowing k-means++ to more accurately capture the feature centers of the two types of pixels. The pixel clustering results can include multiple clusters, each corresponding to a pixel label.
[0079] As one embodiment, this application provides a specific implementation method for performing pixel classification processing on a two-dimensional array using a clustering algorithm to obtain pixel clustering results. Please refer to [link to relevant documentation]. Figure 3 The method includes:
[0080] Step S301: Initialize the centroid of the two-dimensional array by randomly selecting a pixel as the initial centroid and forming an initial centroid set based on the Euclidean distance probability distribution between each pixel and the initial centroid. The initial centroid is represented by a three-dimensional vector, which includes the RGB channel values of the pixel corresponding to the initial centroid.
[0081] Step S302: For each pixel, calculate the Euclidean distance between the pixel and each centroid in the initial centroid set, assign the pixel to the cluster corresponding to the nearest centroid, and record the cluster label.
[0082] Step S303: For each cluster, determine the mean value of the RGB channel values of all pixels in the cluster, and use the mean value as the new centroid.
[0083] Step S304: Determine the change in centroid based on the new centroid, and determine whether the change in centroid meets the iteration stopping condition; the iteration stopping condition includes: the change in centroid is less than a preset threshold or the maximum number of iterations is reached.
[0084] Step S305: If the iteration stopping condition is not met, perform distance calculation and cluster allocation operations until the iteration stopping condition is met, and obtain the pixel clustering result.
[0085] In this embodiment, a final required number of groups k is defined, and a loss function for the clustering algorithm is constructed. The algorithm is trained using a two-dimensional array, iteratively calculating the cluster to which each pixel belongs and updating the centroid position until the convergence condition of the loss function is met. This step classifies all pixels in the image represented by the two-dimensional array into k groups, which are the pixel clustering results. The loss function can be expressed by the following formula:
[0086]
[0087] Where k is the number of pixel label groups (clusters), x is the number of pixels, and S i μ represents the set of pixels in the i-th cluster. i Let i be the i-th centroid.
[0088] Specifically, after obtaining the two-dimensional array, the centroids can be initialized using the k-means++ strategy. This involves randomly selecting a pixel as the first centroid and calculating the Euclidean distance probability distribution between each pixel and the selected centroid. Based on this probability distribution, pixels farther away are prioritized as subsequent centroids, for example, pixels with a distance less than a preset distance threshold. This preset distance threshold can be customized according to actual needs, thus forming a centroid set C = {μ1, μ2, ..., μ...} consisting of k three-dimensional RGB vectors. k The selection of this centroid set directly affects the cluster allocation accuracy of subsequent pixels, μ i Let x be the i-th centroid, represented by a three-dimensional vector including the corresponding RGB vector; then for each pixel x, calculate its Euclidean distance to all centroids based on the centroid set. This Euclidean distance can be expressed by the following formula:
[0089]
[0090] Where x is a pixel, μ i For the i-th centroid, μ i,r μ is the red channel value of the i-th centroid. i,g μ is the green channel value of the i-th centroid. i,b Let be the blue channel value of the i-th centroid.
[0091] After determining the Euclidean distance between a pixel and each centroid, the centroid with the farthest Euclidean distance for that pixel is identified. Then, the pixel is assigned to the cluster y corresponding to the nearest centroid. i =argmind(x,μ i ), and record the cluster labels. The label assignment results serve as the basis for subsequent centroid updates, where y i Represents the i-th pixel x i Cluster labels. Then based on each cluster S i The RGB values of the inner pixels and the cluster labels are used to calculate the new centroid of each cluster. The generation of the new centroid will serve as the benchmark for the next round of distance calculation. The new centroid is determined by the average RGB values of the pixels within the cluster, expressed by the following formula:
[0092]
[0093] Where x is a pixel, S i Let y represent the set of pixels in the i-th cluster if and only if the label y of the pixels is y. i When the value is i, the pixel belongs to cluster S. i ,|S i | is cluster S i The number of pixels.
[0094] After determining the new centroid, the Euclidean distance between the new and old centroids is calculated to obtain the change in centroid before and after the update. It is then determined whether the change in centroid before and after the update is less than a preset threshold or whether the maximum number of iterations has been reached. If the change is less than the preset threshold or the maximum number of iterations has been reached, the algorithm converges, the iterative processing stops, and the pixel clustering result is obtained. If the change is not less than the preset threshold or the maximum number of iterations has been reached, the algorithm returns to continue executing the distance calculation and cluster label update steps. This forms an iterative closed loop of "centroid initialization - distance calculation - cluster allocation - centroid update", which finally generates a one-dimensional array containing all pixel labels, realizing k-classification of image pixels. Throughout the process, the centroid set, pixel distance, cluster label, and centroid update value form an interconnected data transmission chain.
[0095] In this embodiment, a centroid initialization strategy based on Euclidean distance probability distribution is adopted to prioritize the initial centroid that can characterize the differences in pixel features, avoiding the local optimum problem of traditional random initialization. Combined with the distance calculation and iterative optimization mechanism of three-dimensional RGB vectors, dynamic clustering and allocation of pixels are realized, so that the color features of pixels of the same type are highly aggregated. The centroid is updated by the RGB mean of pixels within the cluster and the change is used as the convergence condition to ensure that the clustering results are adaptive to brain tissue slices with different staining intensities. This not only eliminates the subjective bias of manual threshold segmentation, but also improves the pixel classification accuracy to the optimal solution in three-dimensional color space through automatic iteration, providing a stable and reliable feature grouping basis for the accurate identification of subsequent patch regions. At the same time, the setting of the maximum number of iterations ensures the controllability of efficiency during batch processing.
[0096] Step S204: Extract pixel labels from pixel clustering results and generate a mask based on the pixel labels.
[0097] After obtaining the pixel clustering results, these results are represented by a one-dimensional label array. It is necessary to establish a mapping bridge between the one-dimensional label array and the spatial structure of the original image. The pixel clustering results can include multiple pixel labels. Analyzing and processing these pixel labels yields a mask, which can be understood as a binarization matrix. Its core function is to selectively preserve or filter pixel regions of the original image using a 0-1 numerical distribution.
[0098] Specifically, the height and width dimensions of the pixel labels are first obtained. Essentially, this establishes a mapping bridge between the one-dimensional label array and the spatial structure of the original image. After the clustering algorithm outputs a one-dimensional label array (length = height × width), its spatial position needs to be reconstructed using the dimension information. For example, an RGB image with the shape (height, width, 3), where 3 represents the color channels, and a 100×100 image corresponding to a one-dimensional array of 10,000 labels, has its height and width parameters directly determining the target dimension for two-dimensional reshaping. This dimension information is usually inherited from the metadata of the original image (such as the resolution recorded during imaging), ensuring that the number of rows and columns in the label matrix is completely consistent with the original image, providing a benchmark for accurate pixel location. For example, if the one-dimensional label array is [0,0,1,1,2,0,1,2,2], then the corresponding two-dimensional data labels are represented in the following format: [
[0099] [0,0,1],
[0100] [1,2,0],
[0101] [1,2,2]
[0102] ].
[0103] After obtaining the size information of the pixel labels, when filling the one-dimensional label array into the standard two-dimensional matrix in row-major order, the pixel traversal rule of "from left to right, from top to bottom" is followed: the 0th element of the one-dimensional array corresponds to the position (0, 0) of the two-dimensional matrix, the 1st element corresponds to (0, 1), until the Wth element wraps to (1, 0), and so on (W is the image width). The two-dimensional data label is obtained. This filling method strictly preserves the pixel arrangement order of the original image, making each element coordinate (i, j) in the two-dimensional data label directly correspond to the pixel label in the i-th row and j-th column of the original image, forming a one-to-one mapping relationship of "label value - spatial position", providing data guiding information for the subsequent determination of plaque regions based on spatial positions.
[0104] After obtaining the two-dimensional data label, an integer parameter T can be defined, 0 <= T < k, where the parameter T represents the target pixel label of interest. Then, each element of the two-dimensional data label is numerically compared with the target pixel label T. In essence, a conversion mechanism of "feature classification - spatial positioning" is established. Each element refers to the clustering label serial number corresponding to different pixel points, such as clustering 0, clustering 1,.... When the element value is equal to T, the pixel position is marked as 1 (true), otherwise, the pixel position is marked as 0 (false), thus generating a mask Mask corresponding to the parameter T. Among them, the area with a value of 1 in the generated mask corresponds to the target plaque pixels determined by the clustering algorithm. Among them, through the numerical definition of the parameter T (such as T = 2) in this process, the abstract clustering label is converted into a specific image area selection. The value of T can be flexibly adjusted according to the staining characteristics (such as the label of the plaque corresponding to the specific RGB clustering center in IHC staining), enabling the mask to adapt to the plaque recognition requirements under different experimental conditions and realizing the automatic conversion from color feature classification to physical area extraction.
[0105] In this step, by filling into the standard two-dimensional array based on the image size information, the one-dimensional label array is accurately reshaped into a two-dimensional data label matrix that completely corresponds to the spatial structure of the original image, ensuring that each label element is in one-to-one mapping with the spatial position of the original image pixel, providing a coordinate benchmark for subsequent target area positioning; by generating a mask through the element-by-element comparison of the two-dimensional data label and the target pixel label, the automatic conversion from abstract clustering labels to specific image areas is realized. This not only eliminates the subjective deviation of traditional manual selection but also constructs a standardized target area screening mechanism, greatly shortening the mask generation time, and supports adapting to plaque recognition under different staining conditions by adjusting the target pixel label parameter, providing an accurate spatial screening tool for quantitative analysis such as plaque area calculation and feature statistics, forming a complete technical closed-loop from pixel classification to pathological area extraction.
[0106] Step S205, based on the mask, identify the plaque region from the brain tissue section image to be processed, and obtain the plaque region image.
[0107] After obtaining the mask, a bitwise AND operation is performed between the mask and the original brain tissue slice image to be processed, thereby identifying the plaque region and obtaining the plaque region image. This plaque region image refers to an image containing only the plaque region.
[0108] In this embodiment, based on a mask, patch regions are identified from the brain tissue slice image to be processed to obtain a patch region image. This includes: performing a bitwise logical AND operation between the pixel values of the brain tissue slice image to be processed and the pixel values of the mask to obtain a result; the result includes true or false; determining the target pixel value from the brain tissue slice image to be processed that has a true result; identifying the region corresponding to the target pixel value in the brain tissue slice image to be processed as the patch region; and removing the remaining image from the brain tissue slice image to be processed except for the patch region to obtain the patch region image.
[0109] Specifically, after obtaining the mask, a bitwise AND operation is performed between the mask and the original brain tissue slice image to be processed to obtain the patch region image. The bitwise AND operation is a pixel-by-pixel operation. For each pixel, the bitwise AND operation performs a bitwise logical AND operation between the pixel value of the original brain tissue slice image to be processed and the pixel value of the mask, obtaining a result that is either true (1) or false (0). If the result is true (1), the pixel value of the original brain tissue slice image to be processed is retained and used as the target pixel value. If the result is false (0), the pixel value in the brain tissue slice image to be processed is set to 0. The region corresponding to the target pixel value in the brain tissue slice image to be processed is then taken as the patch region. The remaining image in the brain tissue slice image to be processed, excluding the patch region, is then removed to obtain the patch region image.
[0110] It is understandable that the area corresponding to the retained target pixel value is the target patch area, while the area corresponding to the pixel value with a false result is the background tissue or noise area.
[0111] In this embodiment, a bitwise logical AND operation is performed between the pixel values of the brain tissue slice image to be processed and the pixel values of the mask, which improves the spatial localization accuracy of patch region extraction. Furthermore, the fully automated operation process requires no manual intervention, shortening the patch extraction time of a single image, supporting high-throughput analysis during batch processing, improving processing efficiency, and directly generating ROI images containing only patch pixels, eliminating interference from background tissue, staining artifacts, etc., providing a clean data base for subsequent quantitative operations such as patch area calculation and morphological analysis.
[0112] Step S206: Analyze and process the plaque region image to obtain plaque region data; the plaque region data includes the plaque region area and the tissue region area.
[0113] After obtaining the patch region image, a dimensionality reduction operation can be performed on the patch region image to convert the image into a one-dimensional array and then perform a histogram operation to obtain the pixel statistics in the range of 0-255.
[0114] In one embodiment, during the analysis and processing of the patch region image to obtain the patch region area, noise in the patch region image can be removed first to obtain a denoised image. The horizontal and vertical convolution kernels of the Sobel operator are then used to calculate the gradient magnitude and direction of the denoised image. Non-maximum suppression is used to retain the edge region with the largest gradient magnitude for edge thinning. A dual threshold comparison strategy is used to determine weak and strong edges, and weak edges are connected to strong edges to form a complete edge image. The edge image is scanned to find all connected first foreground regions in the edge image, and the boundary points of the first foreground regions are used as patch contours. The first foreground region is a connected region composed of all pixels with a pixel value of 255 after binarization of the edge image. Based on the preset Green's formula, the patch region area enclosed by the patch contour is calculated using the vertex coordinates of the patch contour.
[0115] Specifically, after obtaining the patch region image, Gaussian filtering is used to smooth the image and remove noise from the patch region image, resulting in a denoised image. Then, the horizontal and vertical convolution kernels of the Sobel operator are used to calculate the gradient magnitude and direction of the denoised image. and vertical convolution kernel The Sobel operator computes its horizontal and vertical gradients through convolution.
[0116] Then, a non-maximum suppression algorithm is used to filter local maxima of gradients pixel by pixel, refining the edges to a single pixel width to avoid area calculation errors caused by edge thickening. Next, a dual-threshold strategy (including a high threshold and a low threshold) is employed: pixels with gradient magnitudes higher than the high threshold are marked as strong edges, while pixels between the high and low thresholds are marked as weak edges. Weak edges are only preserved if they are connected to strong edges; otherwise, they are suppressed. This step aims to reduce edge breaks caused by noise while preserving true edges, connecting weak edges to strong edges to form a complete edge image. The edge image is then scanned, identifying the connected region formed by all pixels with a pixel value of 255 as the first foreground region. The boundary points of the first foreground region are used as patch contours, and their contour vertex coordinate sequences are extracted. Then, based on Green's theorem, the area of the patch region enclosed by the patch contour vertex coordinates is calculated. This can be achieved by obtaining the number of patch contour points and the patch contour vertex coordinates. Based on the number of patch contour points and the patch contour vertex coordinates, the area of the patch region enclosed by the patch contour is determined. This patch region area can be represented as follows:
[0117]
[0118] Among them, (x i ,y i ) is the coordinate of the i-th vertex of the patch contour, (x i+1 ,y i+1 ) is the coordinate of the (i+1)th vertex of the patch outline, and N is the number of pixels in the patch outline.
[0119] In this embodiment, noise is removed by Gaussian filtering, and the gradient calculation of the Sobel subscale is combined to improve the edge localization accuracy to the sub-pixel level, enhancing the edge continuity compared to traditional algorithms. Furthermore, by combining non-maximum suppression and a dual threshold strategy, edge refinement (single pixel width) is achieved while ensuring weak edge connectivity, thus improving the integrity of the patch contour compared to traditional methods. Thirdly, the area calculation based on Green's formula reduces errors and improves calculation accuracy for arbitrary polygon contours, shortening the processing time for a single slice.
[0120] Furthermore, the patch region image can be analyzed and processed to obtain the tissue region area, including: converting the brain tissue slice image to be processed into a grayscale image; performing thresholding on the grayscale image to set the pixels corresponding to the brain tissue in the grayscale image to black; performing morphological operations on the grayscale image to remove noise and fill in the void regions to obtain the processed image; the morphological operations include: opening operations with erosion followed by dilation and closing operations with dilation followed by erosion; scanning the processed image to find all connected foreground regions in the black region and using the boundary points of the foreground regions as the tissue contour; obtaining the outermost contour through the hierarchical relationship of the tissue contour; and calculating the tissue region area enclosed by the outermost contour using the coordinates of the vertex of the tissue contour based on the preset Green's formula.
[0121] Specifically, if the brain tissue slice image to be processed is a color image, it can be converted to grayscale to obtain a grayscale image. A preset grayscale threshold is then applied to the grayscale image, setting pixels corresponding to brain tissue with a grayscale value greater than the preset threshold to black. Morphological operations are then performed on the grayscale image, including opening operations (erosion followed by dilation) and closing operations (dilation followed by erosion), to remove noise and fill empty areas, resulting in a processed image. This processed image is then scanned to find all connected second foreground regions within the black areas. The boundary points of these second foreground regions are used as tissue contours. The outermost contour is obtained through the hierarchical relationship of these tissue contours. Brain tissue slices may contain multiple contours (such as the main tissue body and internal pores). The outermost closed contour is selected based on the hierarchical relationship of the contours (parent contour contains child contours): the area of the parent contour is always greater than that of the child contour, and the child contour is completely contained within the parent contour. Only the top-level contour without a parent contour is retained during extraction to ensure the overall outer boundary of the tissue is obtained. Finally, based on the preset Green's formula, the area of the tissue region enclosed by the outermost contour is calculated using the coordinates of the tissue contour vertices.
[0122] In this embodiment, the area of the tissue region can be accurately quantified through an automated image analysis process, providing an objective spatial reference for pathological research. By using morphological operations to eliminate noise and fill voids, the integrity of the tissue outline is ensured. Then, based on Green's formula, pixel-level area calculation is achieved, providing accurate data for the denominator of indicators such as plaque burden rate. This process can quickly peel off the main tissue region without manual intervention, effectively eliminating background interference, and providing intuitive quantitative evidence for morphological changes in brain tissue (such as atrophy and edema), which helps in the study of the pathological mechanisms of neurodegenerative diseases (Alzheimer's disease) and the evaluation of drug efficacy.
[0123] This application provides a method for determining patch data. Compared with existing technologies, this method acquires brain tissue slice images and performs image dimension reshaping processing on these images. This transforms the original 3D RGB image into a 2D array that retains complete color channel information, avoiding information loss in the traditional grayscale conversion process. This provides more accurate feature input for subsequent clustering. A clustering algorithm is then used to classify the pixels in the 2D array, achieving pixel color feature grouping and accurately obtaining pixel clustering results. This replaces the traditional subjective operation of manually adjusting contrast, improving patch recognition accuracy and eliminating individual differences. Furthermore, by extracting pixel labels from pixel clustering results and generating masks based on these labels, operational biases are reduced compared to traditional manual thresholding. Using the masks, plaque regions are accurately identified from brain tissue slice images, yielding corresponding plaque region images. These images are then analyzed to determine the plaque and tissue areas, constructing a dual-scale quantification system of "plaque-tissue." This system automates plaque burden calculation and reduces single-image analysis time through full-process automation, addressing the issues of large subjective biases and low efficiency in traditional methods. This provides efficient and objective data support for pathological research on Aβ plaques.
[0124] Based on the same inventive concept, this application also provides an apparatus for implementing the patch data determination method described above. The solution provided by this apparatus is similar to the solution described in the above method; therefore, the specific limitations in one or more of the patch data determination apparatus embodiments provided below can be found in the limitations of the patch data determination method described above, and will not be repeated here.
[0125] In one exemplary embodiment, such as Figure 4 As shown, a patch data determination device is provided, comprising:
[0126] The acquisition module 510 is used to acquire images of brain tissue slices to be processed;
[0127] The reshaping module 520 is used to perform image dimension reshaping processing on the brain tissue slice image to be processed, and obtain a two-dimensional array of each pixel; each two-dimensional array includes image pixel information and color channel information, and the image pixel information is the product of the image height and the image width;
[0128] Clustering module 530 is used to perform pixel classification processing on a two-dimensional array using a clustering algorithm to obtain pixel clustering results;
[0129] The mask generation module 540 is used to extract pixel labels from pixel clustering results and generate a mask based on the pixel labels.
[0130] The plaque identification module 550 is used to identify plaque regions from brain tissue slice images to be processed based on a mask, and obtain plaque region images.
[0131] The data determination module 560 is used to analyze and process the plaque region image to obtain plaque region data; the plaque region data includes the plaque region area and the tissue region area.
[0132] As an optional implementation, clustering module 530 is specifically used for:
[0133] The two-dimensional array is initialized with centroids by randomly selecting a pixel as the initial centroid. A set of centroids is formed based on the probability distribution of the Euclidean distance between each pixel and the initial centroid. The initial centroid is represented by a three-dimensional vector, which includes the RGB channel values of the pixel corresponding to the initial centroid.
[0134] For each pixel, calculate the Euclidean distance between the pixel and each centroid in the centroid set, assign the pixel to the cluster corresponding to the nearest centroid, and record the cluster label;
[0135] For each cluster, determine the mean of the RGB channel values of all pixels in the cluster, and use the mean as the new centroid.
[0136] Based on the new centroid, determine the change in centroid and judge whether the change in centroid meets the iteration stopping condition; the iteration stopping condition includes: the change in centroid is less than a preset threshold or the maximum number of iterations is reached.
[0137] If the iteration stopping condition is not met, perform distance calculation and cluster assignment operations until the iteration stopping condition is met, and obtain the pixel clustering result.
[0138] As an optional implementation, the mask generation module 540 is specifically used for:
[0139] Obtain the size information of the pixel label; the size information includes height and width.
[0140] Based on the size information, the data is filled into a standard two-dimensional array in row-major order to obtain two-dimensional data labels; each two-dimensional data label contains multiple elements; the spatial structure of the two-dimensional data labels corresponds to the spatial structure of the brain tissue slice image to be processed.
[0141] Each element in the two-dimensional data label is compared with the target pixel label to determine the mask corresponding to the target pixel label; the target pixel label is the preset pixel label of interest.
[0142] As an optional implementation, the patch determination module 550 is specifically used for:
[0143] A bitwise logical AND operation is performed between the pixel values of the brain tissue slice image to be processed and the pixel values of the mask to obtain the result; the result can be either true or false.
[0144] Determine the target pixel values for which the computation result is true from the brain tissue slice image to be processed;
[0145] The region corresponding to the target pixel value in the brain tissue slice image to be processed is taken as the plaque region;
[0146] Remove the remaining images from the brain tissue slice image except for the plaque region to obtain the plaque region image.
[0147] As an optional implementation, the data determination module 560 is specifically used for:
[0148] Remove noise from the patchy area image to obtain the denoised image;
[0149] The gradient magnitude and direction of the denoised image are calculated using the horizontal and vertical convolution kernels of the Sobel operator.
[0150] Non-maximum suppression is used to preserve the edge regions with the largest gradient magnitudes for edge refinement.
[0151] A dual-threshold comparison strategy is used to identify weak and strong edges, and weak edges are connected to strong edges to form a complete edge image;
[0152] The edge image is scanned to find all connected first foreground regions in the edge image, and the boundary points of the first foreground regions are used as patch contours; the first foreground region is a connected region composed of all pixels with a pixel value of 255 after the edge image is binarized.
[0153] Based on the preset Green's formula, the area of the patch region enclosed by the patch contour is calculated by using the coordinates of the patch contour vertices.
[0154] As an optional implementation, the data determination module 560 is further configured to:
[0155] Obtain the number of patch outline points and the coordinates of patch outline vertices;
[0156] The area enclosed by the patch outline is determined based on the number of patch outline points and the coordinates of the patch outline vertices.
[0157] As an optional implementation, the data determination module 560 is further configured to:
[0158] Convert the brain tissue slice image to be processed into a grayscale image;
[0159] Thresholding is applied to grayscale images to set the pixels corresponding to brain tissue in the grayscale images to black.
[0160] Morphological operations are performed on grayscale images to remove noise and fill in empty areas, resulting in the processed image. The morphological operations include opening operations (erosion followed by dilation) and closing operations (dilation followed by erosion).
[0161] The processed image is scanned to find all connected second foreground regions in the black area, and the boundary points of the second foreground regions are used as tissue contours.
[0162] Obtain the outermost contour by organizing the hierarchical relationship of the contours;
[0163] Based on the preset Green's formula, the area of the tissue region enclosed by the outermost contour is calculated using the coordinates of the tissue contour vertices.
[0164] The patch data determination device provided in this application acquires brain tissue slice images and performs image dimension reshaping processing on these images. This transforms the original three-dimensional RGB image into a two-dimensional array that retains complete color channel information, avoiding information loss in the traditional grayscale conversion process. This provides more accurate feature input for subsequent clustering. A clustering algorithm is then used to classify the pixels in the two-dimensional array, achieving pixel color feature grouping and accurately obtaining pixel clustering results. This replaces the traditional subjective operation of manually adjusting contrast, improving patch recognition accuracy and eliminating individual differences. Pixel labels are extracted from pixel clustering results and a mask is generated based on these labels, reducing operational bias compared to traditional manual thresholding. Using the mask, plaque regions are accurately identified from brain tissue slices, yielding corresponding plaque region images. These images are then analyzed to determine the plaque and tissue areas, constructing a dual-scale quantification system of "plaque-tissue." This system automates plaque burden calculation and reduces single-image analysis time through full-process automation, addressing the issues of large subjective bias and low efficiency in traditional methods. This provides efficient and objective data support for pathological research on Aβ plaques.
[0165] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 5As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores video tag processing data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a patch data determination method.
[0166] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0167] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0168] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0169] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0170] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0171] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0172] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0173] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0174] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for determining patch data, characterized in that, The method for determining patch data includes: Acquire images of brain tissue slices to be processed; The brain tissue slice image to be processed is subjected to image dimension reshaping processing to obtain a two-dimensional array of each pixel; each two-dimensional array includes image pixel information and color channel information, wherein the image pixel information is the product of image height and image width; A clustering algorithm is used to classify the pixels of the two-dimensional array to obtain pixel clustering results. Pixel labels are extracted from the pixel clustering results, and a mask is generated based on the pixel labels; Based on the mask, plaque regions are identified from the brain tissue slice image to be processed to obtain a plaque region image; The image of the patch region is analyzed and processed to obtain patch region data; the patch region data includes the patch region area and the tissue region area.
2. The patch data determination method according to claim 1, characterized in that, A clustering algorithm is used to classify the pixels of the two-dimensional array to obtain pixel clustering results, including: The two-dimensional array is initialized with centroids by randomly selecting a pixel as the initial centroid. A set of centroids is formed based on the probability distribution of the Euclidean distance between each pixel and the initial centroid. The initial centroid is represented by a three-dimensional vector, which includes the RGB channel values of the pixel corresponding to the initial centroid. For each pixel, calculate the Euclidean distance between the pixel and each centroid in the centroid set, assign the pixel to the cluster corresponding to the nearest centroid, and record the cluster label; For each cluster, determine the mean value of the RGB channel values of all pixels in the cluster, and use the mean value as the new centroid; Based on the new centroid, the change in centroid is determined, and it is judged whether the change in centroid meets the iteration stopping condition; the iteration stopping condition includes: the change in centroid is less than a preset threshold or the maximum number of iterations is reached; If the iteration stopping condition is not met, perform distance calculation and cluster allocation operations until the iteration stopping condition is met, and obtain the pixel clustering result.
3. The method for determining patch data according to claim 1, characterized in that, Generating a mask based on the pixel labels includes: Obtain the size information of the pixel label; the size information includes height and width; Based on the size information, the data is filled into a standard two-dimensional array in row-major order to obtain two-dimensional data labels; each two-dimensional data label includes multiple elements; the spatial structure of the two-dimensional data labels corresponds to the spatial structure of the brain tissue slice image to be processed. Each element in the two-dimensional data label is compared with the target pixel label to determine the mask corresponding to the target pixel label; the target pixel label is a preset pixel label of interest.
4. The method for determining patch data according to claim 1, characterized in that, Based on the mask, plaque regions are identified from the brain tissue slice image to be processed to obtain a plaque region image, including: A bitwise logical AND operation is performed between the pixel values of the brain tissue slice image to be processed and the pixel values of the mask to obtain the operation result; the operation result includes true or false. Determine the target pixel value whose calculation result is true from the brain tissue slice image to be processed; The region corresponding to the target pixel value in the brain tissue slice image to be processed is taken as the patch region; Remove the remaining images from the brain tissue slice image except for the plaque region to obtain the plaque region image.
5. The method for determining patch data according to claim 1, characterized in that, The patch region image is analyzed and processed to obtain the patch region area, including: The noise in the patch region image is removed to obtain a denoised image; The gradient magnitude and direction of the denoised image are calculated using the horizontal and vertical convolution kernels of the Sobel operator; Non-maximum suppression is used to preserve the edge regions with the largest gradient magnitudes for edge refinement. A dual-threshold comparison strategy is used to identify weak and strong edges, and weak edges are connected to strong edges to form a complete edge image; The edge image is scanned to find all connected first foreground regions in the edge image, and the boundary points of the first foreground regions are used as patch contours; the first foreground region is a connected region composed of all pixels with a pixel value of 255 after binarization of the edge image. Based on the preset Green's formula, the area of the patch region enclosed by the patch contour is calculated using the coordinates of the patch contour vertices.
6. The method for determining patch data according to claim 5, characterized in that, Based on Green's formula, the area of the patch region enclosed by the patch contour is calculated using the vertex coordinates of the patch contour, including: Obtain the number of patch outline points and the coordinates of the patch outline vertices; The area of the patch region enclosed by the patch outline is determined based on the number of patch outline points and the coordinates of the patch outline vertices.
7. The method for determining patch data according to claim 1, characterized in that, The patch region image is analyzed and processed to obtain patch region data, including: The brain tissue slice image to be processed is converted into a grayscale image; Thresholding is performed on the grayscale image to set the pixels corresponding to brain tissue in the grayscale image to black; Morphological operations are performed on the grayscale image to remove noise and fill in empty areas, resulting in a processed image; the morphological operations include: opening operations (erosion followed by dilation) and closing operations (dilation followed by erosion); The processed image is scanned to find all connected second foreground regions in the black area, and the boundary points of the second foreground regions are used as tissue contours. The outermost contour is obtained through the hierarchical relationship of the tissue contour; Based on the preset Green's formula, the area of the tissue region enclosed by the outermost contour is calculated using the coordinates of the tissue contour vertices.
8. A patch data determination device, characterized in that, The patch data determination device includes: The acquisition module is used to acquire images of brain tissue slices to be processed; The reshaping module is used to perform image dimension reshaping processing on the brain tissue slice image to be processed, to obtain a two-dimensional array of each pixel; each two-dimensional array includes image pixel information and color channel information, wherein the image pixel information is the product of image height and image width; The clustering module is used to perform pixel classification processing on the two-dimensional array using a clustering algorithm to obtain pixel clustering results; A mask generation module is used to extract pixel labels from the pixel clustering results and generate a mask based on the pixel labels. The plaque identification module is used to identify plaque regions from the brain tissue slice image to be processed based on the mask, and obtain a plaque region image; The data determination module is used to analyze and process the image of the patch region to obtain patch region data; the patch region data includes the patch region area and the tissue region area.
9. A computer device, comprising: The memory and processor contain a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the patch data determination method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the patch data determination method according to any one of claims 1-7.
Citation Information
Patent Citations
Method and system for synthesizing MRI image into CT image based on deep learning
CN115311182A
Image region segmentation method suitable for dynamic scene
CN117078699A