An intelligent processing system for X-ray films used in animal husbandry and veterinary medicine
By using the combined technology of data acquisition, processing and enhancement modules in animal husbandry and veterinary medicine, the problem of poor image processing effects of traditional X-ray films has been solved, and efficient image quality improvement and diagnostic accuracy have been achieved.
Patent Information
- Application Number
- CN202411154347.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-08-22
AI Technical Summary
Traditional X-ray image processing methods are not effective in animal husbandry and veterinary medicine, especially the poor imaging quality caused by light conditions and animal movements. Traditional clustering algorithms are computationally intensive and inefficient, making it difficult to accurately diagnose animal diseases.
The data acquisition module is used to obtain the The representation coefficient and shrinkage coefficient are used to filter the bone area, and finally the data enhancement module is used for piecewise linear enhancement to highlight the bone area.
It improves the image quality and diagnostic accuracy of X-ray films, reduces the workload of veterinarians, improves diagnostic efficiency, and significantly improves the contrast and clarity of images.
Smart Images

Figure CN118674667B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of data processing, and in particular to an intelligent processing system for X-ray films used in animal husbandry and veterinary medicine. Background Art
[0002] X-rays can form images of the human body on the screen or film. On the one hand, this is because X-rays have characteristics such as penetrability, fluorescence effect, and photographic effect. On the other hand, human tissues differ in density and thickness. Due to these differences, when X-rays pass through different tissue structures, they will be absorbed to varying degrees, resulting in different amounts of X-rays reaching the screen or film. Therefore, a black-and-white image with a clear contrast is formed on the screen or film. Similar to humans, animals can also suffer from various diseases. When veterinarians examine animals, X-rays are also an important basis for medical diagnosis. However, when taking X-rays, due to factors such as lighting conditions and the animal's movement, the image quality of the X-rays is often poor. At this time, the veterinarian can only rely on observation and identification with the naked eye, which brings great trouble to the veterinarian's diagnosis.
[0003] In traditional methods, K-Means clustering algorithm or hierarchical clustering algorithm is usually used to process X-ray images in order to provide more information for doctors' reference. However, due to the large number of similar pixels in X-ray images, traditional clustering methods are not effective. In addition, X-ray images contain a large amount of data, and hierarchical clustering algorithms are computationally intensive, which is inefficient and resource intensive in practical applications. Summary of the invention
[0004] The invention provides an intelligent processing system for X-ray films used in animal husbandry and veterinary medicine to solve the existing problems.
[0005] The intelligent processing system for animal husbandry and veterinary X-ray films of the present invention adopts the following technical solutions:
[0006] The present invention proposes an intelligent processing system for animal husbandry and veterinary X-ray films, which includes the following modules:
[0007] Data acquisition module: used to obtain X-ray images and convert them into grayscale matrices;
[0008] Data processing module: used to obtain a grayscale histogram after equalization according to the grayscale matrix of the X-ray image; obtain the number of initial centroid points by analyzing the change of amplitude in the equalized grayscale histogram, and then obtain several cluster centers; obtain the characteristic distance between each point in the grayscale matrix and each cluster center according to the grayscale value of each point in the grayscale matrix and the Euclidean distance between each point and each cluster center; perform clustering in combination with the cluster centers to obtain several cluster clusters;
[0009] Obtaining a first number of initial representative points for each cluster, and obtaining a number of reference points for each initial representative point based on a range constructed by the first length; obtaining a representative coefficient of each initial representative point according to a gray value difference of the reference point of each initial representative point, and further obtaining a number of preferred representative points for each cluster;
[0010] According to the gray value and representative coefficient of each preferred representative point of each cluster, the initial shrinkage coefficient of each cluster is obtained, the cluster belonging to the bone area is screened and corrected, and the corrected shrinkage coefficient of each cluster belonging to the bone area is obtained; the shrinkage distance of each preferred representative point is obtained by combining the Euclidean distance between each preferred representative point and the cluster center of the cluster to which it belongs, and then the representative point set after shrinkage of each cluster belonging to the bone area is obtained; the final clustering result is obtained by re-clustering, and several bone clusters are obtained;
[0011] Data enhancement module: Based on the bone clustering clusters, the final clustering results are piecewise linearly enhanced to obtain a bone-enhanced X-ray image.
[0012] Furthermore, the method of obtaining the number of initial centroid points by analyzing the change of amplitude in the equalized grayscale histogram and then obtaining a number of cluster centers includes the following specific methods:
[0013] The number of peaks is obtained by combining the derivative peak finding method with the grayscale histogram and the grayscale histogram after equalization, which is used as the number of initial centroid points.
[0014] Taking the initial number of centroid points as the K value, the grayscale matrix is subjected to the K-Means clustering algorithm to obtain several cluster centers.
[0015] Furthermore, the characteristic distance between each point in the grayscale matrix and each cluster center is obtained according to the grayscale value of each point in the grayscale matrix and the Euclidean distance between each point and each cluster center, including the specific method of:
[0016]
[0017] in, Represents a point in the grayscale matrix With The characteristic distance of each cluster center; Represents a point in the grayscale matrix The gray value of Indicates The gray value of the cluster center; Represents a point in the grayscale matrix With The Euclidean distance between cluster centers; Represents the normalization function.
[0018] Furthermore, the method of obtaining a plurality of clusters includes:
[0019] The number of initial centroid points is taken as the K value, and the characteristic distance between each point in the gray matrix and each cluster center is taken as the distance. Clustering is performed through the K-Means clustering algorithm to obtain K clusters.
[0020] Furthermore, the method of obtaining a first number of initial representative points for each cluster and obtaining a plurality of reference points for each initial representative point based on the range constructed by the first length includes the following specific methods:
[0021] Randomly obtain a first number of uniformly distributed points in each cluster as initial representative points of each cluster;
[0022] A range with a radius of the first length is constructed with each initial representative point as the center point, and the remaining points in the range are recorded as reference points of each initial representative point.
[0023] Furthermore, the representative coefficient of each initial representative point is obtained according to the gray value difference of the reference point of each initial representative point, and the corresponding specific calculation formula is:
[0024]
[0025] in, Indicates The first The representative coefficient of the initial representative point; Indicates The first The standard deviation of the gray values of all reference points of the initial representative points; Indicates The first The first representative point Gray value of reference points; Indicates The first The mean gray value of all reference points of the initial representative points; represents the absolute value function; Represents the normalization function.
[0026] Furthermore, the specific method of obtaining several preferred representative points of each cluster includes:
[0027] The initial representative points greater than the representative threshold are recorded as preferred representative points. For the initial representative points less than or equal to the representative threshold, the difference between the grayscale value of each point in the reference point of the initial representative point and the grayscale mean within the range is calculated. The point with the smallest difference is taken as the corrected new representative point, and the representative coefficient is recalculated until all the preferred representative points are obtained.
[0028] Furthermore, the initial shrinkage coefficient of each cluster is obtained according to the gray value and representative coefficient of each preferred representative point of each cluster, and the corresponding specific calculation formula is:
[0029]
[0030] in, Indicates The initial shrinkage factor of the clusters; Indicates The first Gray value of the optimal representative point; Indicates The mean representative coefficient of all the selected representative points of the cluster; Represents the normalization function.
[0031] Furthermore, the corrected shrinkage coefficient of each cluster belonging to the bone region is obtained, and the corresponding specific calculation formula is:
[0032]
[0033] in, Indicates The corrected shrinkage coefficient of the clusters; Indicates The minimum gray value of all the selected representative points in the cluster; Indicates The initial shrinkage factor of the clusters; Represents the base 2 logarithmic function.
[0034] Furthermore, the specific calculation formula corresponding to the shrinkage distance of each preferred representative point is as follows:
[0035]
[0036] in, Indicates The first The shrinkage distance of the optimal representative points; Indicates The corrected shrinkage coefficient of the clusters; Indicates The first The preferred representative point and The Euclidean distance between the cluster centers of the clusters.
[0037] The beneficial effects of the technical solution of the present invention are:
[0038] Through a series of optimization algorithms, the X-ray images for animal husbandry and veterinary medicine are processed in a refined manner, which improves the image quality and diagnostic accuracy, reduces the workload of veterinarians, and improves the diagnostic efficiency. Specifically, the data acquisition module obtains X-ray images and converts them into grayscale matrices to ensure that the basic image data can be used by subsequent processing modules. The data processing module uses the derivative peak search method to accurately determine the number of initial centroid points by equalizing the grayscale histogram; based on the K-Means clustering algorithm, the image is clustered using grayscale values and Euclidean distance to achieve accurate image area division. Subsequently, the initial representative points and their reference points are randomly obtained, the representative coefficients are calculated, and the preferred representative points are screened out to ensure the accuracy of clustering; then the initial and corrected shrinkage coefficients are calculated based on the grayscale values and representative coefficients of the preferred representative points to further optimize the clustering results; the accurate bone area is obtained by screening the clustering clusters in the bone area and correcting them: Finally, the data enhancement module performs piecewise linear enhancement on the final clustering results based on the bone clustering clusters, highlights the bone area, improves the contrast and clarity of the image, and facilitates the veterinarian to make a diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 This is a module flow chart of an intelligent processing system for animal husbandry and veterinary X-ray films of the present invention;
[0041] Figure 2 It is a schematic diagram of grayscale histogram;
[0042] Figure 3 Schematic diagram of the grayscale histogram after equalization. DETAILED DESCRIPTION
[0043] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation, structure, features and effects of an intelligent processing system for animal husbandry and veterinary X-ray films proposed by the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0044] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0045] The specific scheme of the intelligent processing system for animal husbandry and veterinary X-ray films provided by the present invention is described in detail below with reference to the accompanying drawings.
[0046] See also Figure 1 , which shows a module flow chart of an intelligent processing system for animal husbandry and veterinary X-ray films provided by an embodiment of the present invention, the system includes the following modules:
[0047] Module 101: Data acquisition module, which acquires X-ray images and converts them into grayscale matrices.
[0048] The purpose of this embodiment is to analyze and process the poor processing effect of traditional clustering algorithms on X-ray films, so it is necessary to collect X-ray images of the fracture area of the animal and perform grayscale processing.
[0049] It should be noted that this embodiment uses X-ray images of the hind limb pelvis in canine fracture cases as the research object. The characteristics of this image are that the grayscale distinction between muscle and organ tissue and bone tissue is not obvious, and the bone area is not easy to distinguish with the naked eye.
[0050] Specifically, an X-ray image of the hind limb pelvis in a canine fracture case is obtained, and the X-ray image is grayed to obtain a corresponding grayed image; the grayscale value of each pixel in the grayed image is combined into a grayscale matrix, that is, the grayscale values are arranged according to the position of the pixel points and combined into a matrix form to obtain a grayscale matrix.
[0051] Module 102: Data processing module.
[0052] It should be noted that the essence of X-ray imaging is that when X-rays penetrate low-density tissues, less is absorbed and more X-rays remain, making the X-ray film more sensitive and reducing more metallic silver through photochemical reactions, so the X-ray film appears as a black shadow, while the high-density tissue is just the opposite. Since bones, muscles, organs and cavities in the body overlap and wrap each other in three-dimensional space, their shapes are different and their thicknesses are inconsistent. X-rays are two-dimensional projections of three-dimensional objects. Combined with the images in this example, there is a considerable degree of grayscale overlap between muscle tissue and bones and muscle tissue. Therefore, it is difficult to completely and accurately divide the various body parts in the X-ray using traditional image processing methods such as threshold segmentation and edge detection. Clustering analysis algorithms based on similarity features can better accomplish this task. According to the image characteristics of X-rays, preliminary clustering results are obtained through traditional clustering algorithms. Based on the preliminary clustering results, specific feature analysis is performed on each cluster, and finally bones and suspected fracture areas are divided, making X-rays less difficult to observe, thereby assisting veterinarians in their judgment and reducing the difficulty of veterinary work.
[0053] (1) Based on the grayscale matrix of the X-ray image, the grayscale histogram after equalization is obtained; by analyzing the change of amplitude in the equalized grayscale histogram, the number of initial centroid points is obtained, and then several cluster centers are obtained; based on the grayscale value of each point in the grayscale matrix and the Euclidean distance between each point and each cluster center, the characteristic distance between each point in the grayscale matrix and each cluster center is obtained; clustering is performed based on the cluster centers to obtain several clusters.
[0054] It should be noted that the X-ray image contains organs, muscle tissue, bones and other parts, and the bones include pelvic leg bones with more prominent gray values and spine and ribs with gray values similar to the background; so the number of clusters K required for clustering should be appropriate, that is, sufficient to distinguish the above regions, and not too much to cause a large amount of calculation, so the size of K can be determined by using the gray histogram. In the original X-ray image, the gray values within the bones, muscle tissues and other parts are similar, and the gray histogram can clearly show the relationship between the number of pixels under each gray value, so the number of peaks in the histogram is determined, and the number of centroids that need to be divided is determined based on this.
[0055] Specifically, according to the grayscale matrix of the X-ray image, the corresponding grayscale histogram is obtained, such as Figure 2 As shown in, and the grayscale histogram after equalization, as Figure 3 As shown, the number of peaks is obtained by combining the derivative peak finding method with the grayscale histogram and the grayscale histogram after equalization, and is used as the number of initial centroid points. It should be noted that the derivative peak finding method is a common and well-known algorithm, and the specific steps are not repeated here.
[0056] It should be noted that for X-ray images, the characteristics of bones and organ pixels in the grayscale image are not only similar grayscale values within the class, but also their overall spatial aggregation presents a unique shape. Therefore, the pixel allocation rule based on the grayscale value difference and distance between any point in the grayscale matrix and any cluster center can be optimized to obtain the characteristic distance between any point in the grayscale matrix and any cluster center.
[0057] Specifically, the number of initial centroid points is taken as the K value, and the gray matrix is clustered by the K-Means algorithm to obtain several cluster centers; then the specific calculation formula for the characteristic distance between each point in the gray matrix and each cluster center is:
[0058]
[0059] in, Represents a point in the grayscale matrix With The characteristic distance of each cluster center; Represents a point in the grayscale matrix The gray value of Indicates The gray value of the cluster center; Represents a point in the grayscale matrix With The Euclidean distance between cluster centers; Represents a linear normalization function. The normalized object is the Euclidean distance between each point in the gray matrix and each cluster center.
[0060] It should be noted that Represents a point in the grayscale matrix With The gray value difference of the cluster centers is smaller, indicating that the point in the gray matrix With The closer the grayscale of the cluster centers are, the more likely the points in the grayscale matrix are pixels belonging to the same bone or organ, etc. Represents the point in the gray matrix With The Euclidean distance of the cluster centers Make corrections, Represents the Euclidean distance between two points. The larger the value, the farther the distance between the two pixels is. With The smaller the probability that the cluster centers belong to the same cluster, 0.5 means The value is enlarged and its value range is modified to (0.5, 1.5).
[0061] Furthermore, the number of initial centroid points is used as the K value, and the characteristic distance between each point in the gray matrix and each cluster center is used as the distance. Clustering is performed through the K-Means clustering algorithm to obtain K clusters.
[0062] (2) Obtain a first number of initial representative points for each cluster, and obtain a number of reference points for each initial representative point based on a range constructed with a first length; obtain a representative coefficient of each initial representative point based on a grayscale value difference of the reference point of each initial representative point, and further obtain a number of preferred representative points for each cluster.
[0063] It should be noted that the traditional agglomerative hierarchical clustering algorithm uses all points to iterate from bottom to top and find the center point to define a cluster. There is no global objective function like K-means, so there is no problem of selecting the initial point. However, due to its high computational complexity, each iteration needs to calculate the distances between all clusters from bottom to top. In addition, due to the complex morphology of objects such as bones and organs in animals in X-rays, the accuracy of using a single center point to define the entire cluster cannot be guaranteed. Therefore, the use of all points or a center point plus distance to represent a cluster is abandoned. Instead, a fixed number of points that can reflect the characteristics of each organ and tissue in the example X-ray are selected in each cluster as the representative points of the cluster, and appropriate shrinkage coefficients are selected for these representative points to shrink them to make them closer to the center of the cluster. After being processed by this clustering method, the distance between the two clusters is defined as the distance between the closest representative points in the two clusters. This can make the shape of the cluster more consistent with the unique shape of different tissues and organs and reduce the impact of noise on clustering.
[0064] It should be further explained that the structure of bones can be roughly divided into periosteum, bone and bone marrow, among which the density of periosteum and bone is greater than that of bone marrow, so in X-rays, the gray value of the edge area of the bone is slightly larger than that of the central area, that is, the edge connected domain formed by the periosteal bone area with a larger gray value can represent the shape characteristics of a bone. Therefore, when selecting representative points, the representative points should be able to represent the gray characteristics of the area where they are located as much as possible.
[0065] Specifically, the first number preset in this embodiment is 10 and the first length is 5. This is used as an example for description. Other implementations may be set to other values. A first number of uniformly distributed points are randomly obtained in each cluster cluster as the initial representative points of each cluster cluster. A range with a radius of the first length is constructed with each initial representative point as the center point, and the remaining points in the range are recorded as reference points of each initial representative point. It should be noted that the random acquisition method of the initial representative point is a common existing algorithm, and the specific steps are not repeated here. According to the gray value of the reference point of each initial representative point, the representative coefficient of each initial representative point is obtained, and the specific calculation formula is:
[0066]
[0067] in, Indicates The first The representative coefficient of the initial representative point; Indicates The first The standard deviation of the gray values of all reference points of the initial representative points; Indicates The first The first representative point Gray value of reference points; Indicates The first The mean gray value of all reference points of the initial representative points; represents the absolute value function; Represents a linear normalization function, and the normalized object is all the initial representative points .
[0068] It should be noted that Indicates The first The representative coefficient of the initial representative point. The larger the representative coefficient, the more the initial representative point can represent the cluster. Indicates The first The first representative point The absolute value of the difference between the grayscale value of a reference point and the average grayscale value of all reference points of the initial representative point. The smaller the value, the closer the grayscale value of the reference point is to the average grayscale of the area, and the more representative the initial representative point is.
[0069] Furthermore, the preset representative threshold of this embodiment is 0.7, which is used as an example for description. Other values may be set in other implementations. The initial representative points greater than the representative threshold are recorded as preferred representative points. For the initial representative points less than or equal to the representative threshold, the difference (absolute value of the difference) between the grayscale value of each point in the reference point of the initial representative point and the grayscale mean in the range is calculated, and the point with the smallest difference is used as the corrected new representative point, and the representative coefficient is recalculated until all the preferred representative points are obtained, that is, each cluster obtains the first number of preferred representative points.
[0070] (3) According to the gray value and representative coefficient of each preferred representative point of each cluster, the initial shrinkage coefficient of each cluster is obtained, and the clusters belonging to the bone area are screened and corrected to obtain the corrected shrinkage coefficient of each cluster belonging to the bone area; the shrinkage distance of each preferred representative point is obtained by combining the Euclidean distance between each preferred representative point and the cluster center of the cluster to which it belongs, and then the representative point set after shrinkage of each cluster belonging to the bone area is obtained; the final clustering result is obtained by re-clustering, and several bone clusters are obtained.
[0071] It should be noted that different choices of shrinkage coefficients have different effects on clustering results. When the shrinkage coefficient tends to 0, all representative points converge to the center of the cluster, and the algorithm becomes a clustering algorithm based on center point determination of clusters, such as the K-Means clustering algorithm; when the shrinkage coefficient tends to 1, the representative points do not shrink at all, and the algorithm becomes a fully connected clustering algorithm such as the agglomerative hierarchical clustering algorithm; therefore, for clusters of suspected bone areas, the shrinkage amplitude should be relatively larger, and for clusters of other organ parts and muscle combinations, the shrinkage amplitude should be relatively small or even no shrinkage; secondly, due to the huge differences in the shapes and structures of different bones in animals, for example, the limb bones, skull, and pelvis are completely different in shape, it is difficult to divide the clusters based on appearance.
[0072] It should be further explained that in the X-ray film, the cluster mapping corresponding to the bone area should appear as a "whiter" area in the original image, that is, if the grayscale of the pixels in the cluster is relatively large, then the cluster is more likely to correspond to the bone area; secondly, because muscle tissue has more overlaps in X-ray films and has more layered textures inside, the grayscale distribution of the pixels belonging to the bones is more uniform than that of the muscle tissue area, so the initial shrinkage coefficient corresponding to each cluster can be calculated based on this.
[0073] Specifically, the specific calculation formula for the initial shrinkage coefficient corresponding to each cluster is:
[0074]
[0075] in, Indicates The initial shrinkage factor of the clusters; Indicates The first Gray value of the optimal representative point; Indicates The mean representative coefficient of all the selected representative points of the cluster; Represents a linear normalization function, and the normalized object is all clusters .
[0076] It should be noted that Represents the mean gray value of all the preferred representative points in a cluster. Subtracting this value from 255 indicates how close the mean is to the maximum gray value. The smaller the value, the greater the average gray value of the cluster, and the more likely it is to be the cluster corresponding to the bone region. It indicates that the grayscale distribution in the bone area is relatively uniform. On the contrary, the grayscale distribution in other areas, such as muscle texture, is relatively chaotic. The larger the value, the more uniform the grayscale distribution in the cluster, and the more likely it is to be the cluster corresponding to the bone area.
[0077] It should be noted that when radiologists look at X-rays, the main purpose is to observe which bone parts in the X-rays have lesions, such as fractures, bone cracks, and necrosis. Therefore, correspondingly, the differences between different bone regions can be analyzed in clustering, suspected abnormal bone regions can be identified, and their shrinkage coefficients can be corrected so that the diseased bones can be more prominently displayed later.
[0078] Specifically, the preset shrinkage threshold in this embodiment is 0.4, which is used as an example for description. Other implementations may be set to other values. When the initial shrinkage coefficient of any cluster is less than the shrinkage threshold, the cluster is a cluster belonging to the bone region, and the cluster is corrected. The specific calculation formula for correcting the initial shrinkage coefficient is:
[0079]
[0080] in, Indicates The corrected shrinkage coefficient of the clusters; Indicates The minimum gray value of all the selected representative points in the cluster; Indicates The initial shrinkage factor of the clusters; Represents the base 2 logarithmic function.
[0081] Furthermore, according to the corrected shrinkage coefficient, the shrinkage distance of each preferred representative point can be obtained, and the specific calculation formula of the shrinkage distance is:
[0082]
[0083] in, Indicates The first The shrinkage distance of the optimal representative points; Indicates The corrected shrinkage coefficient of the clusters; Indicates The first The preferred representative point and The Euclidean distance between the cluster centers of the clusters.
[0084] Furthermore, each preferred representative point in each cluster is moved toward the center point of the cluster by a corresponding shrinkage distance to obtain a shrunken representative point set; and each cluster is re-clustered according to the shrunken representative point set to obtain a final clustering result, wherein shrinking and re-clustering some clusters based on the representative point set is an existing method and will not be repeated in this embodiment. The cluster corresponding to the cluster belonging to the bone area in the final clustering result is obtained and recorded as a bone cluster.
[0085] Module 103: A data enhancement module, which performs piecewise linear enhancement on the final clustering result based on the bone clustering clusters to obtain a bone-enhanced X-ray image.
[0086] It should be noted that when veterinarians analyze and diagnose X-rays, the bones in the X-rays are the main analysis targets. Therefore, when enhancing the X-ray images, the entire image should not be enhanced, but the targets of interest should be highlighted. Therefore, different clusters divided by clustering can be enhanced piecewise linearly.
[0087] Specifically, the preset enhancement threshold of this embodiment is 0.2, which is used as an example for description. Other implementations may be set to other values; the bone clustering cluster whose shrinkage coefficient corresponding to the clustering cluster belonging to the bone is less than the enhancement threshold is recorded as the clustering cluster where the diseased bone is located, and the grayscale interval consisting of the maximum grayscale value and the minimum grayscale value in the preferred representative point of the clustering cluster where each diseased bone is located is recorded as the stretching interval of the clustering cluster, and the grayscale values of the points of the clustering cluster are linearly transformed based on the stretching interval of the clustering cluster; the grayscale values of the points in the bone clustering cluster that is not the clustering cluster where the diseased bone is located are subjected to conventional grayscale linear transformation, and the points in the clustering cluster that is not the bone clustering cluster in the final clustering result are not subjected to grayscale linear transformation; the corresponding image after all points in the grayscale matrix are processed is used as the enhanced X-ray image, thereby completing the segmented enhancement of the X-ray image.
[0088] At this point, this embodiment is completed.
[0089] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An intelligent processing system for animal husbandry and veterinary X-ray films, characterized in that: The system includes the following modules: Data acquisition module: used to obtain X-ray images and convert them into grayscale matrices; Data processing module: used to obtain a balanced grayscale histogram according to the grayscale matrix of the X-ray image; By analyzing the change of amplitude in the equalized grayscale histogram, the number of initial centroid points is obtained, and then several cluster centers are obtained; according to the grayscale value of each point in the grayscale matrix and the Euclidean distance between each point and each cluster center, the characteristic distance between each point in the grayscale matrix and each cluster center is obtained; clustering is performed in combination with the cluster centers to obtain several cluster clusters; Obtaining a first number of initial representative points for each cluster, and obtaining a number of reference points for each initial representative point based on a range constructed by the first length; obtaining a representative coefficient of each initial representative point according to a gray value difference of the reference point of each initial representative point, and further obtaining a number of preferred representative points for each cluster; According to the gray value and representative coefficient of each preferred representative point of each cluster, the initial shrinkage coefficient of each cluster is obtained, the clusters belonging to the bone area are screened and corrected, and the corrected shrinkage coefficient of each cluster belonging to the bone area is obtained; Combining the Euclidean distance between each preferred representative point and the cluster center of the cluster to which it belongs, the contraction distance of each preferred representative point is obtained, and then the contracted representative point set of each cluster belonging to the skeleton area is obtained; Re-clustering to get the final clustering result and obtain several skeleton clusters; Data enhancement module: based on the bone clustering clusters, the final clustering results are piecewise linearly enhanced to obtain the bone-enhanced X-ray image; The representative coefficient of each initial representative point is obtained according to the gray value difference of the reference point of each initial representative point, and the corresponding specific calculation formula is: in, Indicates The first The representative coefficient of the initial representative points; Indicates The first The standard deviation of the gray values of all reference points of the initial representative points; Indicates The first The first representative point Gray value of reference points; Indicates The first The mean gray value of all reference points of the initial representative points; represents the absolute value function; represents the normalization function; According to the gray value and representative coefficient of each preferred representative point of each cluster, the initial shrinkage coefficient of each cluster is obtained, and the corresponding specific calculation formula is: in, Indicates The initial shrinkage factor of the clusters; Indicates The first Gray value of the optimal representative point; Indicates The mean representative coefficient of all the selected representative points of the cluster; represents the normalization function; The corrected shrinkage coefficient of each cluster belonging to the bone region is obtained, and the corresponding specific calculation formula is: in, Indicates The corrected shrinkage coefficient of the clusters; Indicates The minimum gray value of all the selected representative points in the cluster; Indicates The initial shrinkage factor of the clusters; Represents the base 2 logarithmic function.
2. According to claim 1, an intelligent processing system for animal husbandry and veterinary X-ray films is characterized in that: The method of obtaining the number of initial centroid points by analyzing the change of amplitude in the equalized grayscale histogram and then obtaining a number of cluster centers includes the following specific methods: The number of peaks is obtained by combining the derivative peak finding method with the grayscale histogram and the grayscale histogram after equalization, which is used as the number of initial centroid points. Taking the initial number of centroid points as the K value, the grayscale matrix is subjected to the K-Means clustering algorithm to obtain several cluster centers.
3. The intelligent processing system for animal husbandry and veterinary X-ray films according to claim 1, characterized in that: The method of obtaining the characteristic distance between each point in the grayscale matrix and each cluster center according to the grayscale value of each point in the grayscale matrix and the Euclidean distance between each point and each cluster center includes the following specific methods: in, Represents a point in the grayscale matrix With The characteristic distance of each cluster center; Represents a point in the grayscale matrix The gray value of Indicates The gray value of the cluster center; Represents a point in the grayscale matrix With The Euclidean distance between cluster centers; Represents the normalization function.
4. The intelligent processing system for animal husbandry and veterinary X-ray films according to claim 1, characterized in that: The specific method of obtaining a plurality of clusters includes: The number of initial centroid points is taken as the K value, and the characteristic distance between each point in the gray matrix and each cluster center is taken as the distance. Clustering is performed through the K-Means clustering algorithm to obtain K clusters.
5. The intelligent processing system for animal husbandry and veterinary X-ray films according to claim 1, characterized in that: The method of obtaining a first number of initial representative points for each cluster and obtaining a number of reference points for each initial representative point based on a range constructed by the first length includes: Randomly obtain a first number of uniformly distributed points in each cluster as initial representative points of each cluster; A range with a radius of the first length is constructed with each initial representative point as the center point, and the remaining points in the range are recorded as reference points of each initial representative point.
6. The intelligent processing system for animal husbandry and veterinary X-ray films according to claim 1, characterized in that: The specific method of obtaining several preferred representative points of each cluster includes: The initial representative points greater than the representative threshold are recorded as preferred representative points. For the initial representative points less than or equal to the representative threshold, the difference between the grayscale value of each point in the reference point of the initial representative point and the grayscale mean within the range is calculated. The point with the smallest difference is taken as the corrected new representative point, and the representative coefficient is recalculated until all the preferred representative points are obtained.
7. The intelligent processing system for animal husbandry and veterinary X-ray films according to claim 1, characterized in that: The specific calculation formula for obtaining the shrinkage distance of each preferred representative point is: in, Indicates The first cluster The shrinkage distance of the optimal representative points; Indicates The corrected shrinkage coefficient of the clusters; Indicates The first cluster The preferred representative point and The Euclidean distance between the cluster centers of the clusters.
Citation Information
Patent Citations
Nuclear magnetic resonance image processing method and system based on convolutional neural network
CN114693561A
Abnormality detection method for space-spectrum combined hyperspectral image based on filtering and low-rank decomposition
CN117456362A
