A method and system for managing medical images

By constructing a separation model and performing binarization processing, combined with patient identity and body part information, rapid classification and encrypted storage of medical images were achieved. This solved the complexity and security and privacy issues of the medical image management system, and improved access speed and matching accuracy.

CN119862296BActive Publication Date: 2025-10-28ZHONGKE LINGXUN (BEIJING) TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510360042.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-10-28
Estimated Expiration
2045-03-25

AI Technical Summary

Technical Problem

Existing medical image management systems are highly complex and specialized, and patients or their families take a long time to obtain medical images, while also posing security and privacy risks.

Method used

By acquiring patient identity information and medical image information, a separation model is constructed to obtain grayscale thresholds, and binarization and contour analysis are performed. Combined with patient age and body part information, image classification and encrypted storage are carried out.

Benefits of technology

It simplifies the observation of medical images, improves access speed and matching accuracy, and protects patient privacy through encrypted storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862296B_ABST
    Figure CN119862296B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for managing medical images, belonging to the field of medical image management; it solves the complex problem of medical image management; specifically as follows: Step S1: Obtain patient identity information, medical image information, and image information of various parts of the human body at different age groups; Step S2: Obtain the patient's medical image, construct a separation model based on the grayscale value of the medical image, and calculate the grayscale value threshold; Step S3: Binarize the image according to the grayscale value threshold to obtain a binarized image; analyze the binarized image to obtain the contour map and the number of feature points of the medical image; Step S4: Compare the contour map and the number of feature points of the medical image with the contour maps and the number of feature points of the images of various parts of the human body at the corresponding age groups to obtain the human body parts of the medical image; encrypt and store the medical image; This invention reduces the difficulty of medical image management by classifying medical images and allocating storage environments for them.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method and system for managing medical images, and pertains to the field of image management. Background Technology

[0002] Existing methods and systems for managing medical images have the following shortcomings:

[0003] Medical images are highly specialized: Most existing medical images are acquired directly by machines, which are highly complex and specialized, and are difficult for people without relevant medical knowledge to understand.

[0004] Delay issue: Medical image data is large in volume, and it takes a long time to search for the required medical images among all medical images. Patients or their families often have to wait for a period of time to obtain medical images.

[0005] Security risks: Medical images often contain patients' private information, so they need to be encrypted and stored to prevent image leaks from causing distress to patients. Summary of the Invention

[0006] In view of the shortcomings of existing technologies, the purpose of this invention is to provide a method and system for managing medical images, aiming to solve the complex problems of medical image management.

[0007] To achieve the above objectives, the present invention provides the following technical solution: A method for managing medical images includes:

[0008] Step S1: Obtain the patient's medical images to form medical image information; obtain the patient's name, age, and ID number to form patient identity information; obtain patient information from the patient identity information and medical image information; obtain image information of different parts of the human body at different ages to obtain comparison information.

[0009] Step S2: Obtain the patient's medical image based on the medical image information in the patient information, obtain the gray value of each pixel from the medical image, construct a separation model based on the gray value of each pixel, obtain the separation value of the image through the separation model, and obtain the gray value threshold based on the separation value of the image;

[0010] Step S3: Binarize the image according to the grayscale threshold; obtain the binarized image of the medical image; analyze the binarized image to obtain the contour map and the number of feature points of the medical image;

[0011] Step S4: Based on the patient's identity information, obtain the patient's age; combine with the comparison information to obtain image information of various parts of the human body for the corresponding age group; combine the contour map and the number of feature points of the medical image to determine the human body parts in the medical image; and encrypt and store the medical image based on the human body parts in the medical image and the patient's name and ID number.

[0012] Furthermore, the specific steps of step S2 are as follows:

[0013] Step S21: Obtain the patient's medical image u based on the patient's medical image information, obtain the image pixels of medical image u, and obtain the total number of pixels G; traverse the medical image, obtain the pixel grayscale value x of each pixel, count the number of pixels with grayscale value x, and obtain the number of pixels y(x).

[0014] Step S22: Construct a separation model using pixel grayscale value x and number of pixels y(x), divide the grayscale value of the medical image into two parts according to the separation model, and obtain the separation value FL of the image through the separation model;

[0015] Step S23: Based on the separation model, obtain the separation value FL corresponding to different gray values, obtain the maximum separation value, and obtain the gray value corresponding to the separation value as the gray value threshold.

[0016] Furthermore, the specific steps of step S22 are as follows:

[0017] Step S221: Obtain any grayscale value TH, and divide the image pixels into two categories C1 and C2 according to TH; obtain the number of pixels and the pixel grayscale value of each category C1 and C2, and calculate the average grayscale value of each category C1 and C2; obtain the average grayscale value m1 of C1 and the average grayscale value m2 of C2, and calculate the average grayscale value of all pixels according to the total number of pixels and the pixel grayscale value, to obtain the average grayscale value mG;

[0018] Step S222: Based on the number of pixels in class C1 and class C2 and the total number of pixels, calculate the probability values ​​p1 and p2 of pixels belonging to class C1 and class C2 respectively;

[0019] Step S223: Calculate the inter-class variance σ of the image using the mean gray value m1 of C1, the mean gray value m2 of C2, the mean gray value mG of all pixels, and the probability values ​​p1 and p2 of pixels belonging to class C1 and class C2. 2 ;

[0020] Step S224: Based on the mean gray value m1 of C1 and the mean gray value m2 of C2, calculate the variance of the pixels within classes C1 and C2 to obtain the intra-class variance σ(C1) of C1. 2 The within-class variance σ(C2) of C2 2 ;

[0021] Step S225: Through inter-class variance σ 2 The within-class variance σ(C1) of C1 2 The within-class variance σ(C2) of C2 2 Calculate the separation value FL of the image;

[0022] The specific calculation process is as follows:

[0023] .

[0024] Furthermore, the specific steps of step S224 are as follows:

[0025] Step S2241: Calculate the intra-class variance σ(C1) of C1 by using the gray values ​​of pixels in class C1 and the mean gray value m1 of C1. 2 ;

[0026] Within-class variance σ(C1) 2 The specific calculation process is as follows:

[0027] ;

[0028] Step S2242: Calculate the intra-class variance σ(C2) of C2 by using the gray values ​​of pixels in class C2 and the mean gray value m2 of C2. 2 ;

[0029] Within-class variance σ(C2) 2 The specific calculation process is as follows:

[0030] .

[0031] Furthermore, the specific steps of step S3 are as follows:

[0032] Step S31: Traverse the medical image to obtain the pixel grayscale value of the medical image. Compare the pixel grayscale value of the medical image with the grayscale value threshold. If the grayscale value of the pixel is greater than the grayscale value threshold, set the grayscale value of the pixel to 255; if the grayscale value of the pixel is less than the grayscale value threshold, set the grayscale value of the pixel to 0.

[0033] Step S32: Obtain the binarized image v, analyze the binarized image v to obtain the contour maps of the medical image in the horizontal and vertical directions, superimpose the contour maps in the horizontal and vertical directions to obtain the contour map w of the medical image; calculate the number of feature points tz by calculating the contour maps in the horizontal and vertical directions.

[0034] Step S33: Obtain the contour map w of the medical image from the gray value w(i,j) of each pixel, and proceed to step S4.

[0035] Furthermore, the specific steps of step S32 are as follows:

[0036] Step S321: Based on the binarized image v, obtain the number of rows mh and the number of columns lh of the binarized image v; traverse the pixels of each row of the binarized image v, save the changes in pixel grayscale values, and obtain the horizontal contour map, denoted as sw.

[0037] The specific process is as follows:

[0038] sw(i,j)=v(i,j)-v(i,j-1);

[0039] Where: 2≤j≤lh; 2≤i≤mh. After traversing all i and j, the horizontal gray value change value is obtained. The change value is offset. When sw(i,j)<0, sw(i,j-1)=255, sw(i,j)=0. From the offset gray value change value, the horizontal contour map sw of the binarized image is obtained.

[0040] Step S322: Traverse the pixels of each column of the binarized image v, save the changes in pixel grayscale values, and obtain the vertical contour map, denoted as cw;

[0041] The specific process is as follows:

[0042] cw(i,j)=v(i,j)-v(i-1,j);

[0043] Where: 2≤j≤lh; 2≤i≤mh, after traversing all i and j, the vertical gray value change value is obtained, and the change value is offset. When cw(i,j)<0, cw(i-1,j)=255, cw(i,j)=0; from the offset gray value change value, the vertical contour map cw of the binarized image is obtained.

[0044] Step S323: Using the horizontal contour map sw and the vertical contour map cw of the binarized image v, traverse the horizontal contour map sw and the vertical contour map cw, obtain the maximum value among sw(i,j) and cw(i,j), and obtain the gray value w(i,j) of each pixel.

[0045] Step S324: Calculate the number of feature points tz based on the horizontal contour map sw and the vertical contour map cw of the binarized image v.

[0046] The specific process is as follows:

[0047] .

[0048] Furthermore, the specific steps of step S4 are as follows:

[0049] Step S41: Obtain the patient's age and image information of various parts of the human body for each age group; based on the patient's age and comparison information, obtain image information of various parts of the human body for the corresponding age group.

[0050] Step S42: Obtain image contour maps bw1 to bwn for n parts of the human body from the image information of each part of the human body in the corresponding age group; traverse the image contour maps of each part of the human body to obtain the number of feature points tz1 to tzn in the image contour maps of each part of the human body, and the number of pixels with gray values ​​greater than 0 in the image contour maps of each part of the human body bs1 to bsn.

[0051] Step S43: Traverse the contour map w of the medical image to obtain the number s of pixels with gray values ​​greater than 0 in the contour map w of the medical image; obtain the number of feature points tz of the contour map.

[0052] Step S44: Calculate the ratio of the number of pixels with gray values ​​greater than 0 (s) in the contour map w of the medical image, the number of feature points (tz) in the contour map w, and the number of pixels with gray values ​​greater than 0 (bs1 to bsn) in the contour maps of different parts of the human body, and the number of feature points (tz1 to tzn) in the contour maps of different parts of the human body, to obtain the ratio of the number of pixels between them (bl). k ;

[0053] The specific calculation process is as follows:

[0054] ;

[0055] Where: the range of k is (0, n];

[0056] Step S45: Calculate the ratio values ​​to obtain the similarity value sa between the medical image and images of various parts of the human body. k ;

[0057] similarity value sa k The specific calculation steps are as follows:

[0058] ;

[0059] Compare all similarity values ​​and obtain the human body part image with the highest similarity value; obtain the human body part from the medical image;

[0060] Step S46: Encrypt and store the medical image according to the human body part in the medical image. Check if there is a storage folder for the corresponding human body part. If it exists, encrypt and store it in that folder. If it does not exist, create a new folder and encrypt and store it.

[0061] Furthermore, the specific steps of step S46 are as follows:

[0062] Step S461: Obtain the patient's medical image u, the binarized image v of the medical image, and the contour image w of the medical image; obtain the patient's name; and encrypt the image based on the name.

[0063] Step S462: Save the encrypted medical image u of the patient, the binarized image v of the medical image, and the contour image w of the medical image. Name the folder according to the patient's identity information and obtain their ID number.

[0064] Step S463: If the storage folder for the corresponding human body part does not exist, create a new storage folder for the corresponding human body part, name it "Human Body Part", enter the folder, create a new folder under the folder, and save the encrypted medical image u of the patient, the binarized image v of the medical image, and the contour image w of the medical image. According to the patient's identity information, obtain the patient's ID number and name the folder accordingly.

[0065] Furthermore, the specific steps of step S461 are as follows:

[0066] Step S4611: Based on the patient's name, obtain the alphabetical order of the first letter of the surname and given name as encrypted data, denoted as a and b;

[0067] Step S4612: Obtain the pixel position of the image, combine the encrypted data with the pixel position of the image, and perform encryption calculation on the grayscale value; for example, for a medical image u; u(i,j)=255, perform encryption calculation to obtain the location-encrypted image um;

[0068] The specific calculations are as follows:

[0069] ;

[0070] Where: um(i,j) refers to the specific position in the image um that is the i-th row and j-th column;

[0071] The location-encrypted image is obtained by encrypting all grayscale values ​​in the image.

[0072] Step S4613: Obtain the largest grayscale value mx in the location-encrypted image, and flip the grayscale values ​​of the location-encrypted image according to mx, reducing the grayscale values ​​with large grayscale values ​​and enlarging the grayscale values ​​with small grayscale values; to obtain the flipped encrypted image fz;

[0073] The specific process is as follows:

[0074] ;

[0075] Where: fz(i,j) refers to the specific position in the image um that is the i-th row and j-th column;

[0076] Step S4614: Scale the flipped encrypted image proportionally to increase the difference in similar grayscale values, and obtain the final encrypted image jm;

[0077] The specific scaling process is as follows:

[0078] ;

[0079] Where: jm(i,j) refers to the specific position in the image um that is the i-th row and j-th column;

[0080] The processing steps for the binarized image v and the contour map w of the medical image are the same as those for the medical image u.

[0081] A management system for medical images, the management system comprising:

[0082] Data receiving module: used to acquire patient identity information and medical image information to obtain patient information, acquire image information of different parts of the human body at different ages, and obtain comparison information;

[0083] Image processing module: This module acquires the patient's medical image u based on medical image information from the patient's data. It then obtains the grayscale value of each pixel from the medical image u, constructs a separation model based on the grayscale values ​​of each pixel, and calculates the separation value FL for different grayscale values. The module then identifies the grayscale value that maximizes the separation value FL, using it as a grayscale threshold. Based on the grayscale threshold, it performs binarization processing on the image, resulting in a binarized image v. Finally, it analyzes the binarized image v to obtain the contour map w and the number of feature points tz of the medical image.

[0084] Image classification module: This module is used to obtain the patient's age from the patient's identity information in the patient information, and to obtain image information of various parts of the human body in each age group by comparing information; based on the patient's age and the comparison information, it obtains image information of various parts of the human body in the corresponding age group; from the image information of various parts of the human body in the corresponding age group, it obtains the contour map and the number of feature points of each part of the human body in the corresponding age group; and it compares and matches the contour map w and the number of feature points tz of the medical image with the contour map and the number of feature points of each part of the human body in the corresponding age group to obtain the human body part corresponding to the medical image.

[0085] Image storage module: Used to encrypt and store medical images according to the human body part to which the medical image belongs. It checks whether a storage folder for the corresponding human body part exists. If it exists, it is encrypted and stored in that folder. If it does not exist, a new folder is created and the image is stored.

[0086] Compared with the prior art, the beneficial effects of the present invention are:

[0087] Improved access speed: This invention classifies and stores medical images according to body parts. When a patient or their family member obtains a medical image, the image of the corresponding body part is retrieved first, and a secondary search is performed within that image, thus narrowing the search scope and improving access speed.

[0088] Highlighting medical images: This invention simplifies the observation of medical images by providing a binarized image and a contour map of the medical image;

[0089] Image processing optimization: This invention separates images by using intra-class variance and inter-class variance to obtain more accurate grayscale thresholds. At the same time, it converts the image into binarized form and performs edge extraction to improve the stability of edge extraction. During the matching process, it combines edge pixels with feature points for matching, thereby improving the accuracy of matching.

[0090] Image encryption: Images are encrypted using pixel locations and user names. The encryption result for each pixel is different, making it difficult to obtain patient privacy from encrypted images. Attached Figure Description

[0091] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0092] Figure 1 This is a schematic diagram of the method of the present invention;

[0093] Figure 2 This is a schematic diagram of the horizontal contour processing of the present invention;

[0094] Figure 3 This is a schematic diagram of the vertical contour processing of the present invention;

[0095] Figure 4 This is a schematic diagram of the feature point extraction process of the present invention;

[0096] Figure 5 This is a schematic diagram of the system of the present invention. Detailed Implementation

[0097] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0098] Example 1

[0099] Please see Figure 1 A method for managing medical images includes:

[0100] Step S1: Obtain patient identity information and medical image information to obtain patient information; obtain image information of different parts of the human body at different ages to obtain comparison information;

[0101] It should be noted that patient identity information refers to the patient's basic information, such as name, age, and ID number.

[0102] It should be noted that medical image information refers to internal tissue images of the human body or a part of the human body obtained in a non-invasive manner to assist medical treatment during the patient's medical treatment process; medical image information is composed of medical images.

[0103] Step S2: Obtain the patient's medical image u based on the medical image information in the patient information. Obtain the gray value of each pixel from the medical image u. Construct a separation model from the gray value of each pixel. Calculate the separation value FL of the image through the model. Obtain the separation value FL for different gray values. Obtain the gray value that maximizes the separation value FL as the gray value threshold.

[0104] The specific steps for step S2 are as follows:

[0105] Step S21: Obtain the patient's medical image u based on the patient's medical image information, and obtain the total number of pixels G of the medical image u; traverse the medical image, obtain the pixel grayscale value x of each pixel, count the number of pixels with grayscale value x, and obtain the number of pixels y(x).

[0106] It should be noted that grayscale value, also known as gray level or brightness value, is a quantitative indicator used to describe the brightness of pixels in an image. In a grayscale image, each pixel contains only one grayscale value, which ranges from 0 to 255.

[0107] Step S22: Construct a separation model based on the grayscale value of each pixel, and obtain the separation value FL of the image through the model;

[0108] The specific process is as follows:

[0109] Step S221: For any gray value TH (0-255), divide the pixels of the image into two categories C1 (gray value less than TH) and C2 (gray value greater than TH) according to TH; calculate the mean m1 of C1, the mean m2 of C2, and the mean mG of the total number of pixels;

[0110] The specific calculation process is as follows:

[0111] Step S2211: Count the number of gray values ​​less than TH, and calculate the mean m1 of C1 based on the sum of gray values ​​less than TH and the range of gray values.

[0112] The specific process for calculating the mean m1 is as follows:

[0113] ;

[0114] It should be noted that the range of grayscale values ​​refers to the selectable range of grayscale values. In m1, the selectable range of grayscale values ​​is from 0 to TH, so its grayscale value range is TH-0=TH.

[0115] Step S2212: Count the number of gray values ​​greater than TH. Calculate the mean m2 of C2 based on the sum of the gray values ​​greater than TH and the range of gray values.

[0116] The specific process for calculating the mean m2 is as follows:

[0117] ;

[0118] It should be noted that the selectable range of grayscale values ​​in m2 is TH+1 to 255, so the range of grayscale values ​​is 255-(TH+1)=254-TH.

[0119] Step S2213: Calculate the mean value mG of all pixels based on the total number of pixels G and the range of all grayscale values.

[0120] ;

[0121] Step S222: Based on the number of pixels in class C1 and class C2 and the total number of pixels, calculate the probability values ​​p1 and p2 of pixels belonging to class C1 and class C2 respectively;

[0122] The specific calculation process is as follows:

[0123] Step S2221: Obtain the probability value p1 of a pixel belonging to class C1 from the number of pixels of class C1 and the total number of pixels G;

[0124] The calculation process for the probability value p1 of a pixel belonging to class C1 is as follows:

[0125] ;

[0126] Step S2222: Obtain the probability value p2 of a pixel belonging to class C2 from the number of pixels of class C2 and the total number of pixels G;

[0127] The process of calculating the probability value p2 of a pixel belonging to class C2 is as follows:

[0128] .

[0129] Step S223: Using the mean m1 of C1, the mean m2 of C2, the mean mG of all pixels, and the probability values ​​p1 and p2 of pixels belonging to class C1 and class C2, obtain the inter-class variance σ of the image. 2 ;

[0130] Between-class variance σ 2 The calculation formula is as follows:

[0131] σ 2 =p1(m1-mG) 2 +p2(m2-mG) 2 ;

[0132] It should be noted that inter-class variance is a statistic used in image segmentation that measures the degree of difference in pixel values ​​or data values ​​between different classes.

[0133] Step S224: Based on the mean m1 of C1 and the mean m2 of C2, calculate the variance of the pixels within classes C1 and C2 to obtain the intra-class variance σ(C1) of C1. 2 The within-class variance σ(C2) of C2 2 ;

[0134] The specific calculation process is as follows:

[0135] Step S2241: Obtain the intra-class variance σ(C1) of C1 by using the grayscale values ​​of C1 class pixels and the mean m1 of C1. 2 ;

[0136] Within-class variance σ(C1) 2 The specific calculation process is as follows:

[0137] ;

[0138] Step S2242: Obtain the intra-class variance σ(C2) of C2 by using the grayscale values ​​of pixels in class C2 and the mean m2 of C2. 2 ;

[0139] Within-class variance σ(C2) 2 The specific calculation process is as follows:

[0140] ;

[0141] Step S225: Through inter-class variance σ 2 The within-class variance σ(C1) of C1 2 The within-class variance σ(C2) of C2 2 This yields the image separation value FL;

[0142] The specific calculation process is as follows:

[0143] ;

[0144] It's important to note that within-class variance and between-class variance are two crucial statistics for evaluating data variability in classification or clustering tasks. Between-class variance measures the difference between different classes, while within-class variance measures the difference within the same class. When between-class variance is as large as possible and within-class variance is as small as possible, data points between different classes can be more clearly separated, while data points within the same class can cluster more closely together.

[0145] Step S23: Iterate through the grayscale values, with a range of 0-255; obtain the separation value FL of the corresponding grayscale value; compare all the separation values ​​FL; obtain the largest separation value FL; and obtain the grayscale value corresponding to the separation value FL as the grayscale value threshold.

[0146] Step S3: Traverse the medical image and binarize it according to the gray value threshold; obtain the binarized image v of the medical image; analyze the binarized image v to obtain the contour map w and the number of feature points tz of the medical image;

[0147] The specific processing steps are as follows:

[0148] Step S31: Traverse the medical image to obtain the pixel grayscale value of the medical image. Compare the pixel grayscale value of the medical image with the grayscale value threshold. If the grayscale value of the pixel is greater than the grayscale value threshold, set the grayscale value of the pixel to 255; if the grayscale value of the pixel is less than the grayscale value threshold, set the grayscale value of the pixel to 0.

[0149] Step S32: Obtain the binarized image v, analyze the binarized image v to obtain the contour maps of the medical image in the horizontal and vertical directions, superimpose the contour maps in the horizontal and vertical directions to obtain the contour map w of the medical image; calculate the number of feature points tz by calculating the contour maps in the horizontal and vertical directions.

[0150] The specific analysis process is as follows:

[0151] Step S321: See Figure 2 Based on the binarized image v, obtain the number of rows mh and the number of columns lh of the binarized image v; traverse the pixels of each row of the binarized image v, save the changes in pixel grayscale values, and obtain the horizontal contour map, denoted as sw.

[0152] The specific process is as follows:

[0153] sw(i,j)=v(i,j)-v(i,j-1);

[0154] Where 2≤j≤lh; 2≤i≤mh, after traversing all i and j, the horizontal gray value change value is obtained. The change value is offset. When sw(i,j)<0, sw(i,j-1)=255, sw(i,j)=0; From the offset gray value change value, the horizontal contour map sw of the binarized image is obtained.

[0155] It should be noted that: i, j represent the position of the pixel in the image, v(i,j) represents the gray value of the pixel in the i-th row and j-th column of the binarized image v, and sw(i,j) represents the gray value of the pixel in the i-th row and j-th column of the horizontal contour map sw.

[0156] It should be noted that since the grayscale value of a pixel in a binarized image is 0 or 255, the change in the pixel grayscale value is equal to the value of the pixel's grayscale value.

[0157] Step S322: See Figure 3 The pixels in each column of the binarized image v are traversed, and the changes in pixel grayscale values ​​are saved to obtain the vertical contour map, denoted as cw.

[0158] The specific process is as follows:

[0159] cw(i,j)=v(i,j)-v(i-1,j);

[0160] Where 2≤j≤lh; 2≤i≤mh, after traversing all i and j, the vertical gray value change value is obtained. The change value is offset. When cw(i,j)<0, cw(i-1,j)=255, cw(i,j)=0; From the offset gray value change value, the vertical contour map cw of the binarized image is obtained.

[0161] Step S323: Using the horizontal contour map sw and the vertical contour map cw of the binarized image v, traverse the horizontal contour map sw and the vertical contour map cw, obtain the maximum value among sw(i,j) and cw(i,j), and obtain the gray value w(i,j) of each pixel.

[0162] Step S324: Calculate the number of feature points tz based on the horizontal contour map sw and the vertical contour map cw of the binarized image v.

[0163] The specific process is as follows:

[0164] ;

[0165] It should be noted that: feature points refer to individual pixels or the edge corners of multiple pixels in the contour map w, such as... Figure 4As shown, it can be represented by both the horizontal contour map sw and the vertical contour map cw. Therefore, the point is a feature point if and only if sw(i,j)=cw(i,j)=255.

[0166] Step S33: Obtain the contour map w of the medical image from the gray value w(i,j) of each pixel, and proceed to step S4.

[0167] Step S4: Obtain the patient's age through the patient's identity information in the patient information, and obtain image information of various parts of the human body for each age group by comparing the information; obtain image information of various parts of the human body for the corresponding age group based on the patient's age and the comparison information; obtain the contour map and the number of feature points of the image of each part of the human body for the corresponding age group from the image information of each part of the human body for the corresponding age group; compare and match the contour map w and the number of feature points tz of the medical image with the contour map and the number of feature points of the image of each part of the human body for the corresponding age group to obtain the human body part to which the medical image belongs; encrypt and store the medical image according to the human body part to which the medical image belongs.

[0168] It should be noted that: the age groups refer to the age divisions based on human development, specifically divided into 0-1 years, 1-3 years, 3-7 years, 7-14 years, 14-18 years, 18-60 years, and 60 years and above; the image information of each part of the human body refers to medical image information of the head, chest, abdomen, pelvis, and limbs; the images of each part of the human body in each age group refer to standard medical images.

[0169] The specific steps of step S4 are as follows:

[0170] Step S41: Obtain the patient's age and image information of various parts of the human body for each age group; based on the patient's age and comparison information, obtain image information of various parts of the human body for the corresponding age group.

[0171] Step S42: Obtain image contour maps bw1, bw2, bw3...bwn for n body parts from the image information of each body part corresponding to the age group; traverse the image contour maps bw1, bw2, bw3...bwn to obtain the number of pixels with gray values ​​greater than 0 in each body part image contour map bw1, bw2, bw3...bwn; obtain the number of feature points tz1, tz2, tz3...tzn in each body part image contour map;

[0172] Step S43: Traverse the contour map w of the medical image to obtain the number s of pixels with gray values ​​greater than 0 in the contour map w of the medical image; obtain the number of feature points tz of the contour map.

[0173] Step S44: Calculate the ratio of the number of pixels with gray values ​​greater than 0 (s) in the contour map w of the medical image, the number of feature points (tz) in the contour map w, and the number of pixels with gray values ​​greater than 0 (bs1, bs2, bs3...bsn) in the contour maps of different parts of the human body, and the number of feature points (tz1, tz2, tz3...tzn) in the contour maps of different parts of the human body, to obtain the ratio of the number of pixels between them (bl). k ;

[0174] The specific calculation process is as follows:

[0175] ;

[0176] It should be noted that the range of values ​​for k is (0, n].

[0177] For example, the specific calculation process for the number of pixels with a gray value greater than 0 in the first human body part outline image, bs1, is as follows:

[0178] ;

[0179] For example, the specific calculation process for bs2, the number of pixels with a grayscale value greater than 0 in the outline image of the second human body part, is as follows:

[0180] ;

[0181] For example, the specific calculation process for bsn, the number of pixels with a gray value greater than 0 in the outline image of the nth human body part, is as follows:

[0182] ;

[0183] Step S45: Calculate the ratio values ​​to obtain the similarity value sa between the medical image and images of various parts of the human body. k ;

[0184] similarity value sa k The specific calculation steps are as follows:

[0185] ;

[0186] It should be noted that a high similarity value indicates that the medical image matches the image of the human body part.

[0187] Compare all similarity values ​​and obtain the human body part image with the highest similarity value; obtain the human body part in the medical image;

[0188] Step S46: Encrypt and store the medical image according to the human body part to which the medical image belongs. Check if there is a storage folder for the corresponding human body part. If it exists, encrypt and store it in that folder. If it does not exist, create a new folder and encrypt and store it.

[0189] Step S461: Obtain the patient's medical image u, the binarized image v of the medical image, and the contour image w of the medical image; obtain the patient's name; and encrypt the image based on the name.

[0190] The specific encryption steps are as follows:

[0191] Step S4611: Based on the patient's name, obtain the order of the first letter of the surname and given name in the alphabet as encrypted data, denoted as a and b. For example, if the patient's name is Zhang San, the encrypted data is a=26 (the letter z is in the alphabetical order of 26) and b=19 (the letter s is in the alphabetical order of 19). If the length of the patient's name is greater than 2, such as Zhang San San, the encrypted data is a=26 and b=38 (19+19).

[0192] Step S4612: Obtain the pixel position of the image, combine the encrypted data with the pixel position of the image, and perform encryption calculation on the grayscale value; for example, for a medical image u; u(i,j)=255, perform encryption calculation to obtain the location-encrypted image um;

[0193] The specific calculations are as follows:

[0194] ;

[0195] Where: um(i,j) refers to the specific position in the image um that is the i-th row and j-th column;

[0196] The location-encrypted image is obtained by encrypting all grayscale values ​​in the image.

[0197] Step S4613: Obtain the largest grayscale value mx in the location-encrypted image, and flip the grayscale values ​​of the location-encrypted image according to mx, reducing the grayscale values ​​with large grayscale values ​​and enlarging the grayscale values ​​with small grayscale values; to obtain the flipped encrypted image fz;

[0198] The specific process is as follows:

[0199] ;

[0200] Where: fz(i,j) refers to the specific position in the image um that is the i-th row and j-th column;

[0201] Step S4614: Scale the flipped encrypted image proportionally to increase the difference in similar grayscale values, and obtain the final encrypted image jm;

[0202] The specific scaling process is as follows:

[0203] ;

[0204] Where: jm(i,j) refers to the specific position in the image um that is the i-th row and j-th column;

[0205] The processing steps for the binarized image v and the contour map w of the medical image are the same as those for the medical image u.

[0206] It should be noted that image decryption is the reverse process of encryption. You only need to know the encrypted data and calculate in reverse order of the encryption process to obtain the unencrypted image.

[0207] Step S462: Locate the storage folder for the corresponding human body part; if the storage folder for the corresponding human body part exists, enter the folder, create a new folder under the folder, and save the encrypted medical image u of the patient, the binarized image v of the medical image, and the contour image w of the medical image. Name the folder according to the patient's identity information and obtain their ID number.

[0208] Step S463: If the storage folder for the corresponding human body part does not exist, create a new storage folder for the corresponding human body part, name it "Human Body Part", enter the folder, create a new folder under the folder, and save the encrypted medical image u of the patient, the binarized image v of the medical image, and the contour image w of the medical image. According to the patient's identity information, obtain the patient's ID number and name the folder accordingly.

[0209] Example 2

[0210] Please see Figure 5 A management system for medical images includes: a data receiving module, an image processing module, an image classification module, an image storage module, and a database; the data receiving module, data processing module, image classification module, and image storage module are each connected to the database.

[0211] Data receiving module: used to acquire patient identity information and medical image information, obtain patient information, acquire image information of different parts of the human body at different ages, and obtain comparison information.

[0212] Image processing module: This module acquires the patient's medical image u based on medical image information from the patient's data. It then obtains the grayscale value of each pixel from the medical image u, constructs a separation model based on the grayscale values ​​of each pixel, and calculates the separation value FL for different grayscale values. It then obtains the grayscale value that maximizes the separation value FL, using it as a grayscale threshold. The module performs binarization processing on the image based on the grayscale threshold, resulting in a binarized image v of the medical image. Finally, it analyzes the binarized image v to obtain the contour map w and the number of feature points tz of the medical image.

[0213] Image classification module: This module is used to obtain the patient's age from the patient's identity information in the patient information, and to obtain image information of various parts of the human body for each age group by comparing information; based on the patient's age and the comparison information, it obtains image information of various parts of the human body for the corresponding age group; from the image information of various parts of the human body for the corresponding age group, it obtains the contour map and the number of feature points of the image of each part of the human body for the corresponding age group; and by comparing and matching the contour map w and the number of feature points tz of the medical image with the contour map and the number of feature points of the image of each part of the human body for the corresponding age group, it obtains the human body part to which the medical image belongs.

[0214] Image storage module: Used to encrypt and store medical images according to the human body part to which the medical image belongs. It checks whether a storage folder for the corresponding human body part exists. If it exists, it is encrypted and stored in that folder. If it does not exist, a new folder is created and the image is stored.

[0215] The above formulas are all dimensionless calculations. The formulas are derived from software simulations using a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation. For example, there are weighting coefficients and proportional coefficients. The values ​​set are to quantify each parameter to obtain a specific value, which is convenient for subsequent comparison. The values ​​of the weighting coefficients and proportional coefficients are only required to not affect the proportional relationship between the parameters and the quantified values.

[0216] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for managing medical images, characterized in that, Management methods include: Step S1: Obtain the patient's medical images to form medical image information; obtain the patient's name, age, and ID number to form patient identity information; obtain image information of different parts of the human body at different age groups to obtain comparison information; Step S2: Obtain the patient's medical image based on medical image information, obtain the grayscale value of each pixel from the medical image, construct a separation model based on the grayscale value of each pixel, calculate the separation value of the image, and obtain the grayscale value threshold based on the separation value of the image; Step S3: Binarize the image according to the grayscale threshold; obtain the binarized image and analyze it to obtain the contour map and the number of feature points of the medical image; Step S4: Based on the patient's identity information, obtain the patient's age, and combine it with the comparison information to obtain image information of various parts of the human body in the corresponding age group; combine the outline and feature point count of the medical image to determine the human body parts in the medical image; and encrypt and store the medical image based on the human body parts in the medical image and the patient's name and ID number. The specific steps of step S4 are as follows: Step S41: Obtain the patient's age and image information of various parts of the human body for each age group; based on the patient's age and comparison information, obtain image information of various parts of the human body for the corresponding age group. Step S42: Obtain image contour maps bw1 to bwn for n parts of the human body from the image information of each part of the human body in the corresponding age group; traverse the image contour maps of each part of the human body to obtain the number of feature points tz1 to tzn in the image contour maps of each part of the human body, and the number of pixels with gray values ​​greater than 0 in the image contour maps of each part of the human body bs1 to bsn. Step S43: Traverse the contour map w of the medical image to obtain the number s of pixels with gray values ​​greater than 0 in the contour map w of the medical image; obtain the number of feature points tz of the contour map. Step S44: Calculate the ratio of the number of pixels bl based on s, tz, bs1 to bsn, tz1 to tzn. k ; ; Step S45: Calculate the ratio values ​​to obtain the similarity value sa between the medical image and images of various parts of the human body. k ; ; The system determines the human body part with the highest similarity value based on similarity; thus, it identifies the human body part in medical images. Step S46: Encrypt and store the medical image based on the human body parts in the medical image.

2. The method for managing medical images according to claim 1, characterized in that, The specific steps of step S2 are as follows: Step S21: Obtain the patient's medical image u based on the patient's medical image information, obtain the image pixels of medical image u, and obtain the total number of pixels G; traverse the medical image, obtain the pixel grayscale value x of each pixel, count the number of pixels with grayscale value x, and obtain the number of pixels y(x). Step S22: Construct a separation model using pixel grayscale value x and number of pixels y(x), divide the grayscale value of the medical image into two parts according to the separation model, and obtain the separation value FL of the image through the separation model; Step S23: Based on the separation model, obtain the separation value FL corresponding to different gray values, obtain the maximum separation value, and obtain the gray value corresponding to the separation value as the gray value threshold.

3. The method for managing medical images according to claim 2, characterized in that, The specific steps of step S22 are as follows: Step S221: Obtain any grayscale value TH, and divide the image pixels into two categories C1 and C2 according to TH; obtain the number of pixels and the pixel grayscale value of each category C1 and C2, and calculate the average grayscale value of each category C1 and C2; obtain the average grayscale value m1 of C1 and the average grayscale value m2 of C2, and calculate the average grayscale value of all pixels according to the total number of pixels and the pixel grayscale value, to obtain the average grayscale value mG; Step S222: Based on the number of pixels in class C1 and class C2 and the total number of pixels, calculate the probability values ​​p1 and p2 of pixels belonging to class C1 and class C2 respectively; Step S223: Calculate the inter-class variance σ of the image using m1, m2, mG, p1, and p2. 2 ; Step S224: Based on m1 and m2, calculate the variance of the pixels within classes C1 and C2 to obtain the intra-class variance σ(C1) of C1. 2 The within-class variance σ(C2) of C2 2 ; Step S225: Through inter-class variance σ 2 The within-class variance σ(C1) of C1 2 The within-class variance σ(C2) of C2 2 Calculate the separation value FL of the image; 。 4. The method for managing medical images according to claim 3, characterized in that, The specific steps of step S224 are as follows: Step S2241: Calculate the intra-class variance σ(C1) of C1 by using the gray values ​​of pixels in class C1 and the mean gray value m1 of C1. 2 ; Within-class variance σ(C1) 2 The specific calculation process is as follows: ; Step S2242: Calculate the intra-class variance σ(C2) of C2 by using the gray values ​​of pixels in class C2 and the mean gray value m2 of C2. 2 ; Within-class variance σ(C2) 2 The specific calculation process is as follows: 。 5. The method for managing medical images according to claim 1, characterized in that, The specific steps of step S3 are as follows: Step S31: Traverse the medical image, obtain the pixel grayscale value of the medical image, and compare it with the grayscale value threshold. If it is greater than the grayscale value threshold, set the grayscale value of the pixel to 255; if it is less than the grayscale value threshold, set the grayscale value of the pixel to 0. Step S32: Obtain the binarized image v, analyze the binarized image v to obtain the contour maps of the medical image in the horizontal and vertical directions, superimpose the contour maps in the horizontal and vertical directions to obtain the contour map w of the medical image; calculate the number of feature points tz by calculating the contour maps in the horizontal and vertical directions. Step S33: Obtain the contour map w of the medical image from the grayscale value of each pixel, and proceed to step S4.

6. The method for managing medical images according to claim 1, characterized in that, The specific steps of step S46 are as follows: Obtain the patient's medical image u, the binarized image v of the medical image, and the contour image w of the medical image; obtain the patient's name; and encrypt the image based on the name. ① Based on the patient's name, obtain the alphabetical order of the first letter of the surname and given name as encrypted data, denoted as a and b; ② Obtain the pixel positions of the image, combine the encrypted data with the pixel positions of the image, and perform encryption calculations on the grayscale values; perform encryption calculations on the medical image u to obtain the location-encrypted image um; The specific calculations are as follows: ; Where: um(i,j) refers to the encrypted value of the position-encrypted image um in the i-th row and j-th column after encrypting u(i,j); The location-encrypted image is obtained by encrypting all grayscale values ​​in the image. ③ Obtain the largest grayscale value mx in the location-encrypted image, and flip the grayscale values ​​of the location-encrypted image based on mx, reducing the grayscale values ​​with large values ​​and enlarging the grayscale values ​​with small values; thus obtaining the flipped encrypted image fz. The specific process is as follows: ; ④ Scale the flipped encrypted image proportionally to increase the difference between similar gray values, and obtain the final encrypted image jm; The specific scaling process is as follows: ; The binarized image v and the contour map w of the medical image are encrypted according to steps ①-④.

7. A management system for medical images, applicable to any one of the medical image management methods described in claims 1-6, characterized in that, The management system includes: Data receiving module: used to acquire patient identity information and medical image information; acquire image information of different parts of the human body at different ages, and obtain comparison information; Image processing module: Used to acquire the patient's medical image u based on medical image information, obtain the gray value of each pixel and construct a separation model, and obtain the separation value FL of the image through the model; the gray value with the largest separation value is used as the gray value threshold; the image is binarized according to the gray value threshold; the binarized image of the medical image is analyzed to obtain the contour map w and the number of feature points tz of the medical image; Image classification module: used to obtain the patient's age through patient identity information, obtain image information of various parts of the human body in different age groups through comparison information; obtain image information of various parts of the human body in the corresponding age group based on the patient's age and comparison information; obtain the contour map and feature point count of the images of various parts of the human body in the corresponding age group from the image information of various parts of the human body in the corresponding age group; and obtain the human body part corresponding to the medical image through comparison and matching. Image storage module: Used to encrypt and store medical images according to the human body part to which the medical image belongs.

Citation Information

Patent Citations

  • Image element extraction method and device

    CN110473222A

  • Medical image data sharing system based on big data analysis

    CN115019972A