A method, device and equipment for processing texture features of medical images

By dividing medical images into background and target areas, generating texture image matrix and calculating the influence location, the problem of difficulty in intuitive display of lesions in the existing technology is solved, and the visual linkage between texture features and images is realized, which improves the image diagnosis. Intuitive.

CN114255249BActive Publication Date: 2025-01-10SHENYANG NEUSOFT INTELLIGENT MEDICAL TECH RES INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111584141.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2025-01-10
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

The prior art is difficult to visually display the lesion texture information in medical images, and statistics cannot visually reflect texture characteristics.

Method used

By dividing medical images into background areas and target areas, zeroing the pixel values ​​of the background areas, retaining the pixel values ​​of the target areas, generating a texture image matrix, and calculating the influence location based on the texture image matrix, mapping it into medical images, realizing The visual linkage between texture features and images.

Benefits of technology

The visual linkage between texture features and medical images is realized, and the lesion texture information is visualized, enhancing the visual effect of image diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114255249B_ABST
    Figure CN114255249B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and equipment for processing texture features of medical images, which divide the acquired medical images into a background area and a target area. The pixel values ​​of the background area are set to zero, and the pixel values ​​of the target area are retained, thereby generating a texture image matrix. A texture feature matrix is ​​generated according to the texture image matrix based on the image group. The first target element in the texture feature matrix is ​​obtained, the influence position corresponding to the first target element in the texture image matrix is ​​calculated, and the influence position is mapped to the medical image for display. In this way, since the texture feature matrix can reflect the texture changes in the texture image, the first target element in the texture feature matrix is ​​formed by the corresponding influence position in the texture image matrix. Mapping the influence position corresponding to the first target element in the texture image matrix to the medical image can realize the visual linkage between the texture feature and the medical image, and intuitively display the lesion texture information corresponding to the first target element in the medical image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device and equipment for processing texture features of medical images. Background Art

[0002] With the development of radiomics technology, radiomics technology is applied to medical imaging diagnosis, and radiomics features in medical images can be extracted at a high throughput. Radiomics features include texture features that can be used to reflect the changes in the texture of lesions in the body. Texture features are represented by texture feature matrices, which usually include grayscale co-occurrence matrices, grayscale run length matrices, and grayscale region size matrices.

[0003] At present, after obtaining the texture feature matrix, some statistics are mainly constructed on the basis of the texture feature matrix, such as energy, entropy, contrast, variance, related information measurement, and maximum correlation coefficient, and then texture feature analysis is performed based on the statistics. However, the statistics are not visual results and cannot intuitively display the texture information of the lesion. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a method, device and equipment for processing texture features of medical images, which can realize the visual linkage between texture features and medical images, and more intuitively display the lesion texture information in medical images.

[0005] To solve the above problems, the technical solutions provided in the embodiments of the present application are as follows:

[0006] A method for processing texture features of medical images, the method comprising:

[0007] Divide the medical image into background area and target area;

[0008] The pixel values ​​of the background area are set to zero, the pixel values ​​of the target area are retained, and a texture image matrix is ​​generated;

[0009] Generate a texture feature matrix according to the texture image matrix;

[0010] Obtaining a first target element in the texture feature matrix, and calculating an impact position corresponding to the first target element in the texture image matrix;

[0011] The impact position is mapped to the medical image for display.

[0012] In a possible implementation, when the texture feature matrix is ​​a gray level co-occurrence matrix, obtaining a first target element in the texture feature matrix and calculating an influence position corresponding to the first target element in the texture image matrix includes:

[0013] Obtain a first target element in the gray level co-occurrence matrix, where the first target element is in the i-th row and j-th column of the gray level co-occurrence matrix;

[0014] Acquire first generation parameters for generating the gray level co-occurrence matrix, where the first generation parameters include a first distance and a first direction;

[0015] Determine a first interval parameter and a second interval parameter according to the first generation parameter;

[0016] A second target element of the texture image matrix is ​​selected. If the second target element is i and the third target element is j, the positions of the second target element and the third target element in the texture image matrix are determined as the influence positions corresponding to the first target element in the texture image matrix; the number of rows of the third target element in the texture image matrix is ​​the number of rows of the second target element in the texture image matrix plus the first interval parameter, and the number of columns of the third target element in the texture image matrix is ​​the number of columns of the second target element in the texture image matrix plus the second interval parameter;

[0017] Repeat the step of obtaining the second target element of the texture image matrix, and if the second target element is i and the third target element is j, determine the positions of the second target element and the third target element in the texture image matrix as the influence positions corresponding to the first target element in the texture image matrix, until all elements in the texture image matrix are selected;

[0018] A second target element of the texture image matrix is ​​selected, and if the second target element is i and the fourth target element is j, the positions of the second target element and the fourth target element in the texture image matrix are determined as the influence positions corresponding to the first target element in the texture image matrix; the number of rows of the fourth target element in the texture image matrix is ​​the number of rows of the second target element in the texture image matrix minus the first interval parameter, and the number of columns of the fourth target element in the texture image matrix is ​​the number of columns of the second target element in the texture image matrix minus the second interval parameter;

[0019] Repeat the step of obtaining the second target element of the texture image matrix. If the second target element is i and the fourth target element is j, determine the positions of the second target element and the fourth target element in the texture image matrix as the influencing positions corresponding to the first target element in the texture image matrix until all elements in the texture image matrix are selected.

[0020] In a possible implementation, when the texture feature matrix is ​​a grayscale run-length matrix, obtaining a first target element in the texture feature matrix and calculating an impact position corresponding to the first target element in the texture image matrix includes:

[0021] Obtain a first target element in the grayscale run matrix, where the first target element is in the i-th row and j-th column of the grayscale run matrix;

[0022] Acquire a second generation parameter for generating the grayscale run-length matrix, wherein the second generation parameter includes a second direction;

[0023] dividing the texture image matrix into a plurality of difference lists according to the second direction;

[0024] For each of the difference lists, select the fifth target element to the sixth target element in the difference list, where the fifth target element to the sixth target element are j elements in total, and the fifth target element selected for the first time in a difference list is the first element in the difference list;

[0025] If the fifth target element to the sixth target element are all i and an element after the sixth target element is not i, the positions of the fifth target element to the sixth target element in the texture image matrix are determined as the influence positions corresponding to the first target element in the texture image matrix, and an element after the sixth target element is used as the fifth target element, and the fifth target element to the sixth target element in the difference list are reselected until the fifth target element to the sixth target element cannot be selected in the difference list;

[0026] If it is not satisfied that the fifth target element to the sixth target element are all i and the element after the sixth target element is not i, take the element after the fifth target element as the fifth target element, and reselect the fifth target element to the sixth target element in the difference list until the fifth target element to the sixth target element cannot be selected in the difference list.

[0027] In a possible implementation manner, dividing the texture image matrix into a plurality of difference lists according to the second direction includes:

[0028] When the second direction is 0 degrees, each row of elements in the texture image matrix is ​​respectively formed into a difference list, so as to divide the texture image matrix into a plurality of difference lists;

[0029] When the second direction is 45 degrees, starting from the first element of each row in the texture image matrix, each element along the upper right 45 degree extension line is respectively formed into a difference list, and starting from each element after the first element of the last row in the texture image matrix, each element along the upper right 45 degree extension line is respectively formed into a difference list, so as to divide the texture image matrix into a plurality of difference lists;

[0030] When the second direction is 90 degrees, each column element in the texture image matrix is ​​respectively formed into a difference list, so as to divide the texture image matrix into a plurality of difference lists;

[0031] When the second direction is 135 degrees, starting from the first element of each column in the texture image matrix, each element along the lower right 135 degree extension line is respectively composed of a difference list, and starting from each element after the first element of the first column in the texture image matrix, each element along the lower right 45 degree extension line is respectively composed of a difference list, so as to divide the texture image matrix into multiple difference lists.

[0032] In a possible implementation, when the texture feature matrix is ​​a grayscale region size matrix, the method further includes:

[0033] For the seventh target element in the texture image matrix, if the seventh target element is not 0, and the pixel values ​​of the elements in the 8-neighborhood of the seventh target element are different from the pixel value of the seventh target element, a new label value is assigned to the seventh target element; the seventh target element is each element in the texture image matrix;

[0034] If the seventh target element is not 0, and there is an eighth target element with the same pixel value as the seventh target element in the 8-neighborhood of the seventh target element, if each of the eighth target elements has no label value, assign a new label value to the seventh target element and the eighth target element; if any of the eighth target elements has a label value, assign the label value to the seventh target element and other eighth target elements without a label value;

[0035] The element position and the number of elements corresponding to each label value are counted.

[0036] In a possible implementation, when the texture feature matrix is ​​a grayscale region size matrix, obtaining a first target element in the texture feature matrix and calculating an impact position corresponding to the first target element in the texture image matrix includes:

[0037] Obtain a first target element in the grayscale region size matrix, where the first target element is in the i-th row and j-th column of the grayscale region size matrix;

[0038] According to the number of elements corresponding to each of the label values, a target label value with a number of elements being j is obtained from the label values;

[0039] Determine the element position corresponding to the target label value as a candidate position;

[0040] A ninth target pixel with a pixel value of i is selected from the elements corresponding to the candidate positions in the texture image matrix, and the position of the ninth target element in the texture image matrix is ​​determined as the influence position corresponding to the first target element in the texture image matrix.

[0041] In a possible implementation, the medical image is a single-layer medical image or any layer of a multi-layer medical image.

[0042] A device for processing texture features of medical images, the device comprising:

[0043] A division unit, used for dividing the medical image into a background area and a target area;

[0044] A first generating unit, used for setting the pixel values ​​of the background area to zero, retaining the pixel values ​​of the target area, and generating a texture image matrix;

[0045] A second generating unit, used for generating a texture feature matrix according to the texture image matrix;

[0046] A calculation unit, used for acquiring a first target element in the texture feature matrix, and calculating an impact position corresponding to the first target element in the texture image matrix;

[0047] A display unit is used to map the impact position into the medical image for display.

[0048] A device for processing texture features of medical images, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for processing texture features of medical images as described above is implemented.

[0049] A computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the method for processing medical image texture features as described above.

[0050] It can be seen that the embodiments of the present application have the following beneficial effects:

[0051] The embodiment of the present application provides a method, device and equipment for processing texture features of medical images, which divides the acquired medical images into a background area and a target area. The pixel values ​​of the background area are set to zero, and the pixel values ​​of the target area are retained, thereby generating a texture image matrix. The texture image matrix is ​​used to represent the texture image. A texture feature matrix is ​​generated according to the texture image matrix based on the image group. The first target element in the texture feature matrix is ​​obtained, the influence position corresponding to the first target element in the texture image matrix is ​​calculated, and then the influence position is mapped to the medical image for display. In this way, since the texture feature matrix can reflect the texture changes in the texture image, the first target element in the texture feature matrix is ​​formed by the corresponding influence position in the texture image matrix. Therefore, mapping the influence position corresponding to the first target element in the texture image matrix to the medical image can realize the visual linkage between the texture feature and the medical image, and more intuitively display the lesion texture information corresponding to the first target element in the medical image. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 A schematic diagram of a medical image provided in an embodiment of the present application;

[0053] Figure 2 A flowchart of a method for processing medical image texture features provided in an embodiment of the present application;

[0054] Figure 3 A schematic diagram of obtaining a differential list in different second directions provided in an embodiment of the present application;

[0055] Figure 4 A schematic diagram of the structure of a device for processing medical image texture features provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0057] In order to facilitate the understanding and explanation of the technical solutions provided by the embodiments of the present application, the background technology of the present application will be described below.

[0058] With the development of radiomics technology, radiomics technology is applied to medical imaging diagnosis, and radiomics features in medical images can be extracted with high throughput. Radiomics features include three categories: morphological features, intensity features, and texture features. Among them, texture features can be used to reflect the changes in the texture of body lesions. For example, texture features reflect the changes in the texture of body lesions through the spatial position distribution of CT (Computed Tomography) values, such as the spatial position distribution of CT values ​​inside tumors. Texture features are represented by texture feature matrices, which usually include grayscale co-occurrence matrices, grayscale run length matrices, and grayscale region size matrices.

[0059] At present, after obtaining the texture feature matrix, some statistics are mainly constructed on the basis of the texture feature matrix, such as energy, entropy, contrast, uniformity, correlation, variance, sum average, sum variance, sum entropy, difference variance, difference average, difference entropy, related information measurement and maximum correlation coefficient, and then texture feature analysis is performed based on the statistics. However, the statistics are not visual results and cannot intuitively display the texture information of the lesion.

[0060] Based on this, the embodiment of the present application provides a method, device and equipment for processing texture features of medical images, which divides the acquired medical images into a background area and a target area. The pixel values ​​of the background area are set to zero, and the pixel values ​​of the target area are retained, thereby generating a texture image matrix. The texture image matrix is ​​used to represent the texture image. A texture feature matrix is ​​generated according to the texture image matrix based on the image group. The first target element in the texture feature matrix is ​​obtained, the influence position corresponding to the first target element in the texture image matrix is ​​calculated, and then the influence position is mapped to the medical image for display. In this way, since the texture feature matrix can reflect the texture changes in the texture image, the first target element in the texture feature matrix is ​​formed by the corresponding influence position in the texture image matrix. Therefore, mapping the influence position corresponding to the first target element in the texture image matrix to the medical image can realize the visual linkage between the texture feature and the medical image, and more intuitively display the lesion texture information corresponding to the first target element in the medical image.

[0061] In order to facilitate understanding of the method for processing medical image texture features provided in the embodiment of the present application, Figure 1 See the example scenario shown in the figure. Figure 1 , which is a schematic diagram of a medical image provided in an embodiment of the present application.

[0062] In practical applications, the acquired medical image is divided into a background area and a target area. The pixel values ​​of the background area are set to zero, and the pixel values ​​of the target area are retained. As an optional example, the target area is a lesion area. Then, based on the background area with zero pixel values ​​and the target area with retained pixel values, a texture image matrix is ​​generated.

[0063] like Figure 1 As shown in (a), the texture image is represented by a texture image matrix. The elements in the texture image matrix represent the grayscale values ​​of the pixels in the texture image. A texture feature matrix is ​​generated based on the texture image matrix. The texture feature matrix is ​​used to represent the texture feature law of the texture image, such as the spatial position distribution law of the texture image.

[0064] The first target element in the texture feature matrix is ​​obtained, the impact position corresponding to the first target element in the texture image matrix is ​​calculated, and then the impact position is mapped to the medical image for display. It can be understood that the texture image corresponds to the medical image. Figure 1 As shown in (b), the impact position corresponding to the first target element is mapped to the medical image, and the visual linkage between the first target element and the impact position in the medical image can be intuitively observed, which more intuitively displays the lesion texture information corresponding to the first target element in the medical image.

[0065] To facilitate understanding of the present application, a method for processing medical image texture features provided in an embodiment of the present application is described below in conjunction with the accompanying drawings.

[0066] See also Figure 2 As shown, the figure is a flow chart of a method for processing medical image texture features provided by an embodiment of the present application, the method comprising steps S201-S205:

[0067] S201: Divide the medical image into a background area and a target area.

[0068] The acquired medical image is divided into a background area and a target area, wherein the target area is the lesion area and the background area is the non-lesion area.

[0069] As an optional example, the medical image is a single-layer medical image, such as an X-ray medical image. As another optional example, the medical image is any layer of a multi-layer medical image, such as any slice image of a three-dimensional medical image acquired using CT technology.

[0070] S202: Setting the pixel values ​​of the background area to zero, retaining the pixel values ​​of the target area, and generating a texture image matrix.

[0071] The pixel values ​​of the background area are set to zero, and the pixel values ​​of the target area are retained to generate a processed medical image. Then, a texture image matrix of the target area is generated based on the processed medical image. Each element in the texture image matrix is ​​used to represent each pixel in the texture image. Since the texture image is a grayscale image, each element in the texture image matrix is ​​the grayscale value or pixel value of each pixel in the target area.

[0072] In a possible implementation, when the medical image is any slice image in a three-dimensional medical image obtained using CT technology, the CT sequence set of the medical image is first obtained, and then the corresponding three-dimensional matrix is ​​generated, for example, Image_matrix[Slicer_n,Na,Nb]. Wherein, Slicer_n is the number of CT sequence layers, Na is the length of each CT slice, Nb is the width of each CT slice, and the elements in Image_matrix are CT values.

[0073] At the same time, the CT values ​​in the background area of ​​the medical image are all marked as 0, and the CT values ​​in the target area are all marked as 1, a binary sequence set is generated, and then a corresponding three-dimensional matrix is ​​generated, such as Mask_matrix[Slicer_n,Na,Nb], where the elements in Mask_matrix are 0 or 1.

[0074] Then, dot multiplication is performed on the two three-dimensional matrices to obtain the three-dimensional CT value matrix Image_mask of the target area. One layer Image_mask_n of the Image_mask matrix is ​​selected as the texture image matrix of the target area.

[0075] Therefore, the above specific implementation achieves the purpose of setting the pixel values ​​of the background area to zero, retaining the pixel values ​​of the target area, and generating a texture image matrix.

[0076] S203: Generate a texture feature matrix according to the texture image matrix.

[0077] The texture image matrix is ​​used to represent the texture image. For example, when the target area is a lesion area, it is used to represent the texture of the lesion area.

[0078] In some possible implementations, the texture feature matrix is ​​a gray level co-occurrence matrix, a gray level run length matrix, or a gray level region size matrix. The texture feature matrix is ​​used to represent texture features in a texture image. Specifically, each element in the texture feature matrix is ​​obtained based on the related elements in the texture image matrix and the positions of the related elements.

[0079] In practical applications, the texture feature matrix can be generated from the texture image matrix based on radiomics.

[0080] S204: Obtain a first target element in the texture feature matrix, and calculate an impact position corresponding to the first target element in the texture image matrix.

[0081] The first target element may be any element in the texture feature matrix. Since each element in the texture feature matrix is ​​obtained based on the relevant elements in the texture image matrix and the positions of the relevant elements, the influence position corresponding to the first target element in the texture feature matrix is ​​the position of the relevant element in the texture image matrix that forms the first target element.

[0082] For example, when the texture feature matrix is ​​a gray level co-occurrence matrix, the first target element in the gray level co-occurrence matrix is ​​obtained, and the influence position in the texture image matrix corresponding to the first target element is calculated. In another example, when the texture feature matrix is ​​a gray level run matrix, the first target element in the gray level run matrix is ​​obtained, and the influence position in the texture image matrix corresponding to the first target element is calculated. In another example, when the texture feature matrix is ​​a gray level region size matrix, the first target element in the gray level region size matrix is ​​obtained, and the influence position in the texture image matrix corresponding to the first target element is calculated.

[0083] S205: Map the impact position to the medical image for display.

[0084] Since the texture image matrix is ​​used to represent the texture image, each element in the texture image matrix is ​​used to represent each pixel in the texture image. The texture image corresponds to the medical image, and after obtaining the affected position corresponding to the first target element in the texture image matrix, the affected position can be mapped to the medical image for display. Thus, the elements in the texture feature matrix and the elements in the texture image matrix are linked, and the elements in the texture feature matrix and the medical image are visually linked, which can more intuitively display the texture feature information in the medical image corresponding to the first target element in the texture feature matrix. When the target area is a lesion area, the lesion texture feature information in the medical image corresponding to the first target element in the texture feature matrix can be intuitively displayed.

[0085] In addition, the area including the affected location in the medical image can be enlarged to achieve better display and facilitate observation.

[0086] Based on the contents of S201-S205, it can be known that the embodiment of the present application provides a method for processing texture features of medical images, and the acquired medical images are divided into a background area and a target area. The pixel values ​​of the background area are set to zero, and the pixel values ​​of the target area are retained, thereby generating a texture image matrix. The texture image matrix is ​​used to represent the texture image. A texture feature matrix is ​​generated according to the texture image matrix based on the image group. The first target element in the texture feature matrix is ​​obtained, the influence position corresponding to the first target element in the texture image matrix is ​​calculated, and then the influence position is mapped to the medical image for display. In this way, since the texture feature matrix can reflect the texture changes in the texture image, the first target element in the texture feature matrix is ​​formed by the corresponding influence position in the texture image matrix. Therefore, mapping the influence position corresponding to the first target element in the texture image matrix to the medical image can realize the visual linkage between the texture feature and the medical image, and more intuitively display the lesion texture information corresponding to the first target element in the medical image.

[0087] It can be understood that texture is formed by the repeated appearance of grayscale distribution in spatial position, so there will be a certain grayscale relationship between two pixels separated by a certain distance in the image space, that is, the spatial correlation characteristics of grayscale in the image. The grayscale co-occurrence matrix is ​​a matrix used to describe the spatial correlation characteristics of grayscales of different pixels. For ease of understanding, the following example is used to illustrate that the texture image matrix is ​​I1 and the generated grayscale co-occurrence matrix is ​​P1.

[0088]

[0089] It can be seen that the texture image matrix I1 is a 5*5 matrix, and the element value of each element in the texture image matrix is ​​the grayscale value / pixel value. The grayscale co-occurrence matrix P1 is obtained from the texture image matrix and is also a 5*5 matrix. Specifically, the grayscale co-occurrence matrix can be obtained from the texture image matrix only after the texture image matrix and the first generation parameter are determined. Among them, the first generation parameter includes a first distance d and a first direction Θ. It should be noted that the first distance is used to represent the distance between two elements in the texture image matrix, d={1,2,3...n}. d=1 means that two elements are adjacent, d=2 means that there is one element between the two elements, and so on. The first direction is used to represent the direction between two elements in the texture image matrix, Θ={0°,45°,90°,135°}. Among them, Θ=0° means that the connection line of two elements in the texture image matrix is ​​in the 0° direction or 180° direction (horizontally to the right is 0°, vertically upward is 90°, counterclockwise), that is, the horizontal direction, Θ=45° means that the connection line of two elements in the texture image matrix is ​​in the 45° direction or 225° direction, Θ=90° means that the connection line of two elements in the texture image matrix is ​​in the 90° direction or 270° direction, that is, the vertical direction, Θ=135° means that the connection line of two elements in the texture image matrix is ​​in the 135° direction or 315° direction. For example, in the texture image matrix I1, the first direction corresponding to "1" in the first row and the first column and "2" in the first row and the second column is 0°, the first direction corresponding to "1" in the first row and the first column and "2" in the second row and the second column is 135°, the first direction corresponding to "3" in the second row and the first column and "2" in the first row and the second column is 45°, and the first direction corresponding to "1" in the first row and the first column and "3" in the second row and the first column is 90°.

[0090] It should be noted that in the above example, after determining the texture image matrix I1, the first distance d=1 and the first direction Θ=0° can be set to obtain the grayscale co-occurrence matrix P1. Among them, the number of rows of each element in the grayscale co-occurrence matrix P1 represents a grayscale value / element value in the texture image matrix I1, recorded as i, and the number of columns represents another grayscale value / element value in the texture image matrix I1, recorded as j. The associated texture grayscale condition is that in the texture image matrix I1, the distance between the grayscale value i and the grayscale value j is the first distance d=1, and the direction of the grayscale value i and the grayscale value j is the first direction Θ=0°. In the texture image matrix I1, the number of element combinations that meet the associated texture grayscale condition is recorded as the frequency, which is the value of the element in the grayscale co-occurrence matrix P1. Taking the element in the first row and second column of P1 as an example, the number of rows is 1 and the number of columns is 2, then one grayscale value i=1 and the other grayscale value j=2. In the texture image matrix I1, the frequency of the first distance between the gray value 1 and the gray value 2 being 1 and the first direction being 0° is 4, and the element value of the first row and second column in P1 is "4".

[0091] Based on the above description, when the texture feature matrix is ​​a gray level co-occurrence matrix, in a possible implementation, the embodiment of the present application provides a specific implementation method of obtaining a first target element in the texture feature matrix in S204 and calculating an influence position corresponding to the first target element in the texture image matrix, including:

[0092] A1: Get the first target element in the gray level co-occurrence matrix. The first target element is in the i-th row and j-th column of the gray level co-occurrence matrix.

[0093] It can be understood that after the texture image matrix and the texture feature matrix have been acquired, after the first target element in the texture feature matrix is ​​determined, the purpose is to determine the influence position in the texture image matrix corresponding to the first target element according to the first target element.

[0094] In specific implementation, when the generated texture feature matrix is ​​a grayscale co-occurrence matrix, the first target element in the grayscale co-occurrence matrix is ​​obtained, and the first target element is in the i-th row and j-th column of the grayscale co-occurrence matrix. According to the generation process of the grayscale co-occurrence matrix, the influence position in the texture image matrix corresponding to the first target element is divided into multiple element combinations, and the number of element combinations is the same as the element value of the first target element. Each element combination includes two elements, and the grayscale values / element values ​​of the two elements are i and j respectively. Based on this, the purpose is to obtain the position of each element in multiple element combinations.

[0095] For example, taking the gray level co-occurrence matrix P1 as an example, if i=1, j=2, the first target element is in the 1st row and 2nd column of the gray level co-occurrence matrix, and the element value of the first target element is "4". Then the gray values ​​of the two elements of each element combination in the texture image matrix are 1 and 2 respectively, and the number of combinations is 4. The purpose is to find the positions of these 8 elements.

[0096] A2: Obtain first generation parameters for generating a gray-level co-occurrence matrix, where the first generation parameters include a first distance and a first direction.

[0097] It is known that the grayscale values ​​of the two elements included in each element combination in the texture image matrix are i and j respectively, and the number of combinations is the element value of the first target element. According to the generation process of the gray level co-occurrence matrix, the first generation parameter of the gray level co-occurrence matrix can also be determined, and the first generation parameter includes a first distance and a first direction.

[0098] Among them, the first distance d={1,2,3...n}, and the first direction Θ={0°,45°,90°,135°}. Taking the gray level co-occurrence matrix P1 as an example, the first distance of generating the gray level co-occurrence matrix P1 is d=1, and the first direction Θ=0°. The gray level co-occurrence matrix is ​​generated by the texture image matrix I1 on the basis of determining that the first distance is d=1 and the first direction Θ=0°.

[0099] Based on this, the grayscale values ​​of the two elements included in each element combination in the texture image matrix are i and j respectively, the number of combinations is the element value of the first target element, and the distance between the two elements is the first distance, and the direction between the two elements is the first direction.

[0100] A3: Determine a first interval parameter and a second interval parameter according to the first generation parameter.

[0101] Before obtaining the impact position corresponding to the first target element in the texture image matrix, the first distance and the first direction need to be converted into the form of a first interval parameter and a second interval parameter.

[0102] It should be noted that the first interval parameter and the second interval parameter are used to represent the difference in the number of rows and the difference in the number of columns of two elements in the texture image matrix, respectively. Then the first interval parameter and the second interval parameter can be used to represent the first generation parameter. The first interval parameter and the second interval parameter correspond to the first generation parameter.

[0103] In the embodiment of the present application, the relationship between the first generation parameter and the first interval parameter and the second interval parameter is set:

[0104] When the first generation parameter is d=n and Θ=0°, the first interval parameter and the second interval parameter are 0 and n respectively. When the first generation parameter is d=n and Θ=45°, the first interval parameter and the second interval parameter are n and n respectively. When the first generation parameter is d=n and Θ=90°, the first interval parameter and the second interval parameter are n and 0 respectively. When the first generation parameter is d=n and Θ=135°, the first interval parameter and the second interval parameter are n and -n respectively. Wherein, n is the specific value of the first distance.

[0105] Taking the gray-level co-occurrence matrix P1 as an example, the first distance in the first generation parameter is d=1 and the first direction Θ=0°, then the corresponding first interval parameter and second interval parameter are 0 and 1 respectively. According to the first interval parameter being 1, it can be seen that the difference in the number of rows of the two elements is 0, and the two elements are in the same row, which is used to indicate the first direction Θ=0°. According to the second interval parameter being 0, it can be seen that the difference in the number of columns of the two elements is 0, and the two elements are adjacent columns, which is used to indicate that the first distance is d=1.

[0106] After determining the first interval parameter, the second interval parameter, the grayscale values ​​of the two elements included in each element combination in the texture image matrix are i and j respectively, and the number of element combinations is the element value of the first target element, the position of each element in the multiple element combinations that affect the first target element in the texture image matrix can be obtained through the following A4-A7.

[0107] A4: Select the second target element of the texture image matrix. If the second target element is i and the third target element is j, determine the positions of the second target element and the third target element in the texture image matrix as the influence positions corresponding to the first target element in the texture image matrix; the number of rows of the third target element in the texture image matrix is ​​the number of rows of the second target element in the texture image matrix plus the first interval parameter, and the number of columns of the third target element in the texture image matrix is ​​the number of columns of the second target element in the texture image matrix plus the second interval parameter.

[0108] It should be noted that after determining the first interval parameter and the second interval parameter, the element values ​​in the texture image matrix I1 are i and j respectively, and the positions of two elements whose row numbers differ by the first interval parameter and whose column numbers differ by the second interval parameter are the influencing positions corresponding to the first target element in the texture image matrix.

[0109] Then, the second target element and the third target element are selected in the texture image matrix I1, ensuring that the element value of the second target element is i, the element value of the third target element is j, the number of rows of the third target element is the number of rows of the second target element plus the first interval parameter, and the number of columns of the third target element is the number of columns of the second target element plus the second interval parameter. The positions of the second target element and the third target element that meet these conditions are the influence positions in the texture image matrix corresponding to the first target element in the texture image matrix.

[0110] Taking the gray-level co-occurrence matrix P1 as an example, the first interval parameter and the second interval parameter determined according to the first distance d=1 and the first direction Θ=0° are 0 and 1 respectively. Then the element values ​​in the texture image matrix I1 are i and j respectively, and the positions of two elements with the same number of rows and a difference of 1 in the number of columns are the influence positions corresponding to the first target element in the texture image matrix. Then the second target element and the third target element are selected in the texture image matrix I1 to ensure that the element value of the second target element is i, the element value of the third target element is j, the number of rows of the second target element i is the same as the number of rows of the third target element j, and the number of columns of the third target element j is the number of columns of the second target element i plus 1. The positions of the second target element and the third target element that meet these conditions are the influence positions in the texture image matrix corresponding to the first target element in the texture image matrix.

[0111] A5: Repeat the process of obtaining the second target element of the texture image matrix. If the second target element is i and the third target element is j, the positions of the second target element and the third target element in the texture image matrix are determined as the influencing positions corresponding to the first target element in the texture image matrix until all elements in the texture image matrix are selected.

[0112] A4 is executed repeatedly until all elements in the texture image matrix are selected and the traversal is completed.

[0113] Since in A4, in the texture image matrix, the number of rows of the third target element j is the number of rows of the second target element i plus the first interval parameter, and the number of columns of the third target element j is the number of columns of the second target element i plus the second interval parameter. The positional relationship between the second target element and the third target element satisfies that the number of rows differs by the first interval parameter and the number of columns differs by the second interval parameter, but the two elements in another case also satisfy that the number of rows differs by the first interval parameter and the number of columns differs by the second interval parameter, please refer to A6.

[0114] A6: Select the second target element of the texture image matrix. If the second target element is i and the fourth target element is j, determine the positions of the second target element and the fourth target element in the texture image matrix as the influence positions corresponding to the first target element in the texture image matrix; the number of rows of the fourth target element in the texture image matrix is ​​the number of rows of the second target element in the texture image matrix minus the first interval parameter, and the number of columns of the fourth target element in the texture image matrix is ​​the number of columns of the second target element in the texture image matrix minus the second interval parameter.

[0115] The second target element and the fourth target element are selected in the texture image matrix I1, ensuring that the element value of the second target element is i, the element value of the fourth target element is j, the number of rows of the fourth target element is the number of rows of the second target element minus the first interval parameter, and the number of columns of the fourth target element is the number of columns of the second target element minus the second interval parameter. The positions of the second target element and the fourth target element that meet these conditions are also the influence positions in the texture image matrix corresponding to the first target element in the texture image matrix.

[0116] Taking the gray-level co-occurrence matrix P1 as an example, the first interval parameter and the second interval parameter determined according to the first distance d=1 and the first direction Θ=0° are 0 and 1 respectively. The element values ​​in the texture image matrix I1 are i and j respectively, and the positions of two elements with the same number of rows and a difference of 1 in the number of columns are the influence positions corresponding to the first target element in the texture image matrix. Then the second target element and the fourth target element are selected in the texture image matrix I1 to ensure that the element value of the second target element is i, the element value of the fourth target element is j, the number of rows of the second target element i is the same as the number of rows of the fourth target element j, and the number of columns of the fourth target element j is the number of columns of the second target element i minus 1. The positions of the second target element and the fourth target element that meet these conditions are also the influence positions in the texture image matrix corresponding to the first target element in the texture image matrix.

[0117] A7: Repeat the process of obtaining the second target element of the texture image matrix. If the second target element is i and the fourth target element is j, the positions of the second target element and the fourth target element in the texture image matrix are determined as the influencing positions corresponding to the first target element in the texture image matrix until all elements in the texture image matrix are selected.

[0118] A6 is repeatedly executed until all elements in the texture image matrix are selected and the traversal is completed. It can be understood that after executing A4-A7, the influence positions corresponding to all the first target elements in the texture image matrix can be obtained.

[0119] In a specific implementation, in order to obtain the influence positions corresponding to all the first target elements in the texture image matrix, matrices M and N may be set. The dimensions of the matrices M and N are the same as the texture image matrix, and all the elements are zero.

[0120] Then, the texture image matrix I1 is first traversed forward. If I1[x,y]=i, and I1[x+a,y+b]=j, then M[x,y]=1, M[x+a,y+b]=1. Then, the texture image matrix I1 is traversed backward. If I1[x,y]=i, and I1[xa,yb]=j, then N[x,y]=1, N[xa,yb]=1. Where a is the first interval parameter, and b is the second interval parameter.

[0121] Finally, the matrix Q=M+N is generated, and the element position of the non-zero element value in the matrix Q is the influence position of the gray level co-occurrence matrix P1 in the texture image matrix I1 obtained by selecting the first target element according to the gray level co-occurrence matrix P1, and the element value of the influence position is the texture in the texture image matrix I1 that affects the first target element. The linkage between the texture feature matrix and the texture image matrix is ​​realized, and the corresponding position in the texture image can be known according to the features in the texture feature matrix, and the lesion texture information in the texture image corresponding to the first target element can be more intuitively displayed.

[0122] The grayscale run length matrix is ​​a matrix composed of the lengths of runs of the same grayscale value. For ease of understanding, the following example is used to illustrate that the texture image matrix is ​​I2 and the generated grayscale run length matrix is ​​P2.

[0123]

[0124] Among them, the texture image matrix I1 is a 5*5 matrix, and the element value of each element in the texture image matrix is ​​the grayscale value / pixel value. The grayscale run matrix P2 is obtained from the texture image matrix and is also a 5*5 matrix. Specifically, after determining the texture image matrix and the second generation parameter, the grayscale co-occurrence matrix can be obtained from the texture image matrix. Among them, the second generation parameter includes the second direction θ. The second direction is used to indicate the direction between two elements in the texture image matrix, which is the same as the first direction θ. The second direction θ={0°, 45°, 90°, 135°}. Regarding the second direction θ, refer to the first direction θ, which will not be repeated here.

[0125] It should be noted that in the above example, after determining the texture image matrix I2, let the second direction θ = 0°, and the grayscale run matrix P2 can be obtained. Among them, the number of rows of each element in the grayscale run matrix P2 represents a grayscale value / element value in the texture image matrix I2, denoted as i; the number of columns represents the number of element values ​​in the second direction θ = 0° that are consecutively i, denoted as j; the element value represents the frequency of the grayscale run matrix P2 that satisfies the grayscale value i and the number of element values ​​in the second direction θ = 0° that are consecutively i is j. Take the element "3" in the second row and first column of the grayscale run matrix P2 as an example. Its number of rows is 2 and its number of columns is 1, then i = 2, j = 1. It can be seen that in the texture image matrix I2, the frequency of the number of grayscale values ​​2 and the number of element values ​​(i.e., grayscale values) that are consecutively 2 in the horizontal direction is 1 is 3. That is, the "2" in the first row and second column, the "2" in the third row and first column, and the "2" in the fifth row and fifth column of the grayscale run matrix P2 all satisfy this condition. Taking the element "1" in the third row and second column of the grayscale run matrix P2 as an example, the number of rows is 3 and the number of columns is 2. It can be seen that in the texture image matrix I2, the frequency of the number of grayscale values ​​​​being 3 and the number of element values ​​(i.e., grayscale values) being 3 consecutively in the horizontal direction is 1. That is, the two elements "3" in the fifth row, third column, and fourth column of the grayscale run matrix P2 satisfy this condition.

[0126] Based on the above description, when the texture feature matrix is ​​a grayscale run-length matrix, in a possible implementation, the embodiment of the present application provides a specific implementation method of obtaining the first target element in the texture feature matrix in S204 and calculating the influence position corresponding to the first target element in the texture image matrix, including:

[0127] B1: Get the first target element in the grayscale run matrix. The first target element is in the i-th row and j-th column of the grayscale run matrix.

[0128] It can be understood that after the texture image matrix and the grayscale run-length matrix have been acquired, after the first target element in the grayscale run-length matrix is ​​determined, the purpose is to determine the influence position in the texture image matrix corresponding to the first target element based on the first target element.

[0129] In specific implementation, when the generated texture feature matrix is ​​a grayscale run matrix, the first target element in the grayscale run matrix is ​​obtained, and the first target element is in the i-th row and j-th column of the grayscale run matrix. According to the generation process of the grayscale run matrix, it can be known that the influence position in the texture image matrix corresponding to the first target element is a combination of multiple elements, and the number of element combinations is the same as the element value of the first target element. Each element combination includes j elements, and the j elements are continuous and the element values ​​are all i. Based on this, the purpose is to obtain the position of each element in the multiple element combinations. It should be noted that continuous refers to continuity in the 0° direction, the 45° direction, the 90° direction or the 135° direction. For example, the elements in the first row and the first column, the elements in the second row and the second column, and the elements in the second row and the third column are not continuous. The elements in the first row and the first column, the elements in the second row and the second column, and the elements in the third row and the third column are continuous, that is, they are continuous in the 135° direction.

[0130] B2: Obtain a second generation parameter for generating a grayscale run-length matrix, where the second generation parameter includes a second direction.

[0131] It is known that the j elements included in each element combination in the texture image matrix are continuous and the element values ​​are all i, and the number of combinations is the element value of the first target element. In addition, according to the generation process of the grayscale run matrix, it is known that the second generation parameter for generating the grayscale run matrix can also be determined, and the second generation parameter includes the second direction.

[0132] Among them, the second direction θ={0°, 45°, 90°, 135°}. Taking the grayscale run matrix P2 as an example, the second direction θ=0° of the grayscale run matrix P2 is generated. The grayscale run matrix is ​​generated by the texture image matrix I2 on the basis of determining the second direction θ=0°.

[0133] Based on this, the j elements included in each element combination in the texture image matrix are continuous and the element values ​​are all i, the number of combinations is the element value of the first target element, and the direction between the j elements is the second direction.

[0134] B3: Divide the texture image matrix into a plurality of difference lists according to the second direction.

[0135] Since the affected position in the texture image matrix corresponding to the first target element is the position of each element in the multiple element combinations in the texture image matrix, the number of combinations is the element value of the first target element. Moreover, each element combination in the texture image matrix satisfies three conditions, the first of which is that the element combination includes j consecutive elements, the second is that the element values ​​of the j consecutive elements are all i, and the third is that the direction between the j elements is the second direction. In order to facilitate the acquisition of j consecutive elements whose element values ​​are all i in the second direction, the texture image matrix is ​​first divided into multiple difference lists according to the second direction. Since the multiple difference lists are divided according to the second direction, the multiple difference lists of the texture image matrix obtained according to the second direction are helpful for the subsequent acquisition of j consecutive elements whose element values ​​are all i in the second direction.

[0136] See also Figure 3 , Figure 3 The schematic diagram of obtaining the difference list in different second directions provided in the embodiment of the present application. In some possible implementations, combined with Figure 3 , the embodiment of the present application provides a specific implementation method of dividing the texture image matrix into a plurality of difference lists according to the second direction, including:

[0137] B301: When the second direction is 0 degrees, each row of elements in the texture image matrix is ​​respectively formed into a difference list, so as to divide the texture image matrix into a plurality of difference lists.

[0138] Taking the texture image matrix I2 as an example, when the second direction is 0 degrees, the multiple difference lists divided by the texture image matrix are [5,2,5,4,4], [3,3,3,1,3], [2,1,1,1,3], [4,2,2,2,3], [3,5,3,3,2]. In each difference list, the direction between each element in the texture image matrix I2 is 0 degrees.

[0139] B302: When the second direction is 45 degrees, starting from the first element of each row in the texture image matrix, each element along the upper right 45-degree extension line is formed into a difference list, and starting from each element after the first element of the last row in the texture image matrix, each element along the upper right 45-degree extension line is formed into a difference list, so as to divide the texture image matrix into multiple difference lists.

[0140] Taking the texture image matrix I2 as an example, when the second direction is 45 degrees, the multiple difference lists divided by the texture image matrix are [5], [3,2], [2,3,5], [4,1,3,4], [3,2,1,1,4], [5,2,1,3], [3,2,3], [3,3], [2]. In each difference list, the direction between each element in the texture image matrix I2 is 45 degrees.

[0141] B303: When the second direction is 90 degrees, each column element in the texture image matrix is ​​respectively formed into a difference list, so as to divide the texture image matrix into a plurality of difference lists.

[0142] Taking the texture image matrix I2 as an example, when the second direction is 90 degrees, the multiple difference lists divided by the texture image matrix are [5, 3, 2, 4, 3], [2, 3, 1, 2, 5], [5, 3, 1, 2, 3], [4, 1, 1, 2, 3], [4, 3, 3, 3, 2]. In each difference list, the direction between each element in the texture image matrix I2 is 90 degrees.

[0143] B304: When the second direction is 135 degrees, starting from the first element of each column in the texture image matrix, each element along the lower right 135 degree extension line is respectively formed into a difference list, and starting from each element after the first element of the first column in the texture image matrix, each element along the lower right 45 degree extension line is respectively formed into a difference list, so as to divide the texture image matrix into multiple difference lists.

[0144] Taking the texture image matrix I2 as an example, when the second direction is 135 degrees, the multiple difference lists divided by the texture image matrix are [3], [5, 4], [3, 2, 2], [3, 2, 1, 3], [2, 2, 1, 3, 5], [3, 1, 3, 2], [3, 1, 5], [3, 4], [4]. In each difference list, the direction between each element in the texture image matrix I2 is 135 degrees.

[0145] B4: For each difference list, select the fifth target element to the sixth target element in the difference list, where there are j elements in total from the fifth target element to the sixth target element. The fifth target element selected for the first time in a difference list is the first element in the difference list.

[0146] After obtaining multiple difference lists in the second direction, the direction between each element in each difference list is the second direction in the texture image matrix I2. At this time, for each difference list, the fifth target element to the sixth target element in the difference list are selected, and the fifth target element to the sixth target element are j elements in total. The selected fifth target element to the sixth target element have satisfied two conditions in the element combination, that is, the element combination includes j consecutive elements and the direction between the j elements is the second direction.

[0147] It should be noted that the fifth target element selected for the first time in a difference list is the first element in the difference list.

[0148] B5: If the fifth target element to the sixth target element are all i and the element after the sixth target element is not i, the positions of the fifth target element to the sixth target element in the texture image matrix are determined as the influence positions corresponding to the first target element in the texture image matrix, and an element after the sixth target element is taken as the fifth target element, and the fifth target element to the sixth target element in the difference list are reselected until the fifth target element to the sixth target element cannot be selected in the difference list.

[0149] On the basis of B4, if the fifth to sixth target elements are all i and the element after the sixth target element is not i, then the last condition in the element combination is met, that is, the element values ​​of the j consecutive elements are all i. Among them, the element after the sixth target element is not i to ensure that the number of consecutive elements with element value i is j.

[0150] Based on this, the positions of the fifth target element to the sixth target element in the texture image matrix can be determined as the influence positions corresponding to the first target element in the texture image matrix. After the selection is completed once, an element after the sixth target element is used as the fifth target element, and the fifth target element to the sixth target element in the difference list are reselected until the fifth target element to the sixth target element cannot be selected in the difference list.

[0151] B6: If the fifth target element to the sixth target element are all i and the element after the sixth target element is not i, take the element after the fifth target element as the fifth target element, and reselect the fifth target element to the sixth target element in the difference list until the fifth target element to the sixth target element cannot be selected in the difference list.

[0152] On the basis of B4, if it is not satisfied that the fifth target element to the sixth target element are all i and the element after the sixth target element is not i, then reselect the fifth target element, that is, the element after the fifth target element is taken as the fifth target element, and reselect the fifth target element to the sixth target element in the difference list until the fifth target element to the sixth target element cannot be selected in the difference list.

[0153] Taking the grayscale run matrix P2, the second direction is 0° as an example, the element "1" in the third row and second column of the grayscale run matrix P2 is used as the first target element, the number of rows is 3, the number of columns is 2, then i = 3, j = 2. It is determined that each element combination in the texture image matrix I2 includes 2 consecutive elements, the element values ​​of the 2 consecutive elements are both 3, and the direction between the 2 consecutive elements is the horizontal direction.

[0154] Further, the second direction is determined to be the 0° direction, that is, the multiple difference lists in the horizontal direction are [5,2,5,4,4], [3,3,3,1,3], [2,1,1,1,3], [4,2,2,2,3], [3,5,3,3,2]. For each difference list, the fifth target element is selected from the first element, and the selected fifth target element to the sixth target element are 2 elements in total, and it is necessary to satisfy that the fifth target element to the sixth target element are all 3 and the element after the sixth target element is not 3. It can be determined that in the difference list [3,5,3,3,2], there is a third element "3" as the fifth target element and a fourth element "3" as the sixth target element. The positions of the third element "3" and the fourth element "3" in the texture image matrix are determined as the influence positions corresponding to the first target element in the texture image matrix. That is, the two elements "3" in the third and fourth columns of the fifth row in the grayscale run matrix P2 are the influence positions corresponding to the first target element in the texture image matrix. It is understandable that, whether or not the fifth to sixth target elements are all 3 and the element after the sixth target element is not 3, the fifth target element needs to be reselected for judgment until the fifth to sixth target elements cannot be selected in the differential list.

[0155] In specific implementation, in order to obtain the influence positions corresponding to all the first target elements in the texture image matrix, L[x] can be set as a difference list, where x represents the xth difference list. And the following judgment is performed on each L[x] list:

[0156] If L[x][y]=L[x][y+1]...=L[x][y+j-1]=i and L[x][y+j]≠i, then keep the values ​​from L[x][y] to L[x][y+j-1], and make the next judgment from L[x][y+j] until the traversal of L[x] is completed. Among them, y is the fifth target element in the list, y+j-1 is the sixth target element. y+j is the element after the sixth target element.

[0157] If L[x][y]=L[x][y+1]...=L[x][y+j-1]=i and L[x][y+j]≠i is not satisfied, then L[x][y]=0, and the conditional judgment starts from L[x][y+1]. Among them, y+1 is an element after the fifth target element.

[0158] Finally, the filtered difference list QL is generated, and the matrix of QL is restored to obtain the restored matrix I_WEN. Taking the second direction as 0°, the first target element i=1, j=3 in the grayscale run matrix P2 as an example, the obtained QL is [[0,0,0,0,0],[0,0,0,0,0],[0,1,1,1,0],[0,0,0,0,0],[0,0,0,0,0]], and the obtained I_WEN is the following matrix:

[0159]

[0160] It can be clearly known from I_WEN that the influencing position of the first target element in the texture image matrix obtained by screening is the position of the non-zero element value. The element value of the influencing position is the texture in the texture image matrix that affects the first target element. The linkage between the texture feature matrix and the texture image matrix is ​​realized, and the corresponding position in the texture image can be obtained according to the features in the texture feature matrix, and the lesion texture information in the texture image corresponding to the first target element can be more intuitively displayed.

[0161] The grayscale region size matrix is ​​an advanced statistical matrix of texture features, which is used to record the frequency of a certain number of identical grayscale values ​​connected in a two-dimensional image region. For ease of understanding, the following example is used to illustrate that the texture image matrix is ​​I3 and the generated grayscale region size matrix is ​​P3.

[0162]

[0163] Among them, the texture image matrix I3 is a 5*5 matrix, and the element value of each element in the texture image matrix is ​​the grayscale value / pixel value. The grayscale region size matrix P3 is obtained from the texture image matrix and is also a 5*5 matrix. Among them, the number of rows of each element in the grayscale region size matrix P3 represents a grayscale value / element value in the texture image matrix I3, recorded as i; the number of columns represents the number of connected elements in the texture image matrix I3 whose element value is i, recorded as j; the element value represents the frequency of the number of elements in the texture image matrix I3 that meet the requirement that the number of connected element values ​​is i is j. Taking the element "1" in the second row and first column of the grayscale region size matrix P3 as an example, its number of rows is 2 and the number of columns is 1, then i=2, j=1. It can be seen that in the texture image matrix I3, the frequency of the number of connected elements whose grayscale values ​​are all 2 is 1 is 1. That is, only the "2" in the first row and second column of the texture image matrix I3 meets the requirement. Take the element "1" in the second row and fifth column of the grayscale region size matrix P3 as an example. The number of rows is 2 and the number of columns is 5, then i = 2, j = 5. It can be seen that in the texture image matrix I3, the frequency of the number of connected elements with grayscale values ​​of 2 is 5 is 1. That is, the "2" in the first column of the third row, the "2" in the second, third and fourth columns of the fourth row, and the "2" in the fifth row and fifth column of the texture image matrix I3 are connected, and the element values ​​are all 2 and the number is 5, but the frequency that this condition can be satisfied is 1, that is, this situation only occurs once.

[0164] Based on the above description, when the texture feature matrix is ​​a grayscale area size matrix, after obtaining the texture image matrix and the corresponding grayscale area size matrix, before calculating the influence position corresponding to the first target element in the texture image matrix, it is necessary to execute C1-C3 to obtain the position and number of connected elements in the texture image matrix by means of label values:

[0165] C1: For the seventh target element in the texture image matrix, if the seventh target element is not 0, and the pixel values ​​of each element in the 8-neighborhood of the seventh target element are different from the pixel value of the seventh target element, a new label value is assigned to the seventh target element; the seventh target element is each element in the texture image matrix.

[0166] Any element in the texture image matrix is ​​selected as the seventh target element, and the seventh target element is not 0. When the pixel values ​​of each element in the 8-neighborhood of the seventh target element are different from the pixel value of the seventh target element, a new label value is assigned to the seventh target element. Among them, each element in the 8-neighborhood of an element is the 8 adjacent elements around the element. It can be understood that the pixel value is the grayscale value / element value. As an optional example, the label value is a distinguishable symbol such as a random number or letter. As another optional example, a new color can be assigned to the seventh target element, and the color is used to represent the label of the first target element.

[0167] C2: If the seventh target element is not 0, and there is an eighth target element with the same pixel value as the seventh target element in the 8-neighborhood of the seventh target element, if all the eighth target elements have no label value, assign a new label value to the seventh target element and the eighth target element; if any of the eighth target elements has a label value, assign the label value to the seventh target element and other eighth target elements without a label value.

[0168] When there is an eighth target element with the same pixel value as the seventh target element in the 8-neighborhood of the seventh target element, if all the eighth target elements have no label value, the seventh target element and the eighth target element are assigned a new label value. If there is an eighth target element with a label value, the label value is assigned to the seventh target element and other eighth target elements without label values.

[0169] C3: Count the element position and number of elements corresponding to each label value.

[0170] After executing C1-C2, the label value corresponding to each element in the texture image matrix, as well as the element position and the number of elements corresponding to each label value can be obtained.

[0171] Taking texture image matrix I3 as an example, if we start from the element in the first row and first column of the texture image matrix as the seventh target element, and traverse in sequence, after traversing one row, we start traversing from the next row. Set the initial label value to 101, and start assigning new label values ​​in increments of 1. The label values ​​corresponding to each element are as follows:

[0172]

[0173] Among them, the label values ​​of 1 are 101, 102, 103, 109, 110 and 111. The label value of 2 is 104. The label value of 3 is 105. The label value of 4 is 106. The label values ​​of 5 are 107 and 108. It can be understood that the initial seventh target element can also be randomly selected.

[0174] When the texture feature matrix is ​​a grayscale region size matrix, in a possible implementation, the embodiment of the present application provides a method of obtaining a first target element in the texture feature matrix in S204, and calculating an impact position corresponding to the first target element in the texture image matrix, including:

[0175] D1: Get the first target element in the grayscale region size matrix. The first target element is in the i-th row and j-th column of the grayscale region size matrix.

[0176] It can be understood that after the texture image matrix and the grayscale area size matrix, as well as the element position and the corresponding number of elements corresponding to each label value in the texture image matrix, are obtained, the first target element in the grayscale area size matrix is ​​obtained, and the first target element is in the i-th row and j-th column of the grayscale area size matrix. It can be seen from the generation process of the grayscale area size matrix that the influence position in the texture image matrix corresponding to the first target element is a plurality of element combinations, and the number of element combinations is the same as the element value of the first target element. Each element combination includes j elements, and the j elements are connected and the element values ​​of the j elements are all i. Based on this, the purpose is to obtain the position of each element in the plurality of element combinations. For example, the elements in the first row and the first column, the elements in the second row and the second column, and the elements in the second row and the third column are also connected. In an embodiment of the present application, the connected element combination includes a continuous element combination, but the continuous element combination does not include a connected element combination. That is, the connected element combination may not be a continuous element combination, but the continuous element combination must be a connected element combination.

[0177] D2: According to the number of elements corresponding to each label value, obtain the target label value with j elements from the label value.

[0178] According to the number of elements corresponding to each label value obtained by C3, the target label value with j elements is obtained from the label value. Then the element positions corresponding to the j target label values ​​are connected.

[0179] D3: Determine the element position corresponding to the target label value as the candidate position.

[0180] Since there may be more than one set of target label values ​​with j elements in the label value, for example, the number of elements corresponding to the first set of target label values ​​is j, and the number of elements corresponding to the second set of target label values ​​is also j. However, the element values ​​of the element positions corresponding to the first set of target label values ​​are different from the element values ​​of the element positions corresponding to the second set of target label values.

[0181] Then, the element position corresponding to the target label value is first determined as the candidate position.

[0182] D4: Filter a ninth target pixel with a pixel value of i from the elements corresponding to the candidate positions in the texture image matrix, and determine the position of the ninth target element in the texture image matrix as the influence position corresponding to the first target element in the texture image matrix.

[0183] Based on D3, the ninth target pixel with a pixel value of i is selected from the elements corresponding to the candidate positions in the texture image matrix. It can be seen that the pixel value of the ninth target pixel is i, the number of the ninth target pixels is j, and the element positions corresponding to the ninth target pixel are connected. Then the position of the ninth target element in the texture image matrix is ​​determined as the influence position corresponding to the first target element in the texture image matrix.

[0184] Taking the grayscale region size matrix P3 as an example, the element "1" in the second row and first column of the grayscale region size matrix P3 is used as the first target element. The number of rows is 2 and the number of columns is 1, then i = 2, j = 1. It is determined that each element combination in the texture image matrix I3 includes one connected element, and the element value of the one continuous element is 2.

[0185] First, determine the target label values ​​of 1, which are 101, 102, 103, 109, 110 and 111. The element positions corresponding to the target label values ​​101, 102, 103, 109, 110 and 111 are all determined as candidate positions, that is, the first, second and third positions of the first row, the first column of the fourth row, and the first and second columns of the fifth row are all determined as candidate positions. Since the pixel value i = 2, the ninth target pixel with a pixel value of 2 corresponding to the candidate position is determined to be the element of the first row and second column, and the position of the first row and second column in the texture image matrix is ​​determined as the influence position corresponding to the first target element in the texture image matrix.

[0186] In the specific implementation, in order to obtain the influence position corresponding to all the first target elements in the texture image matrix, a matrix M with all zero element values ​​of the same dimension as the matrix I3 can be generated first. And let the seventh target element in the texture image matrix be I(x,y), x is the number of rows, and y is the number of columns. (x,y) represents the position of the seventh target element. When I(x,y) is not 0, perform the following steps:

[0187] a. If the pixel values ​​of each element in the 8-neighborhood of I(x,y) are not equal to the pixel value of I(x,y), then a new label value label is assigned to M(x,y), label+=1, M(x,y)=label. As an optional example, the new label value can be randomly selected. Among them, M(x,y) is the element value at the position with row number x and column number y.

[0188] b. If there is an eighth target element in the 8-neighborhood of I(x,y) whose pixel value is equal to the pixel value of I(x,y), obtain the target position of each eighth target element, that is, the row number and column number of each eighth target element in the texture image matrix.

[0189] If there is no label at the same target position in the matrix M, a new label is assigned to M(x,y), label+=1, and M(x,y)=M(XN,YN)=label. Among them, the position represented by (XN,YN) is the corresponding position of each eighth target element in the texture image matrix, with the number of rows being XN and the number of columns being YN. M(XN,YN) represents the element value at the position with the number of rows being XN and the number of columns being YN.

[0190] If there is already a label at any target position in the matrix M, the label is assigned to M(x,y) and other M(XN,YN) without label values.

[0191] Then, count the element position and number of elements corresponding to each label in the matrix M. The element positions with the same label are connected.

[0192] Further, filter out j labels and generate a filter step matrix A. The element value at the position of j labels in the A matrix is ​​label, and the element values ​​at other positions are set to zero. Multiply the grayscale area size matrix P3 by A to generate a filter matrix B. At this time, the number of connected elements in the filter matrix B is j. Then filter the filter matrix B with pixel value i to generate a filter matrix C. The element position of each non-zero element value in the filter matrix C is the influence position corresponding to the first target element in the texture image matrix filtered according to the first target element.

[0193] It can be understood that the element value of the influencing position corresponding to the first target element is the texture in the texture image matrix I3 that affects the first target element, which realizes the linkage between the texture feature matrix and the texture image matrix. The corresponding position in the texture image can be known according to the features in the texture feature matrix, and the lesion texture information in the texture image corresponding to the first target element can be more intuitively displayed.

[0194] Based on the method for processing medical image texture features provided by the above method embodiment, the embodiment of the present application also provides a device for processing medical image texture features, and the device for processing medical image texture features will be described below in conjunction with the accompanying drawings.

[0195] See also Figure 4 , which is a schematic diagram of the structure of a device for processing medical image texture features provided in an embodiment of the present application. Figure 4 As shown, the device for processing medical image texture features includes:

[0196] A division unit 401 is used to divide the medical image into a background area and a target area;

[0197] A first generating unit 402 is used to set the pixel values ​​of the background area to zero, retain the pixel values ​​of the target area, and generate a texture image matrix;

[0198] A second generating unit 403 is used to generate a texture feature matrix according to the texture image matrix;

[0199] A calculation unit 404 is used to obtain a first target element in the texture feature matrix, and calculate an impact position corresponding to the first target element in the texture image matrix;

[0200] The display unit 405 is used to map the impact position into the medical image for display.

[0201] In a possible implementation, when the texture feature matrix is ​​a gray level co-occurrence matrix, the calculation unit 404 includes:

[0202] A first acquisition subunit is used to acquire a first target element in the gray level co-occurrence matrix, where the first target element is in the i-th row and j-th column of the gray level co-occurrence matrix;

[0203] A second acquisition subunit is used to acquire first generation parameters for generating the gray level co-occurrence matrix, where the first generation parameters include a first distance and a first direction;

[0204] A first determining subunit, configured to determine a first interval parameter and a second interval parameter according to the first generating parameter;

[0205] A first selection subunit is used to select a second target element of the texture image matrix, and if the second target element is i and the third target element is j, the positions of the second target element and the third target element in the texture image matrix are determined as the influence positions corresponding to the first target element in the texture image matrix; the number of rows of the third target element in the texture image matrix is ​​the number of rows of the second target element in the texture image matrix plus the first interval parameter, and the number of columns of the third target element in the texture image matrix is ​​the number of columns of the second target element in the texture image matrix plus the second interval parameter;

[0206] a first execution subunit, configured to repeatedly execute the step of obtaining a second target element of the texture image matrix, and if the second target element is i and the third target element is j, determining positions of the second target element and the third target element in the texture image matrix as influence positions corresponding to the first target element in the texture image matrix, until all elements in the texture image matrix are selected;

[0207] a second selection subunit, for selecting a second target element of the texture image matrix, and if the second target element is i and the fourth target element is j, determining the positions of the second target element and the fourth target element in the texture image matrix as the influence positions corresponding to the first target element in the texture image matrix; the number of rows of the fourth target element in the texture image matrix is ​​the number of rows of the second target element in the texture image matrix minus the first interval parameter, and the number of columns of the fourth target element in the texture image matrix is ​​the number of columns of the second target element in the texture image matrix minus the second interval parameter;

[0208] A second execution subunit is used to repeatedly execute the step of obtaining the second target element of the texture image matrix, and if the second target element is i and the fourth target element is j, determine the positions of the second target element and the fourth target element in the texture image matrix as the influencing positions corresponding to the first target element in the texture image matrix, until all elements in the texture image matrix are selected.

[0209] In a possible implementation, when the texture feature matrix is ​​a grayscale run-length matrix, the calculation unit 404 includes:

[0210] A third acquisition subunit is used to acquire a first target element in the grayscale run matrix, where the first target element is in the i-th row and j-th column of the grayscale run matrix;

[0211] A fourth acquisition subunit is used to acquire a second generation parameter for generating the grayscale run matrix, wherein the second generation parameter includes a second direction;

[0212] a first division subunit, configured to divide the texture image matrix into a plurality of difference lists according to the second direction;

[0213] a third selection subunit, configured to select, for each of the difference lists, a fifth target element to a sixth target element in the difference list, wherein the fifth target element to the sixth target element are j elements in total, and the fifth target element selected for the first time in a difference list is the first element in the difference list;

[0214] a second determining subunit, for determining positions of the fifth target element to the sixth target element in the texture image matrix as influence positions corresponding to the first target element in the texture image matrix if the fifth target element to the sixth target element are all i and an element after the sixth target element is not i, and taking an element after the sixth target element as the fifth target element, and reselecting the fifth target element to the sixth target element in the difference list until the fifth target element to the sixth target element cannot be selected in the difference list;

[0215] The third determination subunit is used to, if the condition that the fifth target element to the sixth target element are all i and the element after the sixth target element is not i, take the element after the fifth target element as the fifth target element, and reselect the fifth target element to the sixth target element in the differential list until the fifth target element to the sixth target element cannot be selected in the differential list.

[0216] In a possible implementation, the first dividing subunit includes:

[0217] a second division subunit, configured to, when the second direction is 0 degrees, respectively organize each row of elements in the texture image matrix into a difference list, so as to divide the texture image matrix into a plurality of difference lists;

[0218] a third division subunit, for, when the second direction is 45 degrees, starting from the first element of each row in the texture image matrix and each element along the upper right 45 degree extension line respectively compose a difference list, and starting from each element after the first element of the last row in the texture image matrix and each element along the upper right 45 degree extension line respectively compose a difference list, so as to divide the texture image matrix into a plurality of difference lists;

[0219] a fourth division subunit, configured to, when the second direction is 90 degrees, respectively organize each column element in the texture image matrix into a difference list, so as to divide the texture image matrix into a plurality of difference lists;

[0220] The fifth division subunit is used to, when the second direction is 135 degrees, form a difference list starting from the first element of each column in the texture image matrix and each element along the lower right 135 degree extension line, and to form a difference list starting from each element after the first element of the first column in the texture image matrix and each element along the lower right 45 degree extension line, so as to divide the texture image matrix into multiple difference lists.

[0221] In a possible implementation, when the texture feature matrix is ​​a grayscale region size matrix, the device further includes:

[0222] a first assigning unit, for a seventh target element in the texture image matrix, if the seventh target element is not 0 and the pixel values ​​of the elements in the 8-neighborhood of the seventh target element are different from the pixel value of the seventh target element, assigning a new label value to the seventh target element; the seventh target element is each element in the texture image matrix;

[0223] A second assigning unit is used for, if the seventh target element is not 0, and there is an eighth target element with the same pixel value as the seventh target element in the 8-neighborhood of the seventh target element, and if each of the eighth target elements has no label value, assigning a new label value to the seventh target element and the eighth target element; if any of the eighth target elements has a label value, assigning the label value to the seventh target element and other eighth target elements without a label value;

[0224] The statistical unit is used to count the element position and the number of elements corresponding to each of the label values.

[0225] In a possible implementation, when the texture feature matrix is ​​a grayscale region size matrix, the calculation unit 404 includes:

[0226] A fifth acquisition subunit is used to acquire a first target element in the grayscale region size matrix, where the first target element is in the i-th row and j-th column of the grayscale region size matrix;

[0227] a sixth acquisition subunit, configured to acquire a target label value having a number of elements j from the label values ​​according to the number of elements corresponding to each of the label values;

[0228] A fourth determining subunit, configured to determine the element position corresponding to the target tag value as a candidate position;

[0229] A screening subunit is used to screen a ninth target pixel with a pixel value of i from the elements corresponding to the candidate positions in the texture image matrix, and determine the position of the ninth target element in the texture image matrix as the influencing position corresponding to the first target element in the texture image matrix.

[0230] In a possible implementation, the medical image is a single-layer medical image or any layer of a multi-layer medical image.

[0231] In addition, an embodiment of the present application also provides a device for processing medical image texture features, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a method for processing medical image texture features as described in any of the above embodiments.

[0232] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a terminal device, the terminal device executes the method for processing medical image texture features as described in any of the above embodiments.

[0233] The embodiment of the present application provides a device and apparatus for processing texture features of medical images, which divides the acquired medical images into a background area and a target area. The pixel values ​​of the background area are set to zero, and the pixel values ​​of the target area are retained, thereby generating a texture image matrix. The texture image matrix is ​​used to represent the texture image. A texture feature matrix is ​​generated according to the texture image matrix based on the image group. The first target element in the texture feature matrix is ​​obtained, the influence position corresponding to the first target element in the texture image matrix is ​​calculated, and then the influence position is mapped to the medical image for display. In this way, since the texture feature matrix can reflect the texture changes in the texture image, the first target element in the texture feature matrix is ​​formed by the corresponding influence position in the texture image matrix. Therefore, mapping the influence position corresponding to the first target element in the texture image matrix to the medical image can realize the visual linkage between the texture feature and the medical image, and more intuitively display the lesion texture information corresponding to the first target element in the medical image.

[0234] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0235] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0236] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0237] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0238] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for processing texture features of medical images, characterized in that: The method comprises: Divide the medical image into background area and target area; The pixel values ​​of the background area are set to zero, the pixel values ​​of the target area are retained, and a texture image matrix is ​​generated; Generate a texture feature matrix according to the texture image matrix; Obtaining a first target element in the texture feature matrix, and calculating an impact position corresponding to the first target element in the texture image matrix; Mapping the impact position to the medical image for display; When the texture feature matrix is ​​a gray level co-occurrence matrix, obtaining a first target element in the texture feature matrix and calculating an influence position corresponding to the first target element in the texture image matrix includes: Obtain a first target element in the gray level co-occurrence matrix, where the first target element is in the i-th row and j-th column of the gray level co-occurrence matrix; Acquire first generation parameters for generating the gray level co-occurrence matrix, where the first generation parameters include a first distance and a first direction; Determine a first interval parameter and a second interval parameter according to the first generation parameter; A second target element of the texture image matrix is ​​selected. If the second target element is i and the third target element is j, the positions of the second target element and the third target element in the texture image matrix are determined as the influence positions corresponding to the first target element in the texture image matrix; the number of rows of the third target element in the texture image matrix is ​​the number of rows of the second target element in the texture image matrix plus the first interval parameter, and the number of columns of the third target element in the texture image matrix is ​​the number of columns of the second target element in the texture image matrix plus the second interval parameter; Repeat the step of obtaining the second target element of the texture image matrix, and if the second target element is i and the third target element is j, determine the positions of the second target element and the third target element in the texture image matrix as the influence positions corresponding to the first target element in the texture image matrix, until all elements in the texture image matrix are selected; A second target element of the texture image matrix is ​​selected, and if the second target element is i and the fourth target element is j, the positions of the second target element and the fourth target element in the texture image matrix are determined as the influence positions corresponding to the first target element in the texture image matrix; the number of rows of the fourth target element in the texture image matrix is ​​the number of rows of the second target element in the texture image matrix minus the first interval parameter, and the number of columns of the fourth target element in the texture image matrix is ​​the number of columns of the second target element in the texture image matrix minus the second interval parameter; Repeat the step of obtaining the second target element of the texture image matrix. If the second target element is i and the fourth target element is j, determine the positions of the second target element and the fourth target element in the texture image matrix as the influencing positions corresponding to the first target element in the texture image matrix until all elements in the texture image matrix are selected.

2. The method according to claim 1, characterized in that The medical image is a single-layer medical image or any layer of a multi-layer medical image.

3. A method for processing texture features of medical images, characterized in that: The method comprises: Divide the medical image into background area and target area; The pixel values ​​of the background area are set to zero, the pixel values ​​of the target area are retained, and a texture image matrix is ​​generated; Generate a texture feature matrix according to the texture image matrix; Obtaining a first target element in the texture feature matrix, and calculating an impact position corresponding to the first target element in the texture image matrix; Mapping the impact position to the medical image for display; When the texture feature matrix is ​​a grayscale run-length matrix, obtaining a first target element in the texture feature matrix and calculating an influence position corresponding to the first target element in the texture image matrix include: Obtain a first target element in the grayscale run matrix, where the first target element is in the i-th row and j-th column of the grayscale run matrix; Acquire a second generation parameter for generating the grayscale run-length matrix, wherein the second generation parameter includes a second direction; dividing the texture image matrix into a plurality of difference lists according to the second direction; For each of the difference lists, select the fifth target element to the sixth target element in the difference list, where the fifth target element to the sixth target element are j elements in total, and the fifth target element selected for the first time in a difference list is the first element in the difference list; If the fifth target element to the sixth target element are all i and an element after the sixth target element is not i, the positions of the fifth target element to the sixth target element in the texture image matrix are determined as the influence positions corresponding to the first target element in the texture image matrix, and an element after the sixth target element is used as the fifth target element, and the fifth target element to the sixth target element in the difference list are reselected until the fifth target element to the sixth target element cannot be selected in the difference list; If it is not satisfied that the fifth target element to the sixth target element are all i and the element after the sixth target element is not i, take the element after the fifth target element as the fifth target element, and reselect the fifth target element to the sixth target element in the difference list until the fifth target element to the sixth target element cannot be selected in the difference list.

4. The method according to claim 3, characterized in that: The step of dividing the texture image matrix into a plurality of difference lists according to the second direction comprises: When the second direction is 0 degrees, each row of elements in the texture image matrix is ​​respectively formed into a difference list, so as to divide the texture image matrix into a plurality of difference lists; When the second direction is 45 degrees, starting from the first element of each row in the texture image matrix, each element along the upper right 45 degree extension line is respectively formed into a difference list, and starting from each element after the first element of the last row in the texture image matrix, each element along the upper right 45 degree extension line is respectively formed into a difference list, so as to divide the texture image matrix into a plurality of difference lists; When the second direction is 90 degrees, each column element in the texture image matrix is ​​respectively formed into a difference list, so as to divide the texture image matrix into a plurality of difference lists; When the second direction is 135 degrees, starting from the first element of each column in the texture image matrix, each element along the lower right 135 degree extension line is respectively composed of a difference list, and starting from each element after the first element of the first column in the texture image matrix, each element along the lower right 45 degree extension line is respectively composed of a difference list, so as to divide the texture image matrix into multiple difference lists.

5. The method according to claim 3, characterized in that: The medical image is a single-layer medical image or any layer of a multi-layer medical image.

6. A method for processing texture features of medical images, characterized in that: The method comprises: Divide the medical image into background area and target area; The pixel values ​​of the background area are set to zero, the pixel values ​​of the target area are retained, and a texture image matrix is ​​generated; Generate a texture feature matrix according to the texture image matrix; Obtaining a first target element in the texture feature matrix, and calculating an impact position corresponding to the first target element in the texture image matrix; Mapping the impact position to the medical image for display; When the texture feature matrix is ​​a grayscale region size matrix, for the seventh target element in the texture image matrix, if the seventh target element is not 0, and the pixel values ​​of each element in the 8-neighborhood of the seventh target element are different from the pixel value of the seventh target element, a new label value is assigned to the seventh target element; the seventh target element is each element in the texture image matrix; If the seventh target element is not 0, and there is an eighth target element with the same pixel value as the seventh target element in the 8-neighborhood of the seventh target element, if each of the eighth target elements has no label value, assign a new label value to the seventh target element and the eighth target element; if any of the eighth target elements has a label value, assign the label value to the seventh target element and other eighth target elements without a label value; Count the element position and the number of elements corresponding to each of the label values; When the texture feature matrix is ​​a grayscale region size matrix, obtaining a first target element in the texture feature matrix and calculating an impact position corresponding to the first target element in the texture image matrix includes: Obtain a first target element in the grayscale region size matrix, where the first target element is in the i-th row and j-th column of the grayscale region size matrix; According to the number of elements corresponding to each of the label values, a target label value with a number of elements being j is obtained from the label values; Determine the element position corresponding to the target label value as a candidate position; A ninth target element having a pixel value of i is selected from the elements corresponding to the candidate positions in the texture image matrix, and the position of the ninth target element in the texture image matrix is ​​determined as the influence position corresponding to the first target element in the texture image matrix.

7. The method according to claim 6, characterized in that The medical image is a single-layer medical image or any layer of a multi-layer medical image.

8. A device for processing texture features of medical images, characterized in that: The device comprises: A division unit, used for dividing the medical image into a background area and a target area; A first generating unit, used for setting the pixel values ​​of the background area to zero, retaining the pixel values ​​of the target area, and generating a texture image matrix; A second generating unit, used for generating a texture feature matrix according to the texture image matrix; A calculation unit, used for acquiring a first target element in the texture feature matrix, and calculating an impact position corresponding to the first target element in the texture image matrix; A display unit, used for mapping the impact position into the medical image for display; When the texture feature matrix is ​​a gray level co-occurrence matrix, the calculation unit includes: A first acquisition subunit is used to acquire a first target element in the gray level co-occurrence matrix, where the first target element is in the i-th row and j-th column of the gray level co-occurrence matrix; A second acquisition subunit is used to acquire first generation parameters for generating the gray level co-occurrence matrix, where the first generation parameters include a first distance and a first direction; A first determining subunit, configured to determine a first interval parameter and a second interval parameter according to the first generating parameter; A first selection subunit is used to select a second target element of the texture image matrix, and if the second target element is i and the third target element is j, the positions of the second target element and the third target element in the texture image matrix are determined as the influence positions corresponding to the first target element in the texture image matrix; the number of rows of the third target element in the texture image matrix is ​​the number of rows of the second target element in the texture image matrix plus the first interval parameter, and the number of columns of the third target element in the texture image matrix is ​​the number of columns of the second target element in the texture image matrix plus the second interval parameter; a first execution subunit, configured to repeatedly execute the step of obtaining a second target element of the texture image matrix, and if the second target element is i and the third target element is j, determining positions of the second target element and the third target element in the texture image matrix as influence positions corresponding to the first target element in the texture image matrix, until all elements in the texture image matrix are selected; a second selection subunit, for selecting a second target element of the texture image matrix, and if the second target element is i and the fourth target element is j, determining the positions of the second target element and the fourth target element in the texture image matrix as the influence positions corresponding to the first target element in the texture image matrix; the number of rows of the fourth target element in the texture image matrix is ​​the number of rows of the second target element in the texture image matrix minus the first interval parameter, and the number of columns of the fourth target element in the texture image matrix is ​​the number of columns of the second target element in the texture image matrix minus the second interval parameter; A second execution subunit is used to repeatedly execute the step of obtaining the second target element of the texture image matrix, and if the second target element is i and the fourth target element is j, determine the positions of the second target element and the fourth target element in the texture image matrix as the influencing positions corresponding to the first target element in the texture image matrix, until all elements in the texture image matrix are selected.

9. A device for processing texture features of medical images, characterized in that: The device comprises: A division unit, used for dividing the medical image into a background area and a target area; A first generating unit, used for setting the pixel values ​​of the background area to zero, retaining the pixel values ​​of the target area, and generating a texture image matrix; A second generating unit, used for generating a texture feature matrix according to the texture image matrix; A calculation unit, used for acquiring a first target element in the texture feature matrix, and calculating an impact position corresponding to the first target element in the texture image matrix; A display unit, used for mapping the impact position into the medical image for display; When the texture feature matrix is ​​a grayscale run-length matrix, the calculation unit includes: A third acquisition subunit is used to acquire a first target element in the grayscale run matrix, where the first target element is in the i-th row and j-th column of the grayscale run matrix; A fourth acquisition subunit is used to acquire a second generation parameter for generating the grayscale run matrix, wherein the second generation parameter includes a second direction; a first division subunit, configured to divide the texture image matrix into a plurality of difference lists according to the second direction; a third selection subunit, configured to select, for each of the difference lists, a fifth target element to a sixth target element in the difference list, wherein the fifth target element to the sixth target element are j elements in total, and the fifth target element selected for the first time in a difference list is the first element in the difference list; a second determining subunit, for determining positions of the fifth target element to the sixth target element in the texture image matrix as influence positions corresponding to the first target element in the texture image matrix if the fifth target element to the sixth target element are all i and an element after the sixth target element is not i, and taking an element after the sixth target element as the fifth target element, and reselecting the fifth target element to the sixth target element in the difference list until the fifth target element to the sixth target element cannot be selected in the difference list; The third determination subunit is used to, if the condition that the fifth target element to the sixth target element are all i and the element after the sixth target element is not i, take the element after the fifth target element as the fifth target element, and reselect the fifth target element to the sixth target element in the differential list until the fifth target element to the sixth target element cannot be selected in the differential list.

10. A device for processing texture features of medical images, characterized in that: The device comprises: A division unit, used for dividing the medical image into a background area and a target area; A first generating unit, used for setting the pixel values ​​of the background area to zero, retaining the pixel values ​​of the target area, and generating a texture image matrix; A second generating unit, used for generating a texture feature matrix according to the texture image matrix; A calculation unit, used for acquiring a first target element in the texture feature matrix, and calculating an impact position corresponding to the first target element in the texture image matrix; A display unit, used for mapping the impact position into the medical image for display; When the texture feature matrix is ​​a grayscale region size matrix, the device further comprises: a first assigning unit, for a seventh target element in the texture image matrix, if the seventh target element is not 0 and the pixel values ​​of the elements in the 8-neighborhood of the seventh target element are different from the pixel value of the seventh target element, assigning a new label value to the seventh target element; the seventh target element is each element in the texture image matrix; A second assigning unit is used for, if the seventh target element is not 0, and there is an eighth target element with the same pixel value as the seventh target element in the 8-neighborhood of the seventh target element, and if each of the eighth target elements has no label value, assigning a new label value to the seventh target element and the eighth target element; if any of the eighth target elements has a label value, assigning the label value to the seventh target element and other eighth target elements without a label value; A counting unit, used to count the element position and the number of elements corresponding to each of the label values; When the texture feature matrix is ​​a grayscale region size matrix, the calculation unit includes: A fifth acquisition subunit is used to acquire a first target element in the grayscale region size matrix, where the first target element is in the i-th row and j-th column of the grayscale region size matrix; a sixth acquisition subunit, configured to acquire a target label value having a j-number of elements from the label values ​​according to the number of elements corresponding to each label value; A fourth determining subunit, configured to determine the element position corresponding to the target tag value as a candidate position; A screening subunit is used to screen a ninth target element with a pixel value of i from the elements corresponding to the candidate positions in the texture image matrix, and determine the position of the ninth target element in the texture image matrix as an impact position corresponding to the first target element in the texture image matrix.

11. A device for processing texture features of medical images, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for processing medical image texture features as described in any one of claims 1 to 7 is implemented.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the method for processing medical image texture features as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Cell distribution state analysis method and device, computer equipment and storage medium

    CN112330671A