Medical specimen intelligent inventory method and system
By constructing an undirected weighted graph and a geodesic distance algorithm, the problem of inventory errors caused by deformation and positional shift of human specimens in preservation fluid was solved, achieving efficient and accurate specimen inventory.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHANGJIAGANG DEREN SCI EQUIP CO LTD
- Filing Date
- 2026-03-06
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies are susceptible to interference from deformation and positional shifts when inventorying human specimens, leading to low inventory efficiency and misjudgments, especially for biological tissues immersed in preservation solutions, where the true integrity cannot be accurately confirmed.
By acquiring specimen images, image processing is performed using the green channel extraction algorithm, adaptive histogram equalization algorithm, and top-hat transformation operation. Segmentation and skeleton extraction are then performed by combining the maximum inter-class variance method and morphological closing operation. An undirected weighted graph is constructed, and accurate inventory is performed using geodesic distance and shortest path algorithms.
It achieves highly accurate and robust inventory of human specimens, eliminating interference from deformation and positional flipping in the preservation solution, and improving the automation accuracy and efficiency of inventory.
Smart Images

Figure CN121789936B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent monitoring technology, and in particular to an intelligent inventory method and system for medical specimens. Background Technology
[0002] Human specimens are important physical resources for medical teaching, clinical research, anatomy training, and life science-related fields. They typically include human organ specimens, tissue specimens, bone specimens, plastinated specimens, and various anatomical specimens used for teaching. These specimens are characterized by their special origins, high preparation costs, strict preservation conditions, and non-reproducibility, making them a key material basis for medical colleges, research institutions, and related medical institutions to carry out teaching practice and scientific research.
[0003] Standardized and routine inventory management of human specimens is an important part of ensuring the orderly use of specimen resources and improving teaching and research efficiency. Effective inventory management can promptly detect abnormalities such as missing, damaged, expired, or disorderly stored specimens, reducing the risk of specimen loss, misuse, and loss of management control.
[0004] The relevant technologies mainly rely on manual visual verification or barcode scanning to confirm and register medical specimen information. For example, managers check the labels on the outside of the specimen containers one by one and compare the label information with the ledger information.
[0005] For human biological tissues immersed in preservation solutions, positional shifts or non-rigid deformations are prone to occur. Relying solely on external labels cannot confirm the true integrity of the biological tissues inside the container. The manual verification process is easily affected by subjective fatigue, leading to a significant decrease in the ability to perceive subtle morphological changes. Related technologies suffer from low inventory efficiency and are susceptible to misjudgments due to deformation interference. Summary of the Invention
[0006] To achieve more accurate inventory of human specimens, this application provides a method and system for intelligent inventory of medical specimens.
[0007] According to a first aspect of the embodiments of this application, a method for intelligent inventory of medical specimens is provided, comprising: acquiring a specimen image of a human specimen; processing the specimen image using a green channel extraction algorithm, an adaptive histogram equalization algorithm, and a top-hat transformation operation to obtain an enhanced single-channel image; segmenting the enhanced single-channel image using the maximum inter-class variance method and morphological closing operation to determine a specimen binary mask, and extracting the skeleton from the specimen binary mask using a parallel thinning algorithm to obtain a topological skeleton image; scanning the skeleton pixels in the topological skeleton image, and performing an eight-neighbor connectivity algorithm on the skeleton pixels... The algorithm performs feature classification to identify endpoint nodes and bifurcation nodes corresponding to different anatomical locations. Path search is then performed starting from different feature nodes, and an undirected weighted graph is constructed using endpoint nodes, bifurcation nodes, and the physical connections between nodes. Grid path tracking calculations are performed on node pairs with connections in the undirected weighted graph to determine the geodesic distance of node pairs along the biological tissue surface. A real-time geodesic matrix is constructed using geodesic distance and shortest path algorithms. Isomorphic matching and node alignment operations are performed on the real-time geodesic matrix and the pre-stored standard geodesic matrix to determine the inventory results of the human specimen.
[0008] This allows for a more accurate inventory of human specimens.
[0009] Optionally, the enhanced single-channel image is determined as follows: The green channel data is extracted from the specimen image to obtain an initial single-channel image; the initial single-channel image is divided into multiple non-overlapping image sub-blocks; the cumulative distribution function is independently determined within each image sub-block; grayscale mapping is performed using the cumulative distribution function, and the contrast amplification value during the grayscale mapping process is limited; a bilinear interpolation algorithm is used to smooth and fuse the boundary regions of the processed image sub-blocks to determine an intermediate image; a top-hat transform operation is performed on the intermediate image to remove the background illumination component and obtain the enhanced single-channel image.
[0010] In this way, the problem of uneven illumination that may exist is suppressed by adaptive histogram equalization and top-hat transformation of local image sub-blocks.
[0011] Optionally, the topological skeleton image is determined as follows: the optimal global threshold for enhancing the single-channel image is determined using the Otsu's method; the enhanced single-channel image is binarized using the optimal global threshold to determine the initial binary image; a dilation-erosion operation is performed on the initial binary image using morphological closing operations to obtain a specimen binary mask; pixel culling is performed on the specimen binary mask using a parallel thinning algorithm based on iterative stripping to determine the initial skeleton image; and branch pruning is performed on the initial skeleton image to determine the topological skeleton image.
[0012] In this way, by combining inter-class variance and morphological closing operations, the hole defects inside the binary mask of the specimen are repaired.
[0013] Optionally, branch pruning is performed on the initial skeleton image to determine the topological skeleton image, including: traversing the endpoint pixels in the initial skeleton image, determining the number of skeleton pixels between the endpoint pixels and the nearest bifurcation point pixel, and determining the physical path length of the corresponding branch in combination with the actual size of the pixel; determining the branch pruning threshold using the preset feature length of the human specimen, and removing the branch from the initial skeleton image if the physical path length of the branch is less than the branch pruning threshold to obtain the topological skeleton image.
[0014] In this way, the pruning operation based on the physical path length of the branch removes false skeleton branches caused by image noise.
[0015] Optionally, the topological skeleton image is determined as follows: convex defect detection is performed on the specimen contour in the specimen image to determine the defect depth value. If the defect depth value is greater than a preset depth threshold, it is determined that there is regional overlap or adhesion in the specimen. The two closest deep concave point pixels on the specimen contour are determined, and the two deep concave point pixels are used as the endpoints of the cutting line for virtual segmentation, decomposing the target connected region into multiple independent sub-regions. The different independent sub-regions are refined separately to determine the topological skeleton image.
[0016] In this way, by using convex defect detection and virtual segmentation, the variation in skeleton topology caused by the overlap of multiple specimens is avoided.
[0017] Optionally, endpoint nodes and branch point nodes are determined as follows: traverse the skeleton pixels in the scan topology skeleton image, determine the number of non-zero pixels and the number of pixel transitions in the eight-neighbor range of the skeleton pixel; if the number of pixel transitions is equal to a first preset value and the number of non-zero pixels is equal to 1, mark the corresponding skeleton pixel as an endpoint node; if the number of pixel transitions is greater than or equal to a second preset value and the number of non-zero pixels is greater than or equal to 3, mark the corresponding skeleton pixel as a branch point node; wherein, the second preset value is greater than the first preset value.
[0018] Optionally, the undirected weighted graph is constructed as follows: the endpoint nodes and branch nodes are determined as the feature node set; starting from the starting feature node in the feature node set, an iterative search operation is performed along the path pixels in the topological skeleton image; when the search reaches the ending feature node in the feature node set, an edge connection relationship is established between the starting feature node and the ending feature node; the undirected weighted graph is determined using the feature node set and the edge connection relationship.
[0019] Optionally, the geodesic distance is determined as follows: In the pixel grid space, the horizontal and vertical adjacent pixel spacings are defined as first distance values; the diagonal adjacent pixel spacing is defined as a second distance value; starting from the starting node in the undirected weighted graph, the search proceeds along the skeleton path in the topological skeleton image to the corresponding ending node; the number of first and second distance values involved in the search process is accumulated, and the first and second distance values are weighted and summed to determine the geodesic distance.
[0020] Optionally, the real-time geodesic matrix is constructed as follows: an initial matrix of dimension N×N is established, where N is the total number of feature nodes in the undirected weighted graph; for node pairs with direct edge connections, the corresponding matrix elements are filled with geodesic distances; for node pairs without direct edge connections, the shortest path is searched in the undirected weighted graph using a shortest path search algorithm, and the corresponding matrix elements are filled with the total length value corresponding to the shortest path; the real-time geodesic matrix is determined using all matrix elements.
[0021] Optionally, the inventory results of human specimens are determined in the following way: using the node connectivity degree as an index, isomorphic matching and node alignment operations are performed on the real-time geodesic matrix and the standard geodesic matrix to determine the length difference rate of the corresponding path edges; if the length difference rate exceeds the preset tolerance threshold range, or if the node alignment result indicates that the target node with the anatomical location is missing, the inventory results of human specimens are determined to be abnormal.
[0022] According to a second aspect of the embodiments of this application, a medical specimen intelligent inventory system is provided, comprising: a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions, when executed by the processor, implement the steps of the medical specimen intelligent inventory method provided in the first aspect of this application.
[0023] The technical solutions provided by the embodiments of this application may include the following beneficial effects: by extracting the topological skeleton of human specimens and constructing an undirected weighted graph representing physical connection relationships, the complex biological tissue morphology can be abstracted into a stable mathematical graph theory model. By using geodesic distance to construct a real-time geodesic matrix and performing isomorphic matching, the interference caused by non-rigid deformation or position flipping of specimens in the preservation solution is eliminated, thereby improving the accuracy and robustness of automatic inventory of medical specimens.
[0024] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0025] Figure 1This is a flowchart illustrating an intelligent inventory method for medical specimens according to an exemplary embodiment;
[0026] Figure 2 This is a schematic diagram comparing geodesic distance and Euclidean distance in the embodiments of this application;
[0027] Figure 3 This is a schematic diagram illustrating the structure of an intelligent medical specimen inventory system according to an exemplary embodiment. Detailed Implementation
[0028] To achieve more accurate inventory of human specimens, embodiments of this application provide a method and system for intelligent inventory of medical specimens. Figure 1 This is a flowchart illustrating an intelligent inventory method for medical specimens according to an exemplary embodiment, such as... Figure 1 As shown, the method includes the following steps.
[0029] In step S101, a specimen image of a human specimen is acquired, and the specimen image is processed using a green channel extraction algorithm, an adaptive histogram equalization algorithm, and a top-hat transformation operation to obtain an enhanced single-channel image.
[0030] In one embodiment, green channel data is extracted from the specimen image to obtain an initial single-channel image, which is then divided into multiple non-overlapping image sub-blocks. A cumulative distribution function is independently determined within each sub-block, and grayscale mapping is performed using the cumulative distribution function, while limiting the contrast amplification during the grayscale mapping process. A bilinear interpolation algorithm is used to smooth and fuse the boundary regions of the processed sub-blocks to determine an intermediate image. A top-hat transform operation is then performed on the intermediate image to remove the background illumination component, resulting in an enhanced single-channel image.
[0031] Human biological tissues contain abundant microvascular networks and specific protein deposits. Biological tissues have a high absorption characteristic of the green light band in the visible light spectrum. Extracting green channel data from specimen images can maximize the optical contrast between the surface of the biological entity and the surrounding formaldehyde solution.
[0032] Dividing the initial single-channel image into fixed-size image sub-blocks allows for fine-grained adjustment of illumination attenuation in local areas of the specimen. The independent cumulative distribution function calculation mode can prevent the merging of dark details caused by global equalization.
[0033] Limiting the contrast amplification value can suppress discrete optical noise caused by suspended impurities inside the preservation fluid. The bilinear interpolation algorithm calculates the boundary pixel smoothing value by comprehensively obtaining the pixel values of the center points of four adjacent image sub-blocks. The bilinear interpolation operation eliminates the grid-like stitching artifacts caused by the block-independent processing mode.
[0034] The top-cap transformation operation uses a structuring element larger than the width of the surface texture of the specimen tissue to perform a morphological opening operation on the intermediate image. The difference between the intermediate image and the opening operation result is calculated, which can remove the slowly changing background illumination component formed by the refraction of the preservation fluid.
[0035] In the process of limiting the contrast magnification, the histogram truncation threshold of image sub-blocks can be determined using the following formula. : In the formula for calculating the histogram cutoff threshold, This represents the total number of pixels contained in the current image sub-block. This represents the total number of gray levels allowed in the current image sub-block. This represents the preset contrast limit coefficient.
[0036] The histogram truncation threshold defines the maximum number of pixels allowed to cluster at a single gray level in the histogram. The dimension of the histogram truncation threshold is the same as that of the total number of pixels. The contrast limit coefficient is a dimensionless empirical adjustment parameter used to characterize the degree of relaxation of local contrast.
[0037] When the pixel grayscale values of a specific image sub-block are highly concentrated, the pixels that exceed the histogram truncation threshold are stripped and evenly distributed to all grayscale ranges. The peaks of the histogram are effectively flattened, avoiding irreversible brightness saturation distortion in the mapped image.
[0038] By combining local contrast adjustment with background illumination stripping, the interference of external ambient light disturbances and fluctuations in the transparency of the preserved liquid on the visual information of biological tissues is eliminated.
[0039] In step S102, the enhanced single-channel image is segmented using the Otsu's method and morphological closing operation to determine the specimen binary mask, and the specimen binary mask is extracted using a parallel thinning algorithm to obtain a topological skeleton image.
[0040] In one embodiment, the optimal global threshold for enhancing a single-channel image is determined using the maximum inter-class variance method. The enhanced single-channel image is then binarized using the optimal global threshold to determine an initial binary image. Morphological closing operations are then performed on the initial binary image to perform a dilation-erosion operation, obtaining a specimen binary mask. A parallel thinning algorithm based on iterative stripping is then used to perform pixel culling on the specimen binary mask to determine an initial skeleton image. Finally, branch pruning is performed on the initial skeleton image to determine a topological skeleton image.
[0041] The process of obtaining the optimal global threshold is based on maximizing the inter-class variance search between the foreground biological tissue pixels and the background preservation fluid pixels. Binarization using the optimal global threshold can obtain an initial binary image with clear boundaries. Due to the presence of reflective white spots or calcified deposition areas on the surface of some biological tissues, a large number of void connected regions may remain inside the initial binary image.
[0042] Morphological closing operations can expand tissue boundaries outward using 5×5 rectangular structuring elements, filling in tiny cracks and voids within the tissue. The erosion operation shrinks the expanded boundaries back to their original scale. Morphological closing operations ensure the topologically connected properties of the specimen's binary mask.
[0043] The parallel thinning algorithm based on iterative stripping scans the boundary pixels of the specimen's binary mask through multiple rounds of iteration. The parallel thinning algorithm based on iterative stripping follows the principle of maintaining the original topological connectivity and not destroying the endpoint connectivity. In even-numbered and odd-numbered iterations, the algorithm strips the outer pixels of the tissue contour from different directions until the remaining pixel width reaches the single-pixel level.
[0044] The initial skeleton image at the single-pixel level can characterize the axial extension of the skeleton of biological tissue in multi-dimensional space; the branch pruning operation removes short pseudo-skeleton branches caused by tissue edge burrs, resulting in a pure topological skeleton image.
[0045] In one embodiment, the endpoint pixels in the initial skeleton image are traversed to determine the number of skeleton pixels between the endpoint pixels and the nearest bifurcation point pixels, and the physical path length of the corresponding branch is determined in combination with the actual size of the pixels; the branch pruning threshold is determined using the preset feature length of the human specimen; if the physical path length of the branch is less than the branch pruning threshold, the branch is removed from the initial skeleton image to obtain the topological skeleton image.
[0046] An endpoint pixel is connected to only one skeleton pixel, while a branch point pixel is connected to three or more skeleton pixels. The number of skeleton pixels between an endpoint pixel and the nearest branch point pixel directly reflects the extension scale of the current skeleton branch.
[0047] Multiplying the number of skeleton pixels by the physical size represented by a single pixel can transform the abstract pixel distance into the physical path length of a branch in the real world; the preset feature length is an empirical value obtained based on the statistical analysis of the anatomical features of normal biological tissue; if the physical path length of a branch is less than the branch pruning threshold, it indicates that the branch is a false extension caused by irregular edges or segmentation noise.
[0048] Removing branches generated by false extensions can prevent these short branches from being misidentified as anatomical tissue ends in subsequent processing; setting a branch pruning threshold can effectively filter out most high-frequency morphological noise; pruning operations based on real physical dimensions ensure that the topological skeleton image is strictly faithful to the macroscopic anatomical structure of biological tissues.
[0049] In one embodiment, convex defect detection is performed on the specimen contour in the specimen image to determine the defect depth value. If the defect depth value is greater than a preset depth threshold, it is determined that there is regional overlap or adhesion in the specimen. The two closest deep concave point pixels on the specimen contour are determined, and the two deep concave point pixels are used as the endpoints of the cutting line to perform virtual segmentation, decomposing the target connected region into multiple independent sub-regions. The different independent sub-regions are refined separately to determine the topological skeleton image.
[0050] Human specimens may experience tissue compression within a specific preservation container due to their own gravity or the agitation of the liquid; this compression can lead to large areas of overlap on a two-dimensional projection plane.
[0051] The maximum distance between the convex hull polygon of the specimen outline and the actual non-convex outline is defined as the defect depth value. An abnormally large defect depth value indicates that multiple originally independent anatomical structures have undergone severe visual fusion under the current viewpoint. Deep concave pixel usually corresponds to the vertex of the interface gap formed by the mutual compression of multiple tissues.
[0052] By constructing virtual segmentation lines using deep concave pixels, complex and adhered target connected regions can be re-exposed; by decomposing the target connected regions into multiple independent sub-regions, the original independent morphological boundaries of each tissue can be restored; by performing pixel-level refinement operations on the independent sub-regions, the independent skeletal morphology of different biological tissues can be extracted separately. The virtual segmentation operation avoids the generation of incorrect cross-bridged skeletons at the adhesion points of different specimens, ensuring the correspondence between the topological structure and the physical entity.
[0053] In step S103, the skeleton pixels in the topological skeleton image are scanned, and the skeleton pixels are classified by feature using the eight-neighbor connectivity algorithm. The endpoint nodes and branch nodes corresponding to different anatomical positions are determined, and path search is performed starting from different feature nodes. An undirected weighted graph is constructed using endpoint nodes, branch nodes, and the physical connection relationships between nodes.
[0054] In one embodiment, the skeleton pixels in the scan topology skeleton image are traversed to determine the number of non-zero pixels and the number of pixel transitions in the eight-neighborhood of each skeleton pixel; if the number of pixel transitions is equal to a first preset value and the number of non-zero pixels is equal to 1, the corresponding skeleton pixel is marked as an endpoint node; if the number of pixel transitions is greater than or equal to a second preset value and the number of non-zero pixels is greater than or equal to 3, the corresponding skeleton pixel is marked as a branching node; wherein the second preset value is greater than the first preset value.
[0055] The skeleton pixel is located on the geometric central axis of the biological tissue, and its eight adjacent pixels constitute an eight-neighborhood range; the number of non-zero pixels reflects the number of valid skeleton pixels around the current skeleton pixel; the number of pixel transitions refers to the number of times the pixel value changes from black background to white skeleton when circling the eight-neighborhood range in a clockwise direction.
[0056] The first preset value can usually be set to 1, and the second preset value can usually be set to 3. When there is only one non-zero pixel around the skeleton pixel and the number of pixel transitions is 1, the skeleton pixel is located in the absolute end region of a certain line segment.
[0057] Skeleton pixels located in the terminal region anatomically correspond to the outermost edge of blood vessel terminals or tissues and organs, and are marked as endpoint nodes; when the number of non-zero pixels is greater than or equal to 3 and the number of pixel jumps is greater than or equal to 3, it indicates that three or more skeleton branches converge and merge at the current skeleton pixel.
[0058] The fused skeleton pixels correspond anatomically to the bifurcation points of main blood vessels or the connecting hubs of tissues and organs, and are marked as bifurcation point nodes; the eight-neighbor connectivity algorithm can efficiently locate feature positions with key topological significance during the scanning of topological skeleton images.
[0059] In one embodiment, endpoint nodes and branch point nodes are defined as a set of feature nodes. Starting from the starting feature node in the feature node set, an iterative search operation is performed along the path pixels in the topological skeleton image; if the search reaches the ending feature node in the feature node set, an edge connection relationship is established between the starting feature node and the ending feature node; the undirected weighted graph is determined using the feature node set and the edge connection relationship.
[0060] Endpoint nodes record the extension boundary information of biological tissues, while bifurcation node records the structural differentiation information of biological tissues. Endpoint nodes and bifurcation node are compiled into a set of feature nodes, and iterative search operations are performed starting from the starting feature node.
[0061] The search process is constrained within the path pixel trajectory with non-zero pixel values in the topological skeleton image, and continues to advance along the path pixels until the search encounters another valid feature node within the feature node set.
[0062] When the search process reaches the endpoint feature node, it indicates that the search process for the complete topological skeleton branch has been completed. The edge connection relationship constructed between the starting feature node and the endpoint feature node maps the physical connection relationship between the physical tissues between two key anatomical locations in real space.
[0063] Undirected weighted graphs bind discrete feature nodes into a holistic graph data structure through structured edge connections. The networked data structure has natural invariance to rigid translations and angular rotations of biological specimens.
[0064] In step S104, grid path tracking calculation is performed on the node pairs with connection relationships in the undirected weighted graph to determine the geodesic distance of the node pairs along the direction of the biological tissue surface, and a real-time geodesic matrix is constructed using the geodesic distance and the shortest path algorithm.
[0065] In one embodiment, the horizontal and vertical distances between adjacent pixels in the pixel grid space are defined as first distance values; the diagonal distance between adjacent pixels is defined as a second distance value; starting from the starting node in the undirected weighted graph, the search proceeds along the skeleton path in the topological skeleton image to the corresponding ending node; the number of first distance values and the number of second distance values involved in the search process are accumulated, and the first distance value, the second distance value, and the corresponding number are weighted and summed to determine the geodesic distance.
[0066] In a grid array, the spatial span generated by moving one pixel unit horizontally or vertically is defined as the first distance value, which is set to 1; the spatial span generated by moving one pixel unit diagonally is defined as the second distance value.
[0067] When determining the true physical distance between the start node and the end node, the curvature of the biological tissue surface cannot be accurately measured using straight-line Euclidean distance; pixel-by-pixel trajectory tracking along the skeleton path can fit the true curvature of the biological tissue surface.
[0068] The number of first distance values and the number of second distance values record the number of orthogonal displacement steps and oblique displacement steps involved in the path trajectory, respectively. The geodesic distance reflects the real physical length that two anatomical nodes need to cross to move along the actual epidermal tissue of the specimen. The geodesic distance shows a strong tolerance for non-rigid bending of the specimen tissue in three-dimensional space.
[0069] In the calculation of geodetic distance, the weighted summation result can be determined using the following formula. In the formula for calculating the weighted sum, Represents the first distance value; This represents the number of initial distance values accumulated during path tracing. Represents the second distance value. The number of second distance values accumulated during path tracing is represented by the weighted summation, which represents the total length of the discrete path between two feature nodes with a direct connection.
[0070] The dimensions of the first and second distance values are pixel units; the corresponding quantities are dimensionless positive integers. On skeleton branches with greater curvature, the number of second distance values will increase due to the large number of diagonal jumps. The weighted summation calculation can fully take into account the additional length increment introduced by the oblique displacement. The geodesic distance calculation formula avoids directly equating the Manhattan distance of the pixel grid with the actual physical path, thus improving the accuracy of distance measurement.
[0071] In one embodiment, an initial matrix of dimension N×N is established, where N is the total number of feature nodes in the undirected weighted graph; for node pairs with direct edge connections, the corresponding matrix elements are filled with geodesic distances; for node pairs without direct edge connections, the shortest path search algorithm is used to search for the shortest path in the undirected weighted graph, and the corresponding matrix elements are filled with the total length value corresponding to the shortest path; the real-time geodesic matrix is determined using all matrix elements.
[0072] An initial matrix of dimension N×N provides a globally unified graph structure storage container. The row index and column index in the initial matrix uniquely correspond to the feature nodes in the undirected weighted graph. For node pairs that are directly connected by physical organizational entities, their matrix elements are directly numerically covered using the aforementioned geodesic distance.
[0073] Shortest path search algorithms, such as Dijkstra's algorithm, can automatically find the path with the minimum distance cost connecting non-adjacent node pairs in complex graph networks; filling the matrix elements corresponding to node pairs without direct edge connections with the total length value corresponding to the shortest path ensures the density and global completeness of the matrix content; the real-time geodesic matrix completely projects and maps the three-dimensional topological space structure of medical specimens into a two-dimensional digital matrix with strict algebraic properties.
[0074] The technical principle of calculating geodesic distance and constructing a real-time geodesic matrix lies in using global topological invariants to resist local deformation interference; the value of any element inside the real-time geodesic matrix does not depend on the absolute coordinate value of the node in the image coordinate system; when medical specimens are distorted in the preservation fluid, the internal numerical distribution of the real-time geodesic matrix can still maintain a high degree of stability.
[0075] Figure 2 This is a schematic diagram comparing geodesic distance and Euclidean distance in an embodiment of this application, as shown below. Figure 2 As shown, multiple anatomical feature markers, including the shoulder and wrist, were identified through the extracted topological skeleton. However, when using the existing Euclidean linear distance path technique, the linear path will pass through the preservation fluid area outside the biological tissue when the limb undergoes natural bending or non-rigid deformation, and cannot conform to the actual trend of the anatomical structure, resulting in errors in the measurement length.
[0076] In the scheme of this application embodiment, the path is tracked point by point along the pixel trajectory of the topological skeleton. The path conforms to the real curvature of the biological tissue surface, and its determined geodesic length can objectively reflect the intrinsic physical size of the anatomical structure.
[0077] In step S105, isomorphic matching and node alignment operations are performed on the real-time geodesic matrix and the pre-stored standard geodesic matrix to determine the inventory results of the human specimens.
[0078] In one embodiment, the node connectivity degree is used as an index to perform isomorphic matching and node alignment operations on the real-time geodesic matrix and the standard geodesic matrix to determine the length difference rate of the corresponding path edges. If the length difference rate exceeds a preset tolerance threshold, or if the node alignment result indicates that the target node lacks an anatomical location, the inventory result of the human specimen is determined to be abnormal.
[0079] The node connectivity degree is defined as the total number of skeleton branches directly connected to a feature node in an undirected weighted graph. In geodesic matrices from different sources, anatomically identical key nodes must have equal node connectivity degrees. Using node connectivity degrees as a preliminary screening index can significantly reduce the search solution space of the isomorphic matching algorithm. After completing the one-to-one mapping of nodes, the isomorphic matching algorithm performs a numerical comparison of the corresponding path edges in the real-time geodesic matrix and the standard geodesic matrix.
[0080] The length difference rate reflects the degree of physical scale deviation of the current inventory specimen in a specific anatomical segment. The preset tolerance threshold range is to accommodate the normal osmotic pressure swelling and shrinkage changes that occur in medical specimens in preservation solutions of different concentrations.
[0081] When the length difference rate exceeds the preset tolerance threshold, it indicates that the specimen may have undergone irreversible physical tearing due to excessive compression. The lack of target nodes in the node alignment results indicates that specific tissue branches or organ appendages that should have been present have been lost inside the current container. The abnormal information in the inventory results provides evidence to support the subsequent asset traceability investigation.
[0082] In one embodiment, the real-time sum of all matrix elements in the real-time geodesic matrix and the standard sum of all standard elements in the standard geodesic matrix are calculated; the real-time sum and the standard sum are used to perform global scaling normalization on the real-time geodesic matrix to determine the normalized matrix; the connectivity degree of each node in the normalized matrix is extracted, and node alignment is performed between the normalized matrix and the standard geodesic matrix based on the connectivity degree to determine the edges with the same topological position in the different matrices; the absolute value of the length difference between the corresponding edges in the normalized matrix and the standard geodesic matrix is calculated, and the ratio of the absolute value of the length difference to the standard length of the corresponding edge in the standard geodesic matrix is determined as the length difference rate.
[0083] Due to variations in the lens focal length of the imaging equipment or the depth of field position of the specimen within the container, the acquired specimen images inevitably exhibit scaling errors in their overall proportions. The real-time summation value characterizes the current macroscopic scale summation of the specimen in the image space.
[0084] The standard sum value represents the baseline macroscale established when the specimen is registered in the library. By using the ratio of the two to perform global scale normalization on the real-time geodesic matrix, the current measurement results can be forcibly mapped to the same absolute coordinate scale as the library baseline.
[0085] The normalization matrix completely eliminates systematic biases introduced by changes in the shooting environment. After mapping and associating edges with the same topological position based on connectivity degree, the difference rate is calculated for specific values. The absolute value of the length difference quantifies the magnitude of the error. The proportional calculation form of the length difference rate provides a unified anomaly judgment scale for skeleton branches of different length levels. The length difference rate avoids the problems of excessive amplification of errors in long skeleton branches and neglect of errors in short skeleton branches.
[0086] In the calculation of the length difference rate, the length difference rate for a specific path edge is determined using the following formula. : In the formula for calculating the length difference rate, This represents the normalized distance value of a specific path edge in the normalized matrix; Represents the standard distance value of corresponding sides in the standard geodesic matrix; the length difference rate is a dimensionless percentage parameter. To take the absolute value.
[0087] When local tissue expansion occurs in the specimen, the normalized distance value is greater than the standard distance value; when local tissue shrinkage or breakage occurs in the specimen, the normalized distance value is significantly smaller than the standard distance value. The length difference rate calculation formula can capture the degree of tissue deformation in any direction and shows a positive correlation with the degree of deformation in numerical terms.
[0088] In one embodiment, if the length difference rate exceeds a preset tolerance threshold, it can be determined that the specimen part to which the corresponding path edge belongs has undergone deformation abnormalities or tissue loss; based on the index of the abnormal path edge in the undirected weighted graph, the abnormal coordinate region in the topological skeleton image is located. The abnormal coordinate region is mapped onto the specimen image, and the corresponding image region is rendered using a highlighting layer.
[0089] The determination of abnormal deformation or tissue loss provides a final qualitative assessment report of the specimen's condition. The edge information in the undirected weighted graph not only includes the length value, but also retains the set of trajectory point coordinates when it was generated on the image plane. Based on the index of the abnormal path edge in the undirected weighted graph, it is possible to trace back and quickly locate the specific pixel segment on the topological skeleton image.
[0090] The topological skeleton image and the original input specimen image maintain a one-to-one correspondence in the coordinate system scale. Mapping the abnormal coordinate regions into the interior of the specimen image realizes the feedback of the abstract mathematical model to the intuitive visual interface.
[0091] Highlighting layers are used to apply rendering techniques, such as color filling or external glow halos, to corresponding image areas. This rendering process guides asset managers' attention to the damaged parts of the specimen instantly, reducing the time cost of manually verifying anomalies.
[0092] Figure 3 This is a schematic diagram illustrating the structure of a medical specimen intelligent inventory system 1000 according to an exemplary embodiment. (Refer to...) Figure 3 The intelligent medical specimen inventory system 1000 includes a processor 1100 and a memory 1200. The memory 1200 stores computer program instructions, which, when executed by the processor 1100, implement all or part of the steps of the intelligent medical specimen inventory method of this application.
[0093] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only.
[0094] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A method for intelligent inventory of medical specimens, characterized in that, include: The specimen images of human specimens are acquired, and the specimen images are processed using the green channel extraction algorithm, the adaptive histogram equalization algorithm, and the top-hat transformation operation to obtain enhanced single-channel images. The Otsu's method and morphological closing operation are used to segment the enhanced single-channel image to determine the specimen binary mask. The parallel thinning algorithm is used to extract the skeleton of the specimen binary mask to obtain the topological skeleton image. Scan the skeleton pixels in the topological skeleton image, use the eight-neighbor connectivity algorithm to classify the skeleton pixels by feature, determine the endpoint nodes and bifurcation nodes corresponding to different anatomical positions, and perform path search from different feature nodes. Construct an undirected weighted graph using endpoint nodes, bifurcation nodes and physical connection relationships between nodes. For nodes with connections in an undirected weighted graph, grid path tracing is performed to determine the geodesic distance of the node pairs along the direction of the biological tissue surface. This includes: defining the horizontal and vertical adjacent pixel spacing as first distance values in the pixel grid space; defining the diagonal adjacent pixel spacing as a second distance value; starting from the starting node in the undirected weighted graph, searching along the skeleton path in the topological skeleton image to the corresponding ending node; accumulating the number of first distance values and the number of second distance values involved in the search process, and using the first distance value, the second distance value, and the corresponding number to perform a weighted sum to determine the geodesic distance. A real-time geodesic matrix is constructed using geodesic distance and shortest path algorithms, including: establishing an initial matrix of dimension N×N, where N is the total number of feature nodes in the undirected weighted graph; for node pairs with direct edge connections, filling the corresponding matrix elements with geodesic distances; for node pairs without direct edge connections, searching for their shortest path in the undirected weighted graph using a shortest path search algorithm, and filling the corresponding matrix elements with the total length value of the shortest path; and determining the real-time geodesic matrix using all matrix elements. Isomorphic matching and node alignment operations are performed on the real-time geodesic matrix and the pre-stored standard geodesic matrix to determine the inventory results of human specimens.
2. The intelligent inventory method for medical specimens according to claim 1, characterized in that, The enhancement of a single-channel image is determined in the following way: The green channel data is extracted from the specimen image to obtain the initial single-channel image. The initial single-channel image is divided into multiple non-overlapping image sub-blocks. The cumulative distribution function is independently determined within each image sub-block. The cumulative distribution function is used for grayscale mapping, and the contrast amplification value is limited during the grayscale mapping process. The bilinear interpolation algorithm is used to smooth and fuse the boundary regions of different image sub-blocks after processing to determine the intermediate image; A top-hat transform operation is performed on the intermediate image to strip away the background illumination component and obtain an enhanced single-channel image.
3. The intelligent inventory method for medical specimens according to claim 1, characterized in that, The topological skeleton image is determined in the following way: The optimal global threshold for enhancing a single-channel image is determined using the maximum inter-class variance method. The enhanced single-channel image is then binarized using the optimal global threshold to determine the initial binary image. Morphological closing operations are then performed on the initial binary image to perform a dilation-erosion operation to obtain a specimen binary mask. An initial skeleton image is determined by performing pixel culling on a binary mask of the specimen using a parallel thinning algorithm based on iterative stripping. Branch pruning operations are performed on the initial skeleton image to determine the topological skeleton image.
4. The intelligent inventory method for medical specimens according to claim 3, characterized in that, Branch pruning is performed on the initial skeleton image to determine the topological skeleton image, including: Traverse the endpoint pixels in the initial skeleton image, determine the number of skeleton pixels between the endpoint pixel and the nearest branch point pixel, and determine the physical path length of the corresponding branch based on the actual pixel size; The branch pruning threshold is determined by using the preset feature length of the human specimen. If the physical path length of the branch is less than the branch pruning threshold, the branch is removed from the initial skeleton image to obtain the topological skeleton image.
5. The intelligent inventory method for medical specimens according to claim 1, characterized in that, The topological skeleton image is determined in the following way: Convex defect detection is performed on the specimen contour in the specimen image to determine the defect depth value. If the defect depth value is greater than the preset depth threshold, it is determined that there is regional overlap or adhesion in the specimen. The two closest deep concave point pixels on the specimen outline are identified, and the two deep concave point pixels are used as the endpoints of the cutting line for virtual segmentation, decomposing the target connected region into multiple independent sub-regions. Different independent sub-regions are refined separately to determine the topological skeleton image.
6. The intelligent inventory method for medical specimens according to claim 1, characterized in that, An undirected weighted graph is constructed in the following way: Define the endpoint nodes and branch point nodes as the set of feature nodes; Starting from the initial feature node in the feature node set, perform an iterative search operation along the path pixels in the topological skeleton image; If the search reaches the endpoint feature node in the feature node set, establish the edge connection relationship between the starting feature node and the endpoint feature node; An undirected weighted graph is determined using a set of feature nodes and edge connections.
7. The intelligent inventory method for medical specimens according to claim 1, characterized in that, The results of the inventory of human specimens were determined in the following ways: Using the node connectivity degree as an index, isomorphic matching and node alignment operations are performed on the real-time geodesic matrix and the standard geodesic matrix to determine the length difference rate of the corresponding path edges. If the length difference rate exceeds the preset tolerance threshold, or if the node alignment result indicates that the target node lacks an anatomical location, the inventory result of the human specimen is determined to be abnormal.
8. A medical specimen intelligent inventory system, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement the intelligent inventory method for medical specimens according to any one of claims 1-7.