Pig muscle fiber geometric phenotype and spatial distribution characteristic quantification method

Through image processing and mathematical analysis methods, the geometric phenotype and spatial distribution characteristics of pig muscle fibers are measured and quantified, and the problem of lack of effective measurement methods in the existing technology is solved, and multi-angle measurement and analysis of muscle fiber characteristics is realized.

CN119672093APending Publication Date: 2025-03-21SICHUAN AGRI UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411443370.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-03-21

Smart Images

  • Figure CN119672093A_ABST
    Figure CN119672093A_ABST
Patent Text Reader

Abstract

The invention discloses a pig muscle fiber geometric phenotype and spatial distribution characteristic quantification method, and relates to the technical field of cell image information extraction, and the technical key points are that the method comprises the steps: measuring the shape index of muscle fibers through contour data; measuring an overall distribution mode of muscle fibers through contour and type data; measuring the difference between the muscle fiber distribution modes of the two skeletal muscle dyeing images through the contour data and the type data; and analyzing spatial distribution characteristics according to the muscle fiber phenotypic data and the spatial position. The problem that in the prior art, a measurement scheme for the geometric phenotype and phenotype space distribution characteristics of the muscle fibers is lacked is solved, and automatic, systematic and integrated efficient calculation is achieved. The method is expected to provide a rich phenotypic measurement basis for analyzing skeletal muscle phenotypic differences of different pig breeds and different parts, phenotypic association of meat quality and muscle fibers, and a spatial regulation mechanism of cell gene expression in pig muscle tissues.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of cell image information extraction, and in particular to a method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers. Background Art

[0002] Meat quality is a comprehensive physical and chemical property of muscle tissue, which is determined by the physical and chemical properties of various types of cells in the tissue. The physical and chemical properties at the single-cell level cannot be measured on a large scale. Therefore, meat quality is usually analyzed by measuring the proportion of different cell types and related size properties (such as area) based on the assumption that the physical and chemical properties of cells of the same type are relatively consistent. However, previous studies have shown that in mouse muscle tissue, in addition to the proportion of muscle fiber types, the distribution pattern of muscle fiber types is also significantly associated with muscle traits. On the other hand, the gene expression of cells of the same type is not fixed, but changes over time and has spatial heterogeneity. This spatial heterogeneity of gene expression is expected to affect the physical and chemical properties of muscle fibers by spatial position, and then the meat quality will be affected by the distribution pattern of muscle fibers. Our previous experimental results also showed that the type ratio of pig muscle fibers only affects the transcription level of protein-coding genes in skeletal muscle with a correlation coefficient of 0.343, and the regulatory mechanism related to shape characteristics and distribution patterns remains to be explored. However, there is currently a lack of measurement methods for muscle fiber shape characteristics and distribution pattern characteristics, especially the latter.

[0003] Reports on the relationship between muscle fiber type composition and fresh meat quality are mixed, that is, there are completely different correlations. For example, the correlation between the proportion of type I fibers and the proportion of type IIB fibers and fresh meat shear force is completely opposite in different studies. This may be because some meat quality indicators may not only be related to the type ratio of muscle fibers, but also be affected by other muscle fiber characteristics, such as distribution pattern, and these factors are still lacking indicators to fully measure.

[0004] Most of the existing studies on the apparent properties of muscle fibers did not include the coordinates of the muscle fiber section contour in the analysis, and the contour information was plane-decomposed, so the shape properties of the muscle fibers were not fully quantified. It should also be pointed out that none of the above studies involved porcine muscle fibers, and the relationship between the geometric properties of muscle fibers and their local relative positions remains to be analyzed. Summary of the invention

[0005] The purpose of the present invention is to solve the above problems and provide a method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers.

[0006] In order to achieve the above object, the technical solution of the present invention is as follows:

[0007] The present invention provides a method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers, comprising the following steps: Step S1, image acquisition: generating a cross-sectional image of muscle fibers of muscle tissue by sampling, staining and microscopic photography;

[0008] Step S2, muscle fiber contour and category annotation: use mathematical morphology method, deep learning method or manual annotation method to annotate the contour of each muscle fiber in the image, and classify it into major categories or subcategories;

[0009] Step S3, geometric center calculation: calculating the coordinates of the geometric center of each muscle fiber according to its contour data;

[0010] Step S4, distance matrix construction: calculating the pixel distance between muscle fibers according to the contour data of each muscle fiber and storing it in a distance matrix;

[0011] Step S5, constructing an angle matrix: calculating the relative directions between muscle fibers according to the contour data of each muscle fiber, and storing them in an angle matrix;

[0012] Step S6, muscle fiber geometric index and staining degree measurement: calculate multiple indexes based on the contour data of each muscle fiber to measure its geometric shape and staining degree;

[0013] Step S7, global distribution pattern measurement: measure the global distribution pattern of the muscle fiber according to the geometric center coordinates and shape indexes.

[0014] The present invention is further configured as follows: in the step S1: a method of sampling muscle tissue and performing immunofluorescence or enzyme staining and microscopic photography to generate an immunofluorescence or enzyme staining image of the cross-section of muscle fibers of the muscle tissue, requiring that the outline clarity of the muscle fibers in the image is recognizable to the naked eye, and the pixel information is sufficient to classify the muscle fibers into categories by the naked eye.

[0015] The present invention is further configured as follows: the specific sub-steps of step S2 are:

[0016] Step S21, labeling the outline and category of each muscle fiber using a mathematical morphology method, a deep learning method or a manual labeling method;

[0017] Step S22: The outlines of muscle fibers of the same type are labeled with the same color, while those of different types are labeled with different colors, and a corresponding relationship between the labeled colors and types is provided;

[0018] Step S23: Obtain the contour coordinate set and category attributes of each muscle fiber by using the method of color pixel classification and closed contour recognition.

[0019] The present invention is further configured as follows: in step S3, assuming the jth muscle fiber, for each muscle fiber contour coordinate set, Ω j={(x1,y1),…,(x n ,y n )}, calculate the geometric center

[0020] The present invention is further configured as follows: the specific sub-steps of step S6 are:

[0021] Step S61: Calculate the area of ​​each muscle fiber, where the area A of the i-th muscle fiber is i The calculation formula is: the number of pixels enclosed in a closed contour, including the contour itself, based on Green's formula or the sum of interior points and boundary points counted line by line;

[0022] Step S62: Calculate the equivalent diameter of each muscle fiber, where the equivalent diameter of the i-th muscle fiber is Eqd i The calculation formula is:

[0023] Step S63: Calculate the longest diameter of each muscle fiber, the longest diameter of the i-th muscle fiber Maxd i The calculation formula is:

[0024] Step S64: Calculate the circularity of each muscle fiber by first using the Welzl or Ritter algorithm based on the contour set Ω of the i-th muscle fiber. i Calculate the center coordinates and radius r of its minimum circumscribed circle i , the algorithm complexity is O(n), where n is the number of points in the region, and then the circularity CP of the i-th muscle fiber i The calculation formula is: CP i =A i / πr i 2 ;

[0025] Step S65, calculate the firmness of each muscle fiber, first calculate the contour set Convex of the minimum convex hull of the i-th muscle fiber by using the Graham scanning algorithm i , where the formula for calculating the firmness of the i-th muscle fiber is: area / minimum convex hull area, that is, A i / AC i , A.C. i is the convex hull area;

[0026] Step S66: Calculate the rectangularity of each muscle fiber by first using the Welzl iterative algorithm based on convex hull generation according to the contour set Ω of the i-th muscle fiber. i Calculate the four vertices of its minimum enclosing rectangle, arranged clockwise (x1 (i) ,y1 (i) ),(x2 (i),y2 (i) ),(x3 (i) ,y3 (i) ),(x4 (i) ,y4 (i) ), where the rectangularity calculation formula of the i-th muscle fiber is:

[0027] Step S67: Calculate the long-short axis ratio LS of each muscle fiber i , where the calculation formula for the length-short axis ratio of the i-th muscle fiber is: (if the value is greater than 1) or (if the value is greater than 1), where w i and h i are respectively the width and height of the minimum circumscribed rectangle calculated in step S66.

[0028] The present invention is further configured as follows: the basic steps of the Graham scanning algorithm are as follows:

[0029] Step A1, find the lowest point: first find the point with the smallest y value among all points, this point is called the reference point p0;

[0030] Step A2, sorting: Then sort the remaining points according to the cosine of the angle between the line connecting them and the reference point and the x-axis; this sorting is to ensure that we process the points in a counterclockwise direction;

[0031] Step A3, constructing the convex hull: Use a stack to maintain the current convex hull boundary. Starting from the reference point, consider the sorted points in turn. If the vector formed by the current point and the top point of the stack rotates counterclockwise, push the point into the stack; if the vector formed by the current point and the top point of the stack rotates clockwise, pop the top point of the stack until the top point of the stack rotates counterclockwise with the current point; repeat this process until all points have been considered;

[0032] Step A4, processing collinear points: If there are multiple collinear points in the algorithm, the Graham scan algorithm will decide which points should be included in the convex hull by comparing slopes or using other geometric characteristics.

[0033] The present invention is further configured as follows: the core idea of ​​the Welzl's iterative algorithm is to use an iterative method to approximate the optimal solution, and the specific steps are as follows:

[0034] Step B1, initialization: When the algorithm starts, a point in the point set is selected as the starting point;

[0035] Step B2, find the optimal rectangle: for each point in the current point set, calculate a rectangle that contains the point and all previous points; this rectangle is determined by finding the vertices of the convex hull of the point set, and the area of ​​the rectangle formed by these vertices and the current point is the smallest;

[0036] Step B3, iteration: repeat step 2, each time selecting a new point as the current point, until all points have been considered;

[0037] Step B4, calculate the rotated rectangle: Once the optimal rectangle is found, the algorithm calculates a rotated rectangle whose four vertices are the vertices of the convex hull of the original point set, and the center of the rectangle coincides with the centroid of the point set;

[0038] Step B5, return result: Finally, the algorithm returns a RotatedRect object, which contains the center point of the rotated rectangle, width w i , height h i and the rotation angle θ i .

[0039] The present invention is further configured to calculate the dyeing depth index GD i , including the following steps:

[0040] Step C1, use the cvtColor function in opencv to convert the stained image into a grayscale image: gray = cv2.cvtColor (img_result, cv2.COLOR_BGR2GRAY);

[0041] Step C2: Draw the mask map of any i-th cell

[0042] (1) Generate a binary image of the same size as the original image: mask = np.zeros(gray.shape, np.uint8);

[0043] (2) Draw the target cells on the binary image: cv2.drawContours(mask,[contour],0,255,-1);

[0044] Step C3, extract the average gray value of the target cells as a color depth indicator: mean_gray = cv2.mean(gray, mask = mask).

[0045] The present invention is further configured as follows: the specific sub-steps of step S7 are:

[0046] Step S71, global statistics of the individual characteristic index of the muscle fiber: mean, variance, quantile;

[0047] Step S72, statistics of the muscle fiber individual characteristic index on each muscle fiber category: mean, variance, quantile;

[0048] Step S73, calculating the global compactness index of the same type of muscle fibers of each type, and calculating the kth type of muscle fibers;

[0049] Step S74, calculating the distance matrix between the geometric center points of each type of muscle fiber and the distance entropy value;

[0050] Step S75, calculating the angle matrix between the geometric center points of each type of muscle fiber and the entropy value;

[0051] Step S76, calculating the classification fitting parameter vector of the geometric center point distribution in each type of muscle fiber;

[0052] Step S77, calculating the nearest index vector of the geometric center point in each type of muscle fiber;

[0053] Step S78, calculating the distribution fitting function of the geometric center point of each type of muscle fiber based on the Gaussian radial basis, where the distribution fitting function of the k-th type of muscle fiber is expressed as

[0054] Step S79: Spatial autocorrelation analysis, calculation of global Moran index I (k) ;

[0055] Step S710, spatial Durbin function analysis of the spatial correlation of muscle fiber attributes, and obtaining the indicators ρ, β and δ: y = ρWy + βX + δWX + ε, where y is the dependent variable: taken as a certain attribute value of the muscle fiber; X is a matrix containing the muscle fiber attribute values, taken as the staining depth GD i With area A i ; W is the spatial weight matrix, whose value is the inverse of the distance, taken as 1. / CD; ρ is the spatial autocorrelation coefficient, which measures the spatial spillover effect of the dependent variable itself; β is the coefficient vector of the direct impact of the independent variable on the dependent variable; δ is the coefficient vector that measures the indirect impact of the independent variable on the dependent variable through the neighboring area; ε is the error term, which is usually assumed to be an independent and identically distributed random variable; analyze the values ​​of ρ and δ to understand the strength of the spatial spillover effect and the spatial indirect effect.

[0056] The present invention is further configured as follows: wherein the global compactness index of the k-th type of muscle fiber is calculated as follows:

[0057] Step D1, calculate the total area of ​​the k-th muscle fiber: where ψ k is the ID set of the k-th muscle fiber;

[0058] Step D2, merging the contours of each muscle fiber;

[0059] Step D3: Calculate the minimum convex hull and area SC of all muscle fibers using the Graham scanning algorithm (k) ;

[0060] Step D4: The formula for firmness is

[0061] When compact (k) = 1, indicating that the object set completely fills its minimum circumscribed convex hull and the shape is very compact; (k) The closer the value is to 1, the more compact the objects are; the smaller the value is, the more sparse the objects are, or the irregular shapes lead to low space utilization.

[0062] The present invention is further configured as follows: the specific steps of calculating the distance matrix between the geometric center points of each type of muscle fiber and the distance entropy value are:

[0063] Step E1: Calculate the center distance and the shortest distance between any two muscle fibers in the image, where the center distance between the i-th muscle fiber and the j-th muscle fiber is expressed as cd ij express:

[0064]

[0065] The shortest distance is md ij express:

[0066]

[0067] Where Ω i and Ω j Respectively represent the contour coordinates of the i-th muscle fiber and the j-th muscle fiber, and store them as the distance matrix CD = {cd ij} and MD = {md ij};

[0068] Step E2: Calculate the distance matrix CD between the same types of muscle fibers (k) =CD(id (k) ,id (k) ), distance matrix MD (k) =MD(id (k) ,id (k) ), where id (k) is the ID list of the k-th cell;

[0069] Step E3: Calculate CD (k) Entropy of the distance matrix:

[0070] (1) Extracting the frequency of segmented values: Traversing the symmetric matrix CD (k)For all elements of , divide the distribution interval of its values ​​into 20 equal segments, and record the number of elements contained in each numerical interval segment; since the matrix is ​​symmetrical, it is only necessary to traverse the upper triangle or the lower triangle part to avoid repeated counting, and it is necessary to skip the part with a diagonal distance of 0;

[0071] (2) Calculate the probability distribution: For the interval v i , calculate the frequency of the element appearing in this interval Where n is the total number of muscle fibers, N i For falling on v i The number of elements in ;

[0072] (3) Calculate the entropy value: The larger the entropy value, the more chaotic the distribution of muscle fibers, and the smaller the entropy value, the more regular the distribution.

[0073] The present invention is further configured as follows: the specific steps of calculating the angle matrix between the geometric center points of each type of muscle fiber and the entropy value are:

[0074] Step F1: Calculate the center line vector of any two muscle fibers in the image The absolute value of the cosine angle with the horizontal vector [1,0]:

[0075]

[0076] Store this value in the matrix ABS cos ={cos∠(i,j)}, which is called the direction matrix;

[0077] Step F2, calculate the direction matrix between the same types of muscle fibers:

[0078] ABS cos (k) =ABS cos (id (k) ,id (k) );

[0079] Step F3: Calculate the symmetric direction matrix ABS cos (k) The entropy value Entropy The larger it is, the more disorderly the distribution of muscle fibers is, and the smaller it is, the more regular the distribution is.

[0080] The present invention is further configured as follows: the specific steps of calculating the classification fitting parameter vectors a and D of the geometric center point distribution in each type of muscle fiber are as follows:

[0081] Step G1, in the enzyme staining image, each muscle fiber is represented by its central site, and a scattered binary image is formed for any k-th type of muscle fiber;

[0082] Step G2, perform fractal fitting on each binary image: calculate the number of scattered points in a small window N(ε) with a size of ε centered on each muscle fiber, calculate the average number of correlations of each window N(ε), keep increasing the window size and repeat the above steps; thus, a series of points can be obtained, which can be represented on a Cartesian graph, where the X-axis represents the size of the window ε=2j+1, j is the iteration step, and the Y-axis represents the average number of points in each window;

[0083] Step G3, fit this empirical curve to the theoretical curve that conforms to the fractal law, that is, the power function that relates the number of correlations: Parameter a (k) Called the "preforming coefficient", the parameter a (k) It is a comprehensive indicator of the local deviation estimate in the fractal law. When it reaches 4 or is less than 0.1, the fractal mode is uncertain; the fractal behavior may change at different scales, and the changes usually occur within a fairly small ε value, that is, within a small distance, usually corresponding to the same type of fiber clusters, the "fractal dimension" D (k) It can be estimated using the double logarithmic representation of the power function, and nonlinear regression is used to estimate the parameters of the best fitting curve; when D (k) =2, the distribution pattern of muscle fibers is uniform; D (k) = 0 corresponds to an image consisting of a single point; when D (k) When it is between 1 and 2, the elements are distributed in clusters in space, and the "fractal dimension" D (k) It can be thought of as a measure of the ability to fill the space it occupies.

[0084] The present invention is further configured as follows: the specific steps of calculating the nearest index vector NNI of the geometric center point of each type of muscle fiber are as follows:

[0085] Step H1, in the enzyme staining image, each muscle fiber is represented by its central site, and a scattered binary image is formed for any k-th type of muscle fiber;

[0086] Step H2, then calculate the nearest neighbor index of the binary image and store it as NNI (k) : in Represents the Euclidean distance between each scattered point and its nearest similar muscle fiber center point, by taking the calculated distance matrix CD (k) The smallest non-zero element in the i-th row is obtained by (k) is the total number of scattered points, d(ran (k) ) is the average value of the nearest distance of each point under the assumption of random distribution, which is generally taken as Where A is the total area of ​​the image. The smaller the NNI value, the more concentrated the distribution is. The larger the NNI value, the more uniform the distribution is. The closer the value is to 1, the more random the distribution is. Check the reliability of the calculation: Calculate z (k) <-1.645 indicates the aggregation mode, 1.645≤z (k) ≤-1.645 indicates random mode, z (k) >1.645 indicates uniform mode.

[0087] The present invention is further configured as follows: the specific steps of calculating the distribution fitting function of the geometric center point in each type of muscle fiber based on the Gaussian radial basis are as follows:

[0088] Step I1, gridding the centroid scatter plot of the enzyme staining image to form a scatter binary image for any k-th type of muscle fiber; then counting the number of muscle fibers and calculating the geometric center for each (any i-th row and j-th column) grid;

[0089] Step I2: Calculate the covariance matrix V of each (arbitrary i-th row and j-th column) grid sample ij (k) :

[0090]

[0091] Where S ij (k) is a point set, |S ij (k) | is the number of points, z r is the coordinate of the rth point;

[0092] Step I3: Establish the Gaussian kernel function of each grid:

[0093]

[0094] The overall distribution function is obtained by summing the number of grid points as weights:

[0095]

[0096] For a grid containing only one point, the covariance matrix is ​​constructed based on the maximum distance to the boundary and the unit matrix, and the singular covariance matrix is ​​reconstructed by approximate contract diagonalization; at the same time, the image can be rotated 90 degrees, 180 degrees, and 270 degrees, forming a total of 4 distribution functions

[0097] Step I4: Type I and II muscle fibers in each stained image can correspond to four distribution functions. The inner product is defined to calculate the Euclidean distance and angle between them to measure the difference between the distribution patterns, and the minimum difference between the four distribution functions is taken; for multiple types of muscle fibers, the average value of the difference in the distribution of each type of muscle fibers between the two images is used to represent the comprehensive difference.

[0098] The present invention is further configured to: perform spatial autocorrelation analysis and calculate the global Moran index I (k) The specific steps are as follows:

[0099] Step J1, define the matrix W = 1. / CD, which represents the spatial weight matrix, which is taken as the inverse of the distance between the muscle fiber centers, where CD is the distance matrix of all muscle fibers;

[0100] Step J2: Calculate the global Moran index formula as follows:

[0101]

[0102] (k) represents the value of the kth attribute of the muscle fiber, which can be the category attribute (1, 2, ...) represents the category code, which can be the muscle fiber size or shape attribute calculated previously, represents the kth attribute value of the i-th muscle fiber, Represents the global mean of the kth attribute value; based on the PySAL library in Python, the Moran function in the esda module can be used to calculate the global Moran index I of spatial autocorrelation (k) ; I>0 means that the attribute values ​​have positive correlation in space, that is, similar attribute values ​​are easy to cluster together; I=0 means random distribution and no spatial correlation; I<0 means that the attribute values ​​have negative correlation in space, that is, similar attribute values ​​are not easy to cluster together.

[0103] Compared with the prior art, this solution has the following beneficial effects:

[0104] The present invention provides a measurement strategy for the geometric phenotype of muscle fibers and the spatial distribution characteristics of phenotypes in pig skeletal muscle staining images. Based on mathematical knowledge such as spatial statistical analysis, topology, and graph theory, a series of indicators and their calculation methods that can reflect the geometric trait characteristics, type spatial distribution characteristics, and phenotypic spatial distribution characteristics are constructed.

[0105] Existing meat quality research has insufficiently measured the geometric phenotypic characteristics and spatial distribution characteristics of muscle fibers. This patent provides a method system for this purpose. By constructing a series of indicators, these characteristics are measured from multiple angles, significantly expanding the phenotypic indicator system of muscle fibers.

[0106] The establishment of these methodological systems provides phenotypic data and analytical methods to support subsequent research on the mechanism of meat quality formation, muscle fiber phenotype and spatial regulation mechanism of gene expression. BRIEF DESCRIPTION OF THE DRAWINGS

[0107] Figure 1 is a flowchart and method framework diagram of measuring phenotypic characteristics of each level of muscle fibers in an embodiment of the present invention;

[0108] Figure 2 1 is a flowchart and method framework diagram of measuring the independent phenotypic characteristics of each muscle fiber in an embodiment of the present invention, wherein (a) is a diagram of some independent phenotypic indicators of muscle fibers, and (b) is a measurement flowchart;

[0109] Figure 3 It is a flowchart and method framework diagram of a global index for measuring muscle fiber distribution and a function for constructing a fitting distribution pattern in an embodiment of the present invention;

[0110] Figure 4 is a schematic diagram of gridding a stained image and calculating the geometric center of muscle fibers in the grid in an embodiment of the present invention;

[0111] Figure 5 This is an example of the present invention, showing the differences in muscle fiber distribution patterns within and between different skeletal muscle parts of the Rongchang pig type I muscle fiber staining image, wherein (a) measures the similarity by subtracting the angle from 90 degrees, and plots a heat map of the similarity of distribution patterns in different parts, (b) shows the difference in distribution patterns between the psoas major and the longissimus dorsi. In the figure, the skeletal muscle part is represented by common abbreviations, and the technical repetitions are represented by numbers. DETAILED DESCRIPTION

[0112] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solution of the present invention will be further described in detail below in conjunction with the embodiments of the present invention and the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0113] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present invention can be combined with each other. The present invention will be described in detail below in conjunction with the embodiments.

[0114] Example:

[0115] For pig skeletal muscle staining image recognition and muscle fiber segmentation, the requirements for the staining image are that the staining depth corresponds to type I and II muscle fibers respectively, and the muscle fiber type and contour position can be basically judged by the naked eye. Therefore, although the model training and testing in this article are based on SDH enzyme-stained pig skeletal muscle images, it is also applicable to images under other staining schemes that meet the above requirements. Therefore, the sampling and staining steps can be replaced.

[0116] [1] collecting muscle fiber tissue that meets the requirements of morphological integrity, cutting the muscle fiber tissue once according to a set standard, and freezing the cut muscle fiber tissue;

[0117] [2] The image requires that the muscle fiber contours be clear enough to be discernible to the naked eye, and that the pixel information be sufficient to classify the muscle fibers.

[0118] [3] The steps of muscle fiber contour and category labeling include the following operations:

[0119] Step 1: Use mathematical morphology methods, deep learning methods or manual labeling methods to label the contour and category of each muscle fiber;

[0120] Step 2: The outline marking colors of muscle fibers of the same category should be consistent, and those of different categories should be inconsistent, and the corresponding relationship between the marking colors and categories should be provided;

[0121] Step 3: Obtain the contour coordinate set and category attributes of each muscle fiber through methods such as color pixel separation and closed contour recognition.

[0122] [4] The steps for calculating the geometric center of muscle fibers include the following operations:

[0123] Step 1: For each muscle fiber (assuming the jth fiber), the contour coordinate set Ω j ={(x1,y1),…,(x n ,y n )}, calculate the geometric center

[0124]

[0125] [5] The steps for measuring muscle fiber geometric indexes and staining degree include the following operations:

[0126] Step 1: Calculate the area of ​​each muscle fiber, where the area of ​​the i-th muscle fiber is A i The calculation formula is: the number of pixels enclosed in a closed contour (including the contour itself), based on Green's formula or the sum of the interior points and boundary points counted line by line.

[0127] Step 2: Calculate the equivalent diameter of each muscle fiber, where the equivalent diameter of the i-th muscle fiber is Eqdi The calculation formula is:

[0128]

[0129] Step 3: Calculate the longest diameter of each muscle fiber. The longest diameter of the i-th muscle fiber Maxd i The calculation formula is:

[0130]

[0131] Step 4: Calculate the circularity of each muscle fiber. First, use the Welzl or Ritter algorithm to calculate the circularity of each muscle fiber according to the contour set Ω i Calculate the center coordinates and radius r of its minimum circumscribed circle i (The algorithm complexity is O(n), where n is the number of points in the region), then the circularity CP of the i-th muscle fiber is i The calculation formula is: CP i =A i / πr i 2 .

[0132] Step 5: Calculate the firmness of each muscle fiber. First, use the Graham scanning algorithm to calculate the contour set of the minimum convex hull of the ith muscle fiber. The formula for calculating the firmness of the ith muscle fiber is: area / minimum convex hull area, that is, A i / AC i , A.C. i is the convex hull area.

[0133] The basic steps of the Graham scanning algorithm are as follows:

[0134] Find the lowest point: First find the point with the smallest ordinate (y value) among all points. This point is called the reference point (p0).

[0135] Sorting: Then sort the remaining points by the cosine of the angle between the line connecting them and the base point and the x-axis. This sorting is to ensure that we process the points in a counterclockwise direction.

[0136] Constructing the convex hull: Next, use a stack to maintain the current convex hull boundary. Starting from the base point, consider the sorted points one by one. If the vector formed by the current point and the top point of the stack is a counterclockwise rotation (left turn), push the point into the stack. If the vector formed by the current point and the top point of the stack is a clockwise rotation (right turn), pop the top point of the stack until the top point of the stack forms a counterclockwise rotation with the current point. This process is repeated until all points have been considered.

[0137] Handling collinear points: If there are multiple collinear points in the algorithm, the Graham scan algorithm will decide which points should be included in the convex hull by comparing slopes or using other geometric features.

[0138] Step 6: Calculate the rectangularity of each muscle fiber by first using the Welzl iterative algorithm based on convex hull generation according to the contour set Ω of the first muscle fiber. i Calculate the four vertices of its minimum enclosing rectangle (arranged clockwise) (x1 (i) ,y1 (i) ),(x2 (i) ,y2 (i) ),(x3 (i) ,y3 (i) ),(x4 (i) ,y4 (i) ), where the rectangularity calculation formula of the i-th muscle fiber is:

[0139]

[0140] The core idea of ​​Welzl's algorithm is to use an iterative method to approximate the optimal solution. The specific steps are as follows:

[0141] Initialization: When the algorithm starts, select a point in the point set as the starting point.

[0142] Find the optimal rectangle: For each point in the current point set, calculate a rectangle that contains this point and all previous points. This rectangle is determined by finding the vertices of the convex hull of the point set, which form the smallest rectangle with the current point.

[0143] Iteration: Repeat step 2, each time choosing a new point as the current point, until all points have been considered.

[0144] Calculate the rotated rectangle: Once the optimal rectangle is found, the algorithm calculates a rotated rectangle whose four vertices are the vertices of the convex hull of the original point set and the center of the rectangle coincides with the centroid of the point set.

[0145] Return result: Finally, the algorithm returns a RotatedRect object, which contains the center point of the rotated rectangle, width w i , height h i and the rotation angle θ i .

[0146] Step 7: Calculate the long-short axis ratio LS of each muscle fiber i , where the calculation formula for the length-short axis ratio of the i-th muscle fiber is:

[0147] (if the value is greater than 1) or (If the value is greater than 1)

[0148] [6] Calculate the staining depth index GD i , including the following steps:

[0149] Step 1. Use the cvtColor function in opencv to convert the stained image into a grayscale image: gray = cv2.cvtColor(img_result, cv2.COLOR_BGR2GRAY);

[0150] Step 2: Draw the mask map of any i-th cell

[0151] (1) Generate a binary image of the same size as the original image: mask = np.zeros(gray.shape, np.uint8);

[0152] (2) Draw the target cells on the binary image: cv2.drawContours(mask,[contour],0,255,-1);

[0153] Step 3: Extract the average gray value of the target cells as the color depth indicator GD i :mean_gray=cv2.mean(gray,mask=mask)

[0154] [8] The global distribution pattern measurement step includes the following operations:

[0155] Step 1: Global statistics of the above muscle fiber individual characteristic indicators: mean, variance, and quantile.

[0156] Step 2: Statistics of the above muscle fiber individual characteristic indicators in each muscle fiber category: mean, variance, and quantile.

[0157] Step 3: Calculate the global compactness index of each type of muscle fiber of the same type, where the calculation for the type 1 muscle fiber is as follows:

[0158] (1) Calculate the total area of ​​the muscle fibers: where ψ k is the ID set of the k-th type of muscle fiber.

[0159] (2) Merge the contours of each muscle fiber.

[0160] (3) Use the above Graham scanning algorithm to calculate the minimum convex hull Convex and its area SC of all muscle fibers (k) .

[0161] (4) The formula for firmness is:

[0162] When compact (k) =1, indicating that the object set completely fills its minimum circumscribed convex hull and has a very compact shape.

[0163] compact (k) The closer the value is to 1, the more compact the objects are; the smaller the value is, the more sparse the objects are, or the irregular shapes lead to low space utilization.

[0164] Step 4: Calculate the distance matrix between the geometric center points of each type of muscle fiber, as well as the distance entropy value:

[0165] (1) Calculate the center distance and the shortest distance between any two muscle fibers in the image, where the center distance between the i-th muscle fiber and the j-th muscle fiber is cd ij express:

[0166]

[0167] The shortest distance is md ij express:

[0168]

[0169] Where Ω i and Ω j Respectively represent the contour coordinates of the i-th muscle fiber and the j-th muscle fiber, and store them as the distance matrix CD = {cd ij} and MD = {md ij}.

[0170] (2) Calculate the distance matrix CD between different types of muscle fibers (k) =CD(id (k) ,id (k) ), distance matrix MD (k) =MD(id (k) ,id (k) ), where id (k) is the ID list of the k-th cell.

[0171] (3) Calculate CD (k) Entropy of the distance matrix:

[0172] 1. Extract the frequency of segmented values: traverse the symmetric matrix CD (k) Divide the distribution interval of all elements of into 20 equal segments, and record the number of elements contained in each numerical interval segment. Since the matrix is ​​symmetrical, it is only necessary to traverse the upper triangle (or lower triangle) to avoid repeated counting, and it is necessary to skip the diagonal (distance 0) part.

[0173] 2. Calculate the probability distribution: For the interval segment v i, calculate the frequency of the element appearing in this interval Where n is the total number of muscle fibers, N i For falling on v i The number of elements in .

[0174] 3. Calculate entropy:

[0175] The larger the entropy value, the more chaotic the distribution of muscle fibers, and the smaller the entropy value, the more regular the distribution.

[0176] Step 5: Calculate the angle (direction) matrix between the geometric center points of each type of muscle fiber, as well as the entropy value:

[0177] (1) Calculate the center line vector of any two muscle fibers in the image The absolute value of the cosine angle with the horizontal vector [1,0]:

[0178]

[0179] Store this value in the matrix ABS cos ={|cos∠(i,j)|} is called the direction matrix.

[0180] (2) Calculate the direction matrix ABS between different types of muscle fibers cos (k) =ABS cos (id (k) ,id (k) ).

[0181] (3) Calculate the symmetric direction matrix ABS cos (k) The entropy value According to the above method.

[0182] The larger the entropy value, the more chaotic the distribution of muscle fibers, and the smaller the entropy value, the more regular the distribution.

[0183] Step 6: Calculate the classification fitting parameter vectors a and D of the geometric center point distribution in each type of muscle fiber. The process is as follows:

[0184] (1) In the enzyme staining image, each muscle fiber is represented by its central site, and a scattered binary image is formed for any k-th type of muscle fiber;

[0185] (2) Perform fractal fitting on each binary image: Calculate the number of scattered points in a small window N(ε) with a size of ε centered on each muscle fiber, calculate the average number of correlations for each window N(ε), and keep increasing the window size and repeating the above steps. This will yield a series of points that can be represented on a Cartesian graph, where the X-axis represents the size of the window ε = 2j + 1 (j is the iteration step), and the Y-axis represents the average number of points in each window.

[0186] (3) Fit this empirical curve to a theoretical curve that conforms to the fractal law, that is, a power function that relates the number of correlations:

[0187] N=a (k) ε D(k) +c

[0188] (4) Parameter a (k) Called the "preforming coefficient", it is a comprehensive measure of the local deviation from the fractal law. Experience has shown that when it reaches 4 or is less than 0.1, the fractal pattern is not certain. In real-world patterns, fractal behavior may change at different scales. The changes usually occur within fairly small values ​​of ε, that is, within small distances, usually corresponding to clusters of fibers of the same type. The "fractal dimension" D (k) It can be estimated using the double logarithmic representation of the power function, and nonlinear regression is used to estimate the parameters of the best fit curve. (k) =2, the distribution pattern of muscle fibers is uniform; D (k) = 0 corresponds to an image consisting of a single point (e.g., one or a few muscle fibers); when D (k) When it is between 1 and 2, the elements are distributed in clusters in space. (k) It can be thought of as a measure of the ability to fill the space it occupies.

[0189] Step 7: Calculate the nearest index vector NNI of the geometric center point in each type of muscle fiber. The process is as follows:

[0190] (1) In the enzyme staining image, each muscle fiber is represented by its central site, and a scattered binary image is formed for any k-th type of muscle fiber;

[0191] (2) Then calculate the nearest neighbor index of the binary image and store it as NNI (k) :

[0192]

[0193] in Represents the Euclidean distance between each scattered point and its nearest similar muscle fiber center point (by taking the calculated distance matrix CD (k) The smallest non-zero element in the i-th row is obtained), N (k)is the total number of scattered points, d(ran (k) ) is the average value of the nearest distance of each point under the assumption of random distribution, which is generally taken as Where A is the total area of ​​the image. The smaller the NNI value, the more concentrated the distribution is, the larger the value, the more uniform the distribution is, and the closer the value is to 1, the more random the distribution is. Check the reliability of the calculation: Calculate z (k) <-1.645 indicates the aggregation mode, 1.645≤z (k) ≤-1.645 indicates random mode, z (k) >1.645 indicates uniform mode.

[0194] Step 8: Calculate the distribution fitting function of the geometric center point of each type of muscle fiber based on the Gaussian radial basis, where the distribution fitting function of the k-th type of muscle fiber is expressed as The process is as follows:

[0195] (1) The centroid scatter plot of the enzyme staining image is gridded to form a scatter binary image for any k-th type of muscle fiber; then, for each (any i-th row and j-th column) grid, the number of muscle fibers is counted and the geometric center is calculated:

[0196] (2) Calculate the covariance matrix V of each (arbitrary i-th row and j-th column) grid sample ij (k) :

[0197]

[0198] Where S ij (k) is the set of points, |S ij (k) | is the number of points, z r is the coordinate of the rth point.

[0199] (3) Establish the Gaussian kernel function of each grid:

[0200]

[0201] The overall distribution function is obtained by summing the number of grid points as weights:

[0202]

[0203] Note: For a grid containing only one point, the covariance matrix is ​​constructed based on the maximum distance to the boundary and the unit matrix, and the singular covariance matrix is ​​reconstructed by approximate contract diagonalization. At the same time, the image can be rotated 90 degrees, 180 degrees, and 270 degrees, forming a total of 4 distribution functions

[0204] (4) In each stained image, type I and II muscle fibers can correspond to four distribution functions, which can be proved that these distribution functions belong to the same Euclidean space. Furthermore, we can define the inner product to calculate the Euclidean distance and angle between them to measure the difference between the distribution patterns, and take the minimum difference between the four distribution functions. For multiple types of muscle fibers, the average value of the difference in the distribution of each type of muscle fiber between the two images is used to represent the comprehensive difference.

[0205] Step 9: Spatial autocorrelation analysis, calculation of global Moran index I (k) , the process is as follows:

[0206] (1) Define the matrix W = 1. / CD, which represents the spatial weight matrix and is taken as the inverse of the distance between the muscle fiber centers, where CD is the distance matrix of all muscle fibers.

[0207] (2) The formula for calculating the global Moran index is as follows:

[0208]

[0209] Here (k) represents the value of the kth attribute of the muscle fiber, which can be the category attribute (1,2,…) represents the category code, which can be the muscle fiber size or shape attribute calculated previously. represents the kth attribute value of the i-th muscle fiber, Represents the global mean of the kth attribute value. Based on the PySAL library in Python, the Moran function in the esda module can be used to calculate the global Moran index I of spatial autocorrelation (k) I>0 indicates that the attribute values ​​have positive correlation in space, that is, similar attribute values ​​tend to cluster together; I=0 indicates random distribution without spatial correlation; I<0 indicates that the attribute values ​​have negative correlation in space, that is, similar attribute values ​​do not tend to cluster together.

[0210] Step 10: Analyze the spatial correlation of muscle fiber properties through the spatial Durbin function and obtain the indicators ρ, β and δ:

[0211] y=ρWy+βX+δWX+ε

[0212] y is the dependent variable: it is taken as a certain attribute value of the muscle fiber, and in this patent it is taken as a category attribute.

[0213] X is a matrix containing muscle fiber attribute values ​​(x1, x2, x3, etc.), and the staining depth GD is taken i With area A i .

[0214] X is the spatial weight matrix, taken as 1. / CD above.

[0215] ρ is the spatial autocorrelation coefficient, which measures the spatial spillover effect of the dependent variable itself.

[0216] β is the coefficient vector of the direct effect of the independent variable on the dependent variable.

[0217] δ is the coefficient vector that measures the indirect effect of the independent variable on the dependent variable through the neighboring regions.

[0218] ε is the error term, which is usually assumed to be an independent and identically distributed random variable.

[0219] Analyze the values ​​of ρ and δ to understand the strength of spatial spillover effects and spatial indirect effects.

[0220] In this example, geometric and topological phenotypic features of type I muscle fibers were extracted from SDH enzyme staining images of skeletal muscles of more than 40 parts of Rongchang pigs. Examples of individual independent index values ​​of muscle fibers are shown in Table 1, examples of global distribution index values ​​of muscle fibers are shown in Table 2, and differences in distribution patterns of type I muscle fibers in different skeletal muscle parts are shown in Table 3. Figure 5 It can be seen that the method system provided by the present invention can effectively extract the multi-faceted phenotypic characteristics of muscle fibers in skeletal muscle and measure the phenotype of muscle fibers relatively comprehensively. It can be seen that the distribution pattern of type I muscle fibers in skeletal muscle varies more between sites than within sites (see Figure 5 ). These examples demonstrate the effectiveness of the method developed in this patent.

[0221] Table 1 Independent indicators of individual muscle fiber parts extracted from the stained image of type I adductor muscle fibers of Rongchang pigs (including size, shape and staining degree)

[0222]

[0223]

[0224]

[0225] Table 2 Rongchang pig type I muscle fiber staining images - global distribution indicators of staining images of different skeletal muscle parts, where skeletal muscle parts are represented by common abbreviations and technical replicates are represented by numbers

[0226]

[0227]

[0228] The above specific embodiments are merely explanations of the present invention and are not limitations of the present invention. After reading this specification, those skilled in the art may make modifications to the embodiments without any creative contribution as needed. However, such modifications are protected by the patent law as long as they are within the scope of the claims of the present invention.

Claims

1. A method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers, characterized in that: The following steps are involved: Step S1, image acquisition: generating a cross-sectional image of muscle fibers of muscle tissue by sampling, staining and microscopic photography; Step S2, muscle fiber contour and category annotation: use mathematical morphology method, deep learning method or manual annotation method to annotate the contour of each muscle fiber in the image, and classify it into major categories or subcategories; Step S3, geometric center calculation: calculating the coordinates of the geometric center of each muscle fiber according to its contour data; Step S4, distance matrix construction: calculating the pixel distance between muscle fibers according to the contour data of each muscle fiber and storing it in a distance matrix; Step S5, constructing an angle matrix: calculating the relative directions between muscle fibers according to the contour data of each muscle fiber, and storing them in an angle matrix; Step S6, muscle fiber geometric index and staining degree measurement: calculate multiple indexes based on the contour data of each muscle fiber to measure its geometric shape and staining degree; Step S7, global distribution pattern measurement: measure the global distribution pattern of the muscle fiber according to the geometric center coordinates and shape indexes.

2. A method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers as claimed in claim 1, characterized in that: In the step S1, the method of sampling muscle tissue, performing immunofluorescence or enzyme staining and microphotographing generates an immunofluorescence or enzyme staining image of the cross section of muscle fibers of the muscle tissue, requiring that the outline of the muscle fibers in the image should be clear enough to be discernible to the naked eye, and the pixel information should be sufficient to classify the muscle fibers into different categories by the naked eye.

3. A method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers as claimed in claim 2, characterized in that: The specific sub-steps of step S2 are: Step S21, labeling the outline and category of each muscle fiber using a mathematical morphology method, a deep learning method or a manual labeling method; Step S22: The outlines of muscle fibers of the same type are labeled with the same color, while those of different types are labeled with different colors, and a corresponding relationship between the labeled colors and types is provided; Step S23: Obtain the contour coordinate set and category attributes of each muscle fiber by using the method of color pixel classification and closed contour recognition.

4. A method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers as claimed in claim 2, characterized in that: In step S3, assuming the jth muscle fiber, for each muscle fiber contour coordinate set, Ω j ={(x1,y1),…,(x n ,y n )}, calculate the geometric center 5. A method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers as claimed in claim 2, characterized in that: The specific sub-steps of step S6 are: Step S61: Calculate the area of ​​each muscle fiber, where the area A of the i-th muscle fiber is i The calculation formula is: the number of pixels enclosed in a closed contour, including the contour itself, based on Green's formula or the sum of interior points and boundary points counted line by line; Step S62: Calculate the equivalent diameter of each muscle fiber, where the equivalent diameter of the i-th muscle fiber is Eqd i The calculation formula is: Step S63: Calculate the longest diameter of each muscle fiber, the longest diameter of the i-th muscle fiber Maxd i The calculation formula is: Step S64: Calculate the circularity of each muscle fiber by first using the Welzl or Ritter algorithm based on the contour set Ω of the i-th muscle fiber. i Calculate the center coordinates and radius r of its minimum circumscribed circle i , the algorithm complexity is O(n), where n is the number of points in the region, and then the circularity CP of the i-th muscle fiber i The calculation formula is: CP i =A i / πr i 2 ; Step S65, calculate the firmness of each muscle fiber, first calculate the contour set Convex of the minimum convex hull of the i-th muscle fiber by using the Graham scanning algorithm i , where the formula for calculating the firmness of the i-th muscle fiber is: area / minimum convex hull area, that is, A i / AC i , A.C. i is the convex hull area; Step S66: Calculate the rectangularity of each muscle fiber by first using the Welzl iterative algorithm based on convex hull generation according to the contour set Ω of the i-th muscle fiber. i Calculate the four vertices of its minimum enclosing rectangle, arranged clockwise (x1 (i) ,y1 (i) ),(x2 (i) ,y2 (i) ),(x3 (i) ,y3 (i) ),(x4 (i) ,y4 (i) ), where the rectangularity calculation formula of the i-th muscle fiber is: Step S67: Calculate the long-short axis ratio LS of each muscle fiber i , where the calculation formula for the length-short axis ratio of the i-th muscle fiber is: (if the value is greater than 1) or (if the value is greater than 1), where w i and h i are respectively the width and height of the minimum circumscribed rectangle calculated in step S66.

6. A method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers as claimed in claim 2, characterized in that: The specific sub-steps of step S7 are: Step S71, global statistics of the individual characteristic index of the muscle fiber: mean, variance, quantile; Step S72, statistics of the muscle fiber individual characteristic index on each muscle fiber category: mean, variance, quantile; Step S73, calculating the global compactness index of the same type of muscle fibers of each type, and calculating the kth type of muscle fibers; Step S74, calculating the distance matrix between the geometric center points of each type of muscle fiber and the distance entropy value; Step S75, calculating the angle matrix between the geometric center points of each type of muscle fiber and the entropy value; Step S76, calculating the classification fitting parameter vector of the geometric center point distribution in each type of muscle fiber; Step S77, calculating the nearest index vector of the geometric center point in each type of muscle fiber; Step S78, calculating the distribution fitting function of the geometric center point of each type of muscle fiber based on the Gaussian radial basis, where the distribution fitting function of the k-th type of muscle fiber is expressed as Step S79: Spatial autocorrelation analysis, calculation of global Moran index I (k) ; Step S710, spatial Durbin function analysis of the spatial correlation of muscle fiber attributes, and obtaining the indicators ρ, β and δ: y = ρWy + βX + δWX + ε, where y is the dependent variable: taken as a certain attribute value of the muscle fiber; X is a matrix containing the muscle fiber attribute values, taken as the staining depth GD i With area A i ; W is the spatial weight matrix, whose value is the inverse of the distance, taken as 1. / CD; ρ is the spatial autocorrelation coefficient, which measures the spatial spillover effect of the dependent variable itself; β is the coefficient vector of the direct impact of the independent variable on the dependent variable; δ is the coefficient vector that measures the indirect impact of the independent variable on the dependent variable through the neighboring area; ε is the error term, which is usually assumed to be an independent and identically distributed random variable; analyze the values ​​of ρ and δ to understand the strength of the spatial spillover effect and the spatial indirect effect.

7. A method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers as claimed in claim 6, characterized in that: The global compactness index for the k-th type of muscle fiber is calculated as follows: Step D1, calculate the total area of ​​the k-th muscle fiber: where ψ k is the ID set of the k-th muscle fiber; Step D2, merging the contours of each muscle fiber; Step D3: Calculate the minimum convex hull and area SC of all muscle fibers using the Graham scanning algorithm (k) ; Step D4: The formula for firmness is When compact (k) = 1, indicating that the object set completely fills its minimum circumscribed convex hull and the shape is very compact; (k) The closer the value is to 1, the more compact the objects are; the smaller the value is, the more sparse the objects are, or the irregular shapes lead to low space utilization.

8. A method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers as claimed in claim 6, characterized in that: The specific steps of calculating the distance matrix between the geometric center points of each type of muscle fiber and the distance entropy value are as follows: Step E1: Calculate the center distance and the shortest distance between any two muscle fibers in the image, where the center distance between the i-th muscle fiber and the j-th muscle fiber is expressed as cd ij express: The shortest distance is md ij express: Where Ω i and Ω j Respectively represent the contour coordinates of the i-th muscle fiber and the j-th muscle fiber, and store them as the distance matrix CD = {cd ij } and MD = {md ij }; Step E2: Calculate the distance matrix CD between the same types of muscle fibers (k) =CD(id (k) ,id (k) ), distance matrix MD (k) =MD(id (k) ,id (k) ), where id (k) is the ID list of the k-th cell; Step E3: Calculate CD (k) Entropy of the distance matrix: (1) Extracting the frequency of segmented values: Traversing the symmetric matrix CD (k) For all elements of , divide the distribution interval of its values ​​into 20 equal segments, and record the number of elements contained in each numerical interval segment; since the matrix is ​​symmetrical, it is only necessary to traverse the upper triangle or the lower triangle part to avoid repeated counting, and it is necessary to skip the part with a diagonal distance of 0; (2) Calculate the probability distribution: For the interval v i , calculate the frequency of the element appearing in this interval Where n is the total number of muscle fibers, N i For falling on v i The number of elements in ; (3) Calculate the entropy value: The larger the entropy value, the more chaotic the distribution of muscle fibers, and the smaller the entropy value, the more regular the distribution.

9. A method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers as claimed in claim 6, characterized in that: The specific steps of calculating the angle matrix between the geometric center points of each type of muscle fiber and the entropy value are as follows: Step F1: Calculate the center line vector of any two muscle fibers in the image The absolute value of the cosine angle with the horizontal vector [1,0]: Store this value in the matrix ABS cos ={cos∠(i,j)}, which is called the direction matrix; Step F2, calculate the direction matrix between the same types of muscle fibers: Step F3: Calculate the symmetric direction matrix ABS cos (k) The entropy value Entropy The larger it is, the more disorderly the distribution of muscle fibers is, and the smaller it is, the more regular the distribution is.

10. A method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers as claimed in claim 6, characterized in that: The specific steps for calculating the classification fitting parameter vectors a and D of the geometric center point distribution in each type of muscle fiber are as follows: Step G1, in the enzyme staining image, each muscle fiber is represented by its central site, and a scattered binary image is formed for any k-th type of muscle fiber; Step G2, perform fractal fitting on each binary image: calculate the number of scattered points in a small window N(ε) with a size of ε centered on each muscle fiber, calculate the average number of correlations of each window N(ε), keep increasing the window size and repeat the above steps; thus, a series of points can be obtained, which can be represented on a Cartesian graph, where the X-axis represents the size of the window ε=2j+1, j is the iteration step, and the Y-axis represents the average number of points in each window; Step G3, fit this empirical curve to the theoretical curve that conforms to the fractal law, that is, the power function that relates the number of correlations: Parameter a (k) is called the "preforming coefficient", the parameter a (k) It is a comprehensive indicator of the local deviation estimate in the fractal law. When it reaches 4 or is less than 0.1, the fractal pattern is uncertain; the fractal behavior may change at different scales, and the changes usually occur within a fairly small ε value, that is, within a small distance, usually corresponding to the same type of fiber clusters, the "fractal dimension" D (k) It can be estimated using the double logarithmic representation of the power function, and nonlinear regression is used to estimate the parameters of the best fitting curve; when D (k) =2, the distribution pattern of muscle fibers is uniform; D (k) = 0 corresponds to an image consisting of a single point; when D (k) When it is between 1 and 2, the elements are distributed in the form of clusters in space, and the "fractal dimension" D (k) It can be thought of as a measure of the ability to fill the space it occupies.

11. A method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers as claimed in claim 6, characterized in that: The specific steps for calculating the nearest index vector NNI of the geometric center point of each type of muscle fiber are as follows: Step H1, in the enzyme staining image, each muscle fiber is represented by its central site, and a scattered binary image is formed for any k-th type of muscle fiber; Step H2, then calculate the nearest neighbor index of the binary image and store it as NNI (k) : in Represents the Euclidean distance between each scattered point and its nearest similar muscle fiber center point, by taking the calculated distance matrix CD (k) The smallest non-zero element in the i-th row is obtained by (k) is the total number of scattered points, d(ran (k) ) is the average value of the nearest distance of each point under the assumption of random distribution, which is generally taken as Where A is the total area of ​​the image. The smaller the NNI value, the more concentrated the distribution is. The larger the NNI value, the more uniform the distribution is. The closer the value is to 1, the more random the distribution is. Check the reliability of the calculation: Calculate z (k) <-1.645 indicates the aggregation mode, 1.645≤z (k) ≤-1.645 indicates random mode, z (k) >1.645 indicates uniform mode.

12. A method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers as claimed in claim 6, characterized in that: The specific steps for calculating the distribution fitting function of the geometric center points of each type of muscle fiber based on the Gaussian radial basis are as follows: Step I1: Grid the centroid scatter plot of the enzyme staining image to form a scatter binary image for any k-th type of muscle fiber; then count the number of muscle fibers and calculate the geometric center for each (any i-th row and j-th column) grid. Step I2: Calculate the covariance matrix of each (arbitrary i-th row and j-th column) grid sample Where S ij (k) is a point set, |S ij (k) | is the number of points, z r is the coordinate of the rth point; Step I3: Establish the Gaussian kernel function of each grid: The overall distribution function is obtained by summing the number of grid points as weights: For a grid containing only one point, the covariance matrix is ​​constructed based on the maximum distance to the boundary and the unit matrix, and the singular covariance matrix is ​​reconstructed by approximate contract diagonalization; at the same time, the image can be rotated 90 degrees, 180 degrees, and 270 degrees, forming a total of 4 distribution functions Step I4: Type I and II muscle fibers in each stained image can correspond to four distribution functions. The inner product is defined to calculate the Euclidean distance and angle between them to measure the difference between the distribution patterns, and the minimum difference between the four distribution functions is taken; for multiple types of muscle fibers, the average value of the difference in the distribution of each type of muscle fibers between the two images is used to represent the comprehensive difference.

13. A method for quantifying the geometric phenotype and spatial distribution characteristics of pig muscle fibers as claimed in claim 6, characterized in that: Autocorrelation analysis and calculation of the global Moran index I (k) The specific steps are as follows: Step J1, define the matrix W = 1. / CD, which represents the spatial weight matrix, which is taken as the inverse of the distance between the muscle fiber centers, where CD is the distance matrix of all muscle fibers; Step J2: Calculate the global Moran index formula as follows: (k) represents the value of the kth attribute of the muscle fiber, which can be the category attribute (1, 2, ...) represents the category code, which can be the muscle fiber size or shape attribute calculated previously, represents the kth attribute value of the i-th muscle fiber, Represents the global mean of the kth attribute value; based on the PySAL library in Python, the Moran function in the esda module can be used to calculate the global Moran index I of spatial autocorrelation (k) ; I>0 means that the attribute values ​​have positive correlation in space, that is, similar attribute values ​​are easy to cluster together; I=0 means random distribution and no spatial correlation; I<0 means that the attribute values ​​have negative correlation in space, that is, similar attribute values ​​are not easy to cluster together.

Citation Information

Cited By

  • Microenvironment formed by pig muscle fibers and interactive characteristic quantification method thereof

    CN121033431A

  • Microenvironment of porcine muscle fiber and its interaction characteristic quantification method

    CN121033431B