Management method and system for medical images

By constructing separation models and performing binary processing, combining comparison information to judge human parts and encrypting storage, the problems of complex medical image management, slow retrieval speed and security risks are solved, and efficient image management and privacy protection are achieved.

CN119862296AActive Publication Date: 2025-04-22ZHONGKE LINGXUN (BEIJING) TECH CO LTD +1
View PDF 15 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing medical image management methods are complex, the retrieval speed is slow, and there are security risks, making it difficult to effectively protect the patient's privacy information.

Method used

By obtaining the patient's identity information and medical image information, a separation model is constructed to obtain the grayscale value threshold, perform binarization processing and analyze the image outline and feature points, and use comparison information to judge the human body parts, and encrypt and store the image.

Benefits of technology

It improves the access speed of medical images, simplifies the difficulty of image observation, improves the accuracy of image processing and matching accuracy, and ensures the privacy and security of patients through encryption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862296A_ABST
    Figure CN119862296A_ABST
Patent Text Reader

Abstract

The invention provides a medical image management method and system, and belongs to the field of medical image management. The problem of complex medical image management is solved; the method specifically comprises the following steps: S1, acquiring patient identity information, medical image information and image information of each part of a human body of each age group; s2, a medical image of a patient is acquired, a separation model is constructed according to the gray value of the medical image, and a gray value threshold value is solved; s3, carrying out binarization processing on the image according to the gray value threshold value to obtain a binarized image; analyzing the binarized image to obtain a contour map and the number of feature points of the medical image; s4, comparing the contour map and the number of the feature points of the medical image with the contour map and the number of the feature points of the image of each part of the human body of the corresponding age group to obtain the human body part of the medical image; encrypting and storing the medical image; the medical images are classified, the storage environment is allocated for the medical images, and the management difficulty of the medical images is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention provides a management method and system for medical images, and relates to the field of image management. Background Art

[0002] The existing medical image management methods and systems have the following deficiencies: Medical images are highly professional: Most existing medical images are directly acquired by machines, which are highly complex and professional, and difficult to understand for people without relevant medical knowledge; Delay problem: The amount of medical image data is large, and it takes a long time to retrieve the required medical images from all medical images. Patients or their families often need to wait for a while to obtain medical images.

[0003] Security risks: Medical images often contain patients’ private information and need to be encrypted and stored to prevent image leakage from causing trouble to patients. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention aims to provide a method and system for managing medical images, aiming to solve the complex problems of medical image management.

[0005] In order to achieve the above object, the present invention is implemented by the following technical solution: A method for managing medical images includes: Step S1: Obtain the medical image of the patient to form medical image information; obtain the name, age, and ID number of the patient to form the patient identity information; obtain the patient information from the patient identity information and the medical image information, obtain the image information of each part of the human body in each age group, and obtain the comparison information; Step S2: obtaining a medical image of the patient according to the medical image information in the patient information, obtaining a gray value of each pixel from the medical image, constructing a separation model according to the gray value of each pixel, obtaining a separation value of the image through the separation model, and obtaining a gray value threshold according to the separation value of the image; Step S3: binarizing the image according to the gray value threshold; obtaining a binarized image of the medical image; analyzing the binarized image to obtain a contour map and the number of feature points of the medical image; Step S4: Based on the patient's identity information, the patient's age is obtained, and combined with the comparison information, the image information of each part of the human body in the corresponding age group is obtained; based on the contour map and the number of feature points of the medical image, the human body part of the medical image is judged; based on the human body part of the medical image combined with the patient's name and ID number, the medical image is encrypted and stored.

[0006] Furthermore, the specific steps of step S2 are as follows: Step S21: obtaining a medical image u of the patient according to the medical image information of the patient, obtaining image pixels of the medical image u, and obtaining a total number of pixels G; traversing the medical image, obtaining a pixel gray value x of each pixel, and counting the number of pixels with a gray value of x to obtain a pixel number y(x); Step S22: constructing a separation model through the pixel gray value x and the number of pixels y(x), dividing the gray value of the medical image into two parts according to the separation model, and obtaining the separation value FL of the image through the separation model; Step S23: According to the separation model, the separation values ​​FL corresponding to different gray values ​​are obtained, the maximum separation value is obtained, and the gray value corresponding to the separation value is obtained as the gray value threshold.

[0007] Furthermore, the specific steps of step S22 are as follows: Step S221: obtain an arbitrary gray value TH, and divide the image pixels into two categories C1 and C2 according to TH; obtain the number of pixels and the gray values ​​of the pixels in categories C1 and C2, and calculate the average gray values ​​of the pixels in categories C1 and C2; obtain the gray value mean m1 of C1 and the gray value mean m2 of C2, and calculate the average gray values ​​of all pixels according to the total number of pixels and the gray values ​​of the pixels to obtain the gray value mean mG; Step S222: according to the number of pixels of category C1 and category C2 and the total number of pixels, obtain probability values ​​p1 and p2 that the pixel belongs to category C1 and category C2; Step S223: Obtain the inter-class variance σ of the image from the grayscale mean m1 of C1, the grayscale mean m2 of C2, the grayscale mean mG of all pixels, the probability p1 of the pixel belonging to the C1 class, and the probability p2 of the pixel belonging to the C2 class. 2 ; Step S224: Based on the grayscale value mean m1 of C1 and the grayscale value mean m2 of C2, the variance of pixels in the C1 and C2 classes is calculated to obtain the intra-class variance σ(C1) of C1. 2 , intra-class variance of C2σ(C2) 2 ; Step S225: Using the inter-class variance σ 2 The intra-class variance of C1 is σ(C1) 2 , intra-class variance of C2σ(C2) 2 , find the separation value FL of the image; The specific calculation process is as follows: .

[0008] Furthermore, the specific steps of step S224 are as follows: Step S2241: Calculate the intra-class variance σ(C1) of C1 by comparing the grayscale values ​​of the pixels in class C1 with the grayscale mean m1 of C1. 2 ; Intra-class variance σ (C1) 2 The specific calculation process is as follows: ; Step S2242: Calculate the intra-class variance σ(C2) of C2 by using the grayscale value of the pixel in class C2 and the grayscale value mean m2 of C2. 2 ; Intra-class variance σ (C2) 2 The specific calculation process is as follows: .

[0009] Furthermore, the specific steps of step S3 are as follows: Step S31: traverse the medical image, 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; Step S32: Obtain a binary image v, analyze the binary image v, obtain contour maps of the medical image in the horizontal direction and the vertical direction, superimpose the contour maps in the horizontal direction and the vertical direction to obtain the contour map w of the medical image; obtain the number of feature points tz by calculating the contour maps in the horizontal direction and the vertical direction; Step S33: Obtain the contour map w of the medical image from the grayscale value w(i,j) of each pixel and proceed to step S4.

[0010] Furthermore, the specific steps of step S32 are as follows: Step S321: according to the binary image v, obtain the number of rows mh and the number of columns lh of the binary image v; traverse the pixels of each row of the binary image v, save the change value of the pixel gray value, and obtain a horizontal contour map, which is recorded as sw; The specific process is as follows: sw(i,j)=v(i,j)-v(i,j-1); Among them: 2≤j≤lh; 2≤i≤mh, after traversing all i, j, the gray value change value in the horizontal direction is obtained, and the change value is offset. When sw(i, j)<0, sw(i,j-1)=255, sw(i,j)=0; the horizontal contour map sw of the binary image is obtained from the gray value change value after offset; Step S322: traverse the pixels of each column of the binary image v, save the change value of the pixel gray value, and obtain a vertical contour map, which is recorded as cw; The specific process is as follows: cw(i,j)=v(i,j)-v(i-1,j); Among them: 2≤j≤lh; 2≤i≤mh, after traversing all i, j, the gray value change value in the vertical direction is obtained, and the change value is offset. When cw(i, j)<0, cw(i-1,j)=255, cw(i,j)=0; the vertical contour map cw of the binary image is obtained from the gray value change value after offset; Step S323: traverse the horizontal contour map sw and the vertical contour map cw of the binary image v, obtain the maximum value of sw(i,j) and cw(i,j), and obtain the gray value w(i,j) of each pixel; Step S324: Calculate the number of feature points tz according to the horizontal contour map sw and the vertical contour map cw of the binary image v; The specific process is as follows: .

[0011] Furthermore, the specific steps of step S4 are as follows: Step S41: Obtain the age of the patient, and obtain image information of various parts of the human body in various age groups; according to the age of the patient combined with the comparison information, obtain image information of various parts of the human body in corresponding age groups; Step S42: Obtain image contours bw1 to bwn of n parts from the image information of each part of the human body in the corresponding age group; traverse the image contours of each part of the human body to obtain the number of feature points tz1 to tzn in the image contours of each part of the human body, and the number of pixels bs1 to bsn with grayscale values ​​greater than 0 in the image contours of each part of the human body; Step S43: traverse the contour map w of the medical image, obtain the number s of pixels with grayscale values ​​greater than 0 in the contour map w of the medical image; obtain the number tz of feature points of the contour map; Step S44: Calculate the number of pixels s with grayscale values ​​greater than 0 in the contour map w of the medical image, the number of characteristic points tz in the contour map, and the number of pixels bs1 to bsn with grayscale values ​​greater than 0 in the contour map of each part of the human body, and the number of characteristic points tz1 to tzn in the contour map of each part of the human body, to obtain a ratio value bl of the number of pixels therebetween. k ; The specific calculation process is as follows: ; Among them: the value range of k is (0, n]; Step S45: Calculate the ratio value to obtain the similarity value sa between the medical image and the images of various parts of the human body. k ; Similarity value sak The specific calculation steps are as follows: ; Compare all similarity values ​​to obtain the human body part image with the largest similarity value; obtain the human body part of the medical image; Step S46: Encrypt and store the medical image according to the human body part of the medical image, and check whether there is a storage folder for the corresponding human body part. If so, encrypt and store it in the folder. If not, create a new folder and encrypt and store it.

[0012] Furthermore, the specific steps of step S46 are as follows: Step S461: obtaining the patient's medical image u, the binary image v of the medical image, the contour image w of the medical image, obtaining the patient's name, and encrypting the image according to the name; Step S462: Save the encrypted patient's medical image u, the binary image v of the medical image, and the contour image w of the medical image, and name the folder according to the patient's identity information and the ID number of the patient; Step S463: If there is no storage folder for the corresponding human body part, create a new storage folder for the corresponding human body part, name it the human body part, enter the folder, create a new folder under the folder, save the encrypted patient's medical image u, the binary image v of the medical image, and the contour map w of the medical image, and name the folder based on the patient's identity information and the ID number.

[0013] Furthermore, the specific steps of step S461 are as follows: Step S4611: According to the patient's name, the alphabetical order of the first letter of the surname and the first letter of the name is obtained as encrypted data, which is recorded as a and b; 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 gray value; for example, for a medical image u; u(i, j) = 255, perform encryption calculation to obtain a position encrypted image um; The specific calculation is as follows: ; Where: um(i,j) refers to the specific position in the image um, which is the i-th row and j-th column; All gray values ​​in the image are encrypted to obtain a position encrypted image; Step S4613: obtaining the maximum grayscale value mx in the position encrypted image, and flipping the grayscale value of the position encrypted image according to mx, reducing the grayscale value with a large value and enlarging the grayscale value with a small value, to obtain a flipped encrypted image fz; The specific process is as follows: ; Where: fz(i,j) refers to the specific position in the image um, which is the i-th row and j-th column; Step S4614: scaling the flipped encrypted image in equal proportion to enlarge the gap between similar gray values ​​to obtain the final encrypted image jm; The specific scaling process is as follows: ; Where: jm(i,j) refers to the specific position in the image um, which is the i-th row and j-th column; The processing steps of the binary image v of the medical image, the contour map w of the medical image and the medical image u are the same.

[0014] A management system for medical images, the management system comprising: Data receiving module: used to obtain patient identity information, medical image information, patient information, image information of various parts of the human body at various ages, and comparison information; Image processing module: used to obtain the patient's medical image u according to the medical image information in the patient information, obtain the gray value of each pixel from the medical image u, build a separation model from the gray value of each pixel, obtain the image separation value FL through the model, and obtain the separation values ​​FL of different gray values; obtain the gray value that makes the separation value FL maximum as the gray value threshold; binarize the image 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 of the medical image and the number of feature points tz; Image classification module: used to obtain the patient's age through the patient's identity information in the patient information, and obtain the image information of each part of the human body in each age group through the comparison information; obtain the image information of each part of the human body in the corresponding age group according to the patient's age combined with the comparison information; obtain the contour map and the number of feature points of the image of each part of the human body in the corresponding age group from the image information of each part of the human body in 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 in the corresponding age group to obtain the human body part corresponding to the medical image; Image storage module: used to encrypt and store medical images according to the body part to which they belong, and to find out whether there is a storage folder for the corresponding body part. If so, it is encrypted and stored in the folder. If not, a new folder is created and stored.

[0015] Compared with the prior art, the present invention has the following beneficial effects: Improve access speed: The present invention stores medical images by categories, and classifies medical images by body parts. When patients or their family members obtain medical images, they first obtain images of corresponding parts, and then perform secondary searches in the images of corresponding parts, thereby narrowing the search scope and improving access speed. Highlighting the medical image: The present invention simplifies the difficulty of observing the medical image by providing a binary image of the medical image and a contour image of the medical image; Optimize image processing: The present invention separates images through intra-class variance and inter-class variance to obtain a more accurate grayscale value threshold. At the same time, the image is converted into a binary image for edge extraction to improve the stability of edge extraction. In the matching process, edge pixels are combined with feature points for matching to improve the matching accuracy. Image encryption: The image is encrypted by pixel position and user name. The encryption result of each pixel is different, making it difficult to obtain patient privacy from the encrypted image. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings: Figure 1 It is a schematic diagram of the method of the present invention; Figure 2 It is a schematic diagram of horizontal profile processing of the present invention; Figure 3 It is a schematic diagram of the vertical profile processing of the present invention; Figure 4 This is a schematic diagram of feature point extraction processing of the present invention; Figure 5 Schematic diagram of the system of the present invention. DETAILED DESCRIPTION

[0017] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0018] Embodiment 1 See also Figure 1 , a management method for medical images includes: Step S1: Obtain patient identity information, medical image information, obtain patient information, obtain image information of various parts of the human body of various age groups, and obtain comparison information; It should be noted that: patient identity information refers to the patient’s basic information, such as name, age, and ID number; It should be noted that: medical image information refers to the internal tissue image information of the human body or a part of the human body obtained in a non-invasive manner in order to assist in medical treatment during the patient's medical treatment process; medical image information consists of medical images; Step S2: Obtain the patient's medical image u according to the medical image information in the patient information, obtain the grayscale value of each pixel from the medical image u, build a separation model based on the grayscale value of each pixel, and calculate the image separation value FL through the model to obtain separation values ​​FL with different grayscale values; obtain the grayscale value that maximizes the separation value FL as the grayscale value threshold.

[0019] The specific operation steps of step S2 are as follows: Step S21: Obtain the patient's medical image u according to 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).

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

[0021] Step S22: construct a separation model based on the gray value of each pixel, and obtain the separation value FL of the image through the model; The specific process is as follows: Step S221: for any gray value TH (0-255), the pixels of the image are divided into two categories C1 (gray value less than TH) and C2 (gray value greater than TH) according to TH; the mean m1 of C1, the mean m2 of C2, and the mean mG of the total number of pixels are calculated; The specific calculation process is as follows: Step S2211: Count the number of gray values ​​less than TH, and calculate the mean m1 of C1 according to the sum of gray values ​​less than TH and the range of gray values; The specific process of obtaining the mean m1 is as follows: ; It should be noted that the range of grayscale values ​​refers to the optional range of grayscale values. In m1, the optional range of grayscale values ​​is from 0 to TH, so the range of grayscale values ​​is TH-0=TH.

[0022] Step S2212: Count the number of gray values ​​greater than TH, and calculate the mean value m2 of C2 according to the sum of gray values ​​greater than TH and the range of gray values; The specific process of obtaining the mean m2 is as follows: ; It should be noted that the optional range of grayscale values ​​in m2 is from TH+1 to 255, so the range of grayscale values ​​is 255-(TH+1)=254-TH.

[0023] Step S2213: Obtain the mean value mG of all pixels according to the total number of pixels G and the range of all gray values: ; Step S222: according to the number of pixels of category C1 and category C2 and the total number of pixels, obtain probability values ​​p1 and p2 that the pixel belongs to category C1 and category C2; The specific process of obtaining is as follows: Step S2221: Obtain the probability value p1 that the pixel belongs to the C1 class based on the number of pixels of the C1 class and the total number of pixels G; The calculation process of the probability value p1 of a pixel being of class C1 is as follows: ; Step S2222: Obtain the probability value p2 that the pixel belongs to the C2 class based on the number of pixels of the C2 class and the total number of pixels G; The process of obtaining the probability value p2 of a pixel being of class C2 is as follows: .

[0024] Step S223: Obtain the inter-class variance σ of the image from the mean m1 of C1, the mean m2 of C2, the mean mG of all pixels, the probability p1 of the pixel belonging to the C1 class, and the probability p2 of the pixel belonging to the C2 class. 2 ; Between-class variance σ 2 The calculation formula is as follows: σ 2 =p1(m1-mG) 2 +p2(m2-mG) 2 ; It should be noted that inter-class variance is a statistic used in image segmentation, which measures the degree of difference in pixel values ​​or data values ​​between different categories.

[0025] Step S224: Based on the mean m1 of C1 and the mean m2 of C2, the variance of pixels in the C1 and C2 classes is calculated to obtain the intra-class variance σ(C1) of C1. 2 , intra-class variance of C2σ(C2) 2 ; The specific calculation process is as follows: Step S2241: Obtain the intra-class variance σ(C1) of C1 by comparing the grayscale value of the pixels in class C1 with the mean m1 of C1. 2 ; Intra-class variance σ (C1) 2 The specific calculation process is as follows: ; Step S2242: Obtain the intra-class variance σ(C2) of C2 by using the grayscale value of the pixels in class C2 and the mean m2 of C2. 2 ; Intra-class variance σ (C2) 2 The specific calculation process is as follows: ; Step S225: Using the inter-class variance σ 2 The intra-class variance of C1 is σ(C1) 2 , intra-class variance of C2σ(C2) 2 , get the image separation value FL; The specific calculation process is as follows: ; It should be noted that intra-class variance and inter-class variance are two important statistics for evaluating data differences in classification or clustering tasks. Inter-class variance measures the differences between different categories, while intra-class variance measures the differences in data within the same category. When the inter-class variance is as large as possible and the intra-class variance is as small as possible, data points between different categories can be separated more clearly, and data points within the same category can be clustered more closely together.

[0026] Step S23: traverse the grayscale values, the traversal range is 0-255; obtain the separation value FL corresponding to the grayscale value, compare all the separation values ​​FL, obtain the maximum separation value FL, and obtain the grayscale value corresponding to the separation value FL as the grayscale value threshold.

[0027] Step S3: traverse the medical image and perform binarization processing on the image according to the gray value threshold; obtain a binarized image v of the medical image; analyze the binarized image v to obtain a contour map w and the number of feature points tz of the medical image; The specific processing steps are as follows: 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.

[0028] Step S32: Obtain a binary image v, analyze the binary image v, obtain contour maps of the medical image in the horizontal direction and the vertical direction, superimpose the contour maps in the horizontal direction and the vertical direction to obtain the contour map w of the medical image; obtain the number of feature points tz by calculating the contour maps in the horizontal direction and the vertical direction; The specific analysis process is as follows: Step S321: Refer to Figure 2 , according to the binary image v, obtain the number of rows mh and the number of columns lh of the binary image v; traverse the pixels of each row of the binary image v, save the change value of the pixel gray value, and obtain the horizontal contour map, which is recorded as sw; The specific process is as follows: sw(i,j)=v(i,j)-v(i,j-1); Where 2≤j≤lh; 2≤i≤mh, after traversing all i, j, the grayscale value change value in the horizontal direction is obtained, and the change value is offset. When sw(i, j)<0, sw(i,j-1)=255, sw(i,j)=0; the horizontal contour map sw of the binary image is obtained from the grayscale value change value after offset; It should be noted that: i, j represent the position of the pixel in the image, v(i, j) represents the pixel grayscale value of the binary image v in the i-th row and j-th column, and sw(i, j) represents the pixel grayscale value of the horizontal contour image sw in the i-th row and j-th column.

[0029] It should be noted that: since the grayscale value of a pixel of a binary image is 0 or 255, the change value of the pixel grayscale value is equal to the grayscale value of the pixel value.

[0030] Step S322: Refer to Figure 3 , traverse the pixels in each column of the binary image v, save the change value of the pixel gray value, and obtain the vertical contour map, which is recorded as cw; The specific process is as follows: cw(i,j)=v(i,j)-v(i-1,j); Where 2≤j≤lh; 2≤i≤mh. After traversing all i and j, the grayscale value change value in the vertical direction is obtained, and the change value is offset. When cw(i, j)<0, cw(i-1,j)=255, cw(i,j)=0. The vertical contour map cw of the binary image is obtained from the grayscale value change value after offset.

[0031] Step S323: traverse the horizontal contour map sw and the vertical contour map cw of the binary image v, obtain the maximum value of sw(i,j) and cw(i,j), and obtain the gray value w(i,j) of each pixel; Step S324: Calculate the number of feature points tz according to the horizontal contour map sw and the vertical contour map cw of the binary image v; The specific process is as follows: ; It should be noted that the feature point refers to the edge corner part of an independent pixel point or multiple pixel points in the contour image w, such as Figure 4 As shown, it can be shown in the horizontal contour map sw and the vertical contour map cw, so the point is a feature point if and only if sw(i,j)=cw(i,j)=255.

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

[0033] Step S4: obtaining the patient's age through the patient identity information in the patient information, and obtaining the image information of each part of the human body in each age group through the comparison information; obtaining the image information of each part of the human body in the corresponding age group according to the patient's age and the comparison information; obtaining the contour map and the number of feature points of the images of each part of the human body in the corresponding age group from the image information of each part of the human body in the corresponding age group; 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 images of each part of the human body in the corresponding age group, to obtain the part of the human body to which the medical image belongs; encrypting and storing the medical image according to the part of the human body to which the medical image belongs.

[0034] It should be noted that: each age group refers to the division of age according to human development, specifically divided into 0-1 years old, 1-3 years old, 3-7 years old, 7-14 years old, 14-18 years old, 18-60 years old, and over 60 years old; the image information of various parts of the human body refers to the medical image information of the head, chest, abdomen, pelvis, and limbs; the images of various parts of the human body at different age groups refer to standard medical images.

[0035] The specific steps of step S4 are as follows: Step S41: Obtain the age of the patient, and obtain image information of various parts of the human body in various age groups; according to the age of the patient combined with the comparison information, obtain image information of various parts of the human body in corresponding age groups; Step S42: Obtain image contours bw1, bw2, bw3, ... bwn of n parts from the image information of each part of the human body in the corresponding age group; traverse the image contours bw1, bw2, bw3, ... bwn of each part of the human body to obtain the number of pixels bs1, bs2, bs3, ... bsn with grayscale values ​​greater than 0 in the image contours of each part of the human body; obtain the number of characteristic points tz1, tz2, tz3, ... tzn in the image contours of each part of the human body; Step S43: traverse the contour map w of the medical image, obtain the number s of pixels with grayscale values ​​greater than 0 in the contour map w of the medical image; obtain the number tz of feature points of the contour map; Step S44: Calculate the number of pixels s with grayscale values ​​greater than 0 in the contour map w of the medical image, the number of characteristic points tz in the contour map, and the number of pixels bs1, bs2, bs3 ... bsn with grayscale values ​​greater than 0 in the contour map of each part of the human body, and the number of characteristic points tz1, tz2, tz3 ... tzn in the contour map of each part of the human body, to obtain a ratio value bl of the number of pixels therebetween. k ; The specific calculation process is as follows: ; It should be noted that the value range of k is (0,n]; For example, for the number of pixels bs1 whose grayscale value is greater than 0 in the first human body part contour map, the specific calculation process is as follows: ; For example, for the number of pixels bs2 with grayscale values ​​greater than 0 in the second human body part contour map, the specific calculation process is as follows: ; For example, for the number of pixels bsn whose grayscale value is greater than 0 in the nth human body part contour map, the specific calculation process is as follows: ; Step S45: Calculate the ratio value to obtain the similarity value sa between the medical image and the images of various parts of the human body. k ; Similarity value sa k The specific calculation steps are as follows: ; It should be noted that a larger similarity value indicates that the medical image is consistent with the human body part image.

[0036] Compare all similarity values ​​and obtain the image of the human body part with the largest similarity value; obtain the human body part of the medical image;.

[0037] Step S46: Encrypt and store the medical image according to the human body part to which the medical image belongs, and find out whether there is a storage folder for the corresponding human body part. If so, encrypt and store the medical image in the folder. If not, create a new folder and encrypt and store the medical image. Step S461: obtaining the patient's medical image u, the binary image v of the medical image, the contour image w of the medical image, obtaining the patient's name, and encrypting the image according to the name; The specific encryption steps are as follows: Step S4611: According to the patient's name, obtain the alphabetical order of the first letters of the surname and first name as the 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 ranked 26 in the alphabet), b=19 (the letter s is ranked 19 in the alphabet); if the length of the patient's name is greater than 2, such as Zhang San San, the encrypted data is a=26, b=38 (19+19).

[0038] 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 gray value; for example, for a medical image u; u(i, j) = 255, perform encryption calculation to obtain a position encrypted image um; The specific calculation is as follows: ; Where: um(i,j) refers to the specific position in the image um, which is the i-th row and j-th column; All gray values ​​in the image are encrypted to obtain a position encrypted image; Step S4613: obtaining the maximum grayscale value mx in the position encrypted image, and flipping the grayscale value of the position encrypted image according to mx, reducing the grayscale value with a large value and enlarging the grayscale value with a small value, to obtain a flipped encrypted image fz; The specific process is as follows: ; Where: fz(i,j) refers to the specific position in the image um, which is the i-th row and j-th column; Step S4614: scaling the flipped encrypted image in equal proportion to enlarge the gap between similar gray values ​​to obtain the final encrypted image jm; The specific scaling process is as follows: ; Where: jm(i,j) refers to the specific position in the image um, which is the i-th row and j-th column; The processing steps of the binarized image v of the medical image and the contour image w of the medical image are the same as those of the medical image u; It should be noted that image decryption is the reverse process of encryption. You only need to know the encrypted data and calculate the unencrypted image in reverse according to the encryption process. Step S462: searching for a storage folder for the corresponding human body part; if there is a storage folder for the corresponding human body part, entering the folder, creating a new folder under the folder, saving the encrypted patient's medical image u, the binary image v of the medical image, and the contour image w of the medical image, and obtaining the patient's ID number according to the patient's identity information to name the folder; Step S463: If there is no storage folder for the corresponding human body part, create a new storage folder for the corresponding human body part, name it the human body part, enter the folder, create a new folder under the folder, save the encrypted patient's medical image u, the binary image v of the medical image, and the contour map w of the medical image, and name the folder based on the patient's identity information and the ID number.

[0039] Embodiment 2 See also 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, the data processing module, the image classification module, and the image storage module are respectively connected to the database.

[0040] Data receiving module: used to obtain patient identity information, medical image information, obtain patient information, obtain image information of various parts of the human body of different age groups, and obtain comparison information.

[0041] Image processing module: used to obtain the patient's medical image u according to the medical image information in the patient information, obtain the gray value of each pixel from the medical image u, build a separation model from the gray value of each pixel, obtain the image separation value FL through the model, and obtain the separation values ​​FL of different gray values; obtain the gray value that makes the separation value FL maximum as the gray value threshold; binarize the image 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 of the medical image and the number of feature points tz; Image classification module: used to obtain the patient's age through the patient's identity information in the patient information, and obtain the image information of each part of the human body in each age group through the comparison information; obtain the image information of each part of the human body in the corresponding age group according to the patient's age combined with the comparison information; obtain the contour map and the number of feature points of the image of each part of the human body in the corresponding age group from the image information of each part of the human body in 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 images of each part of the human body in the corresponding age group to obtain the human body part to which the medical image belongs; Image storage module: used to encrypt and store medical images according to the human body part to which they belong, and to find out whether there is a storage folder for the corresponding human body part. If so, the images are encrypted and stored in the folder. If not, a new folder is created and stored. The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technical personnel in this field according to actual conditions. For example, if there are weight coefficients and proportional coefficients, their set sizes are to quantify each parameter to obtain a specific value, which is convenient for subsequent comparison. Regarding the size of the weight coefficient and the proportional coefficient, it is sufficient as long as it does not affect the proportional relationship between the parameter and the quantized value.

[0042] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for managing medical images, characterized in that: Management methods include: Step S1: Obtain the medical image of the patient to form medical image information; obtain the name, age, and ID number of the patient to form the patient's identity information; obtain image information of various parts of the human body in various age groups to obtain comparison information; Step S2: obtaining a medical image of the patient according to the medical image information, obtaining a gray value of each pixel from the medical image, constructing a separation model according to the gray value of each pixel, obtaining a separation value of the image, and obtaining a gray value threshold according to the separation value of the image; Step S3: binarizing the image according to the gray value threshold; obtaining the binarized image and analyzing 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, the patient's age is obtained, and combined with the comparison information, the image information of each part of the human body in the corresponding age group is obtained; based on the contour map and the number of feature points of the medical image, the human body part of the medical image is judged; based on the human body part of the medical image combined with the patient's name and ID number, the medical image is encrypted and stored.

2. A method for managing medical images according to claim 1, characterized in that: The specific steps of step S2 are as follows: Step S21: obtaining a medical image u of the patient according to the medical image information of the patient, obtaining image pixels of the medical image u, and obtaining a total number of pixels G; traversing the medical image, obtaining a pixel gray value x of each pixel, and counting the number of pixels with a gray value of x to obtain a pixel number y(x); Step S22: constructing a separation model through the pixel gray value x and the number of pixels y(x), dividing the gray value of the medical image into two parts according to the separation model, and obtaining the separation value FL of the image through the separation model; Step S23: According to the separation model, the separation values ​​FL corresponding to different gray values ​​are obtained, the maximum separation value is obtained, and the gray value corresponding to the separation value is obtained as the gray value threshold.

3. A method for managing medical images according to claim 2, characterized in that: The specific steps of step S22 are as follows: Step S221: obtain an arbitrary gray value TH, and divide the image pixels into two categories C1 and C2 according to TH; obtain the number of pixels and the gray values ​​of the pixels in categories C1 and C2, and calculate the average gray values ​​of the pixels in categories C1 and C2; obtain the gray value mean m1 of C1 and the gray value mean m2 of C2, and calculate the average gray values ​​of all pixels according to the total number of pixels and the gray values ​​of the pixels to obtain the gray value mean mG; Step S222: according to the number of pixels of category C1 and category C2 and the total number of pixels, obtain probability values ​​p1 and p2 that the pixel belongs to category C1 and category C2; Step S223: Obtain the inter-class variance σ of the image from m1, m2, mG, p1 and p2 2 ; Step S224: Based on m1 and m2, calculate the variance of pixels in classes C1 and C2 to obtain the intra-class variance σ(C1) of C1. 2 , intra-class variance of C2σ(C2) 2 ; Step S225: Using the inter-class variance σ 2 The intra-class variance of C1 is σ(C1) 2 , intra-class variance of C2σ(C2) 2 , find the separation value FL of the image; 。 4. A 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 comparing the grayscale values ​​of the pixels in class C1 with the grayscale mean m1 of C1. 2 ; Intra-class variance σ (C1) 2 The specific calculation process is as follows: ; Step S2242: Calculate the intra-class variance σ(C2) of C2 by using the grayscale value of the pixel in class C2 and the grayscale value mean m2 of C2. 2 ; Intra-class variance σ (C2) 2 The specific calculation process is as follows: 。 5. A 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, the grayscale value of the pixel is set to 255; if it is less than the grayscale value threshold, the grayscale value of the pixel is set to 0; Step S32: Obtain a binary image v, analyze the binary image v, obtain contour maps of the medical image in the horizontal direction and the vertical direction, superimpose the contour maps in the horizontal direction and the vertical direction to obtain the contour map w of the medical image; obtain the number of feature points tz by calculating the contour maps in the horizontal direction and the vertical direction; Step S33: Obtain the contour map w of the medical image from the grayscale value w(i,j) of each pixel and proceed to step S4.

6. A method for managing medical images according to claim 5, characterized in that: The specific steps of step S32 are as follows: Step S321: according to the binary image v, obtain the number of rows mh and the number of columns lh of the binary image v; traverse the pixels of each row of the binary image v, save the change value of the pixel gray value, and obtain a horizontal contour map, which is recorded as sw; The specific process is as follows: sw(i,j)=v(i,j)-v(i,j-1); Among them: 2≤j≤lh; 2≤i≤mh, after traversing i, j, the gray value change value in the horizontal direction is obtained, and the change value is offset. When sw(i, j)<0, sw(i,j-1)=255, sw(i,j)=0; the horizontal contour map sw of the binary image is obtained from the gray value change value after offset; Step S322: traverse the pixels of each column of the binary image v, save the change value of the pixel gray value, and obtain a vertical contour map, which is recorded as cw; The specific process is as follows: cw(i,j)=v(i,j)-v(i-1,j); Among them: 2≤j≤lh; 2≤i≤mh, after traversing i, j, the gray value change value in the vertical direction is obtained, and the change value is offset. When cw(i, j)<0, cw(i-1,j)=255, cw(i,j)=0; the vertical contour map cw of the binary image is obtained from the gray value change value after offset; Step S323: traverse the horizontal contour map sw and the vertical contour map cw from the binary image v, obtain the maximum value of sw(i,j) and cw(i,j), and obtain the gray value w(i,j) of each pixel; Step S324: Calculate the number of feature points tz according to the horizontal contour map sw and the vertical contour map cw of the binary image v; 。 7. A method for managing medical images according to claim 1, characterized in that: The specific steps of step S4 are as follows: Step S41: Obtain the age of the patient, and obtain image information of various parts of the human body in various age groups; according to the age of the patient combined with the comparison information, obtain image information of various parts of the human body in corresponding age groups; Step S42: Obtain image contours bw1 to bwn of n parts from the image information of each part of the human body in the corresponding age group; traverse the image contours of each part of the human body to obtain the number of feature points tz1 to tzn in the image contours of each part of the human body, and the number of pixels bs1 to bsn with grayscale values ​​greater than 0 in the image contours of each part of the human body; Step S43: traverse the contour map w of the medical image, obtain the number s of pixels with grayscale values ​​greater than 0 in the contour map w of the medical image; obtain the number tz of feature points of the contour map; Step S44: Calculate the ratio of the number of pixels bl according to s, tz, bs1 to bsn, and tz1 to tzn k ; ; Among them: the value range of k is (0, n]; Step S45: Calculate the ratio value to obtain the similarity value sa between the medical image and the images of various parts of the human body. k ; ; The similarity value is judged to obtain the image of the human body part with the largest similarity value; the human body part of the medical image is obtained; Step S46: Encrypt and store the medical image according to the human body part of the medical image.

8. A method for managing medical images according to claim 7, characterized in that: The specific steps of step S46 are as follows: Obtain the patient's medical image u, the binary image v of the medical image, the contour image w of the medical image, obtain the patient's name, and encrypt the image according to the name; ①According to the patient's name, obtain the alphabetical order of the first letter of the last name and the first name as encrypted data, denoted as a and b; ② 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; perform encryption calculation on the medical image u; u(i, j) = 255 to obtain the position encrypted image um; The specific calculation is as follows: ; Where: um(i,j) refers to the specific position in the image um, which is the i-th row and j-th column; All gray values ​​in the image are encrypted to obtain a position encrypted image; ③ Obtain the maximum grayscale value mx in the position encrypted image, and flip the grayscale value of the position encrypted image according to mx, reduce the grayscale value with a large value, and enlarge the grayscale value with a small value; obtain the flipped encrypted image fz; The specific process is as follows: ; Where: fz(i,j) refers to the specific position in the image um, which is the i-th row and j-th column; ④ Scale the flipped encrypted image proportionally to enlarge the gap between similar gray values ​​to obtain the final encrypted image jm; The specific scaling process is as follows: ; Where: jm(i,j) refers to the specific position in the image um, which is the i-th row and j-th column; According to steps ①-④, the binary image v and the contour map w of the medical image are encrypted.

9. A management system for medical images, applicable to any one of the management methods for medical images in claims 1-8, characterized in that: The management system includes: Data receiving module: used to obtain patient identity information and medical image information; obtain image information of various parts of the human body at different ages and obtain comparative information; Image processing module: used to obtain the patient's medical image u according to the medical image information, obtain the gray value of each pixel and build a separation model, and obtain the separation value FL of the image through the model; use the gray value with the largest separation value as the gray value threshold; perform binarization on the image according to the gray value threshold; obtain the binarized image of the medical image for analysis, and obtain the contour map w of the medical image and the number of feature points tz; Image classification module: used to obtain the patient's age through the patient's identity information, and obtain the image information of each part of the human body in each age group through comparison information; obtain the image information of each part of the human body in the corresponding age group according to 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 in the corresponding age group from the image information of each part of the human body in the corresponding age group; perform comparison and matching based on the medical image to obtain the human body part corresponding to the medical image; Image storage module: used to encrypt and store medical images according to the part of the human body to which the medical images belong.

Citation Information

Patent Citations

  • Moving object extraction method and device

    CN110148151A

  • Image element extraction method and device

    CN110473222A

  • Medical image recognition method, system, equipment and medium

    CN113705477A

  • CT (Computed Tomography) photo anomaly recognition equipment based on image recognition

    CN114119600A

  • Medical image data sharing system based on big data analysis

    CN115019972A