A lossless medical image authentication method based on histogram stretching

By combining adaptive inter-neighbor pixel interpolation dilation and Ostu segmentation techniques with corresponding bit histogram repetition embedding and prediction error expansion methods, the problems of privacy leakage and misdiagnosis of medical images during network transmission are solved, achieving efficient information embedding and lossless authentication.

CN115662583BActive Publication Date: 2026-05-15XIAN UNIV OF POSTS & TELECOMM
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAN UNIV OF POSTS & TELECOMM
Filing Date
2022-11-29
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing medical images are easily copied and tampered with during network transmission, leading to privacy leaks and misdiagnosis risks. Furthermore, existing reversible information hiding technologies are prone to image quality distortion or insufficient embedding capacity when embedding information.

Method used

Adaptive inter-neighbor interpolation (AIA) is used for image interpolation and expansion. Combined with the Ostu segmentation method, the image is divided into regions of interest and non-regions of interest. The corresponding bit histogram repeated embedding method is used to embed secret information in the regions of interest, and the prediction error expansion method is used to embed information in the non-regions of interest, ensuring the reversibility and quality of the image.

Benefits of technology

While ensuring image quality and reversibility, the information embedding capacity is increased, effectively avoiding image distortion caused by histogram stretching, protecting patient privacy and hospital rights, and achieving non-destructive authentication of medical images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115662583B_ABST
    Figure CN115662583B_ABST
Patent Text Reader

Abstract

The application discloses a lossless medical image authentication method based on histogram stretching, utilizes an adaptive adjacent pixel interpolation expansion (AIA) technology to obtain seed pixels and non-seed pixels, regards pixel points of an input image A as seed pixel points, regards pixel points obtained through expansion as non-seed pixel points, the seed pixels remain unchanged during embedding, ensures reversibility of the scheme, balances embedding capacity and camouflage image quality at the same time, then carries out segmentation on the image to obtain a region of interest (ROI) and a non-region of interest (RONI), and finally embeds sensitive information such as electronic patient records (EPR) and electronic signatures of medical images as secret information, and adopts a corresponding bit histogram shift and repeat embedding method (CBHSR) in the region of interest. The application effectively avoids image distortion problems introduced by histogram stretching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to medical image authentication methods, specifically to a non-destructive medical image authentication method based on histogram stretching. Background Technology

[0002] Currently, the rapid development of internet and multimedia technologies has provided new technological means for telemedicine, remote diagnosis, and remote surgery. While digital information is easier to store and transmit, saving time and costs, medical information stored and transmitted over the network is vulnerable to illegal copying and tampering, leading to privacy breaches and even misdiagnosis. Medical images, as a crucial basis for doctors' diagnoses, have extremely stringent quality requirements; even minor distortions can cause misdiagnosis or serious medical accidents. Therefore, addressing the security issues of medical information in a network environment is a practical problem that must be solved during the construction of medical information systems.

[0003] To ensure the reliability and usability of medical images, researchers have turned their attention to reversible information hiding technology. Information hiding is a technique that conceals secret information within a publicly transmitted medium. This technology primarily utilizes the high redundancy of multimedia data, and the fact that human vision or hearing does not perceive any significant changes in the medium after the hidden information is embedded, thus effectively avoiding the attention of attackers and achieving the goal of secure transmission of secret information. The information hiding process generally includes two parts: data embedding and data extraction. Data embedding refers to hiding the secret information into the original medium, while data extraction refers to retrieving the hidden information from the medium. Information hiding technology embeds secret information into the medium's information without its perception and can be used in fields such as copyright protection, image authentication, and operation tracking.

[0004] Reversible information hiding technology is an important branch of information hiding technology, and its reversible nature has made it a hot research topic. Compared with traditional information hiding techniques, reversible information hiding technology can not only accurately extract secret information, but also recover the carrier image without loss. This has significant practical applications in fields such as medicine, military, and law, where high image quality is required. The flowchart of the reversible information hiding algorithm is shown below. Figure 1 As shown.

[0005] 1. Interpolation is the process of "guessing" unknown points using a series of known data points. In the field of image processing, interpolation is often used when resizing images. It involves calculating points in the new image matrix from points in the original image matrix. Different calculation processes result in different interpolation algorithms. Nearest neighbor interpolation uses only the gray value of the pixel closest to the sample point, without considering the influence of other adjacent pixels. Therefore, the gray values ​​after resampling show significant discontinuities, resulting in substantial image quality loss and noticeable pixelation and jagged edges. Bilinear interpolation performs better than nearest neighbor interpolation, but it requires more computation, is more complex, and takes longer to run. Furthermore, this method only considers the influence of the gray values ​​of the four direct neighbors of the sample point, neglecting the influence of the rate of change of gray values ​​between neighbors. Therefore, it acts like a low-pass filter, leading to a loss of high-frequency components in the scaled image and a degree of blurring at image edges. Compared to the input image, the output image scaled using this method still suffers from image quality degradation and low computational accuracy due to inadequate interpolation function design. Bicubic interpolation has low-pass filtering properties, which can lead to the loss of high-frequency components in the interpolated image, resulting in blurred image edges. Even minor alterations to medical images can cause diagnostic errors; therefore, medical diagnosis demands high-quality images. However, none of the three interpolation algorithms mentioned above can adequately guarantee the quality of the embedded image.

[0006] 2. During data sharing, such as in telemedicine, sensitive information such as users' personal information (name, age, electronic medical records), medical insurance and social security details, and electronic signatures on medical images can easily be leaked, leading to unimaginable consequences for both patients and hospitals, and also causing adverse social impacts. Therefore, hiding patient personal information or hospital logos within medical images protects patient privacy while maintaining the hospital's ownership of the images. Doctors' diagnostic information can also be embedded in medical images, facilitating efficient transfer of diagnostic plans when patients change teams, thus better promoting medical consultation, diagnosis, and treatment. It can also serve as effective evidence in handling medical malpractice disputes. However, because the watermark embedding capacity using the histogram translation method depends on the image's grayscale distribution, the amount of watermark that can be embedded in images with a relatively uniform grayscale distribution is very limited. Furthermore, increasing the embedding capacity often leads to a decrease in the quality of the embedded image, failing to effectively avoid the risk of medical information leakage and the problem of medical image distortion.

[0007] 3. Currently, researchers are applying reversible information hiding techniques to the medical field based on difference expansion (DE), histogram shifting (HS), prediction error expansion (PEE) and other techniques.

[0008] Current proposed contrast-enhanced reversible information hiding schemes, adaptive reversible watermarking algorithms, large-capacity reversible medical image data hiding schemes based on region-of-interest contrast enhancement, and secure solutions for medical image restoration all directly embed information in the stretched histogram. This inevitably leads to a significant increase in image contrast, compromising the imperceptibility required for information hiding. Summary of the Invention

[0009] The main objective of this invention is to provide a non-destructive medical image authentication method based on histogram stretching. The proposed adaptive inter-neighbor interpolation expansion (AIA) technique is used to obtain seed pixels and non-seed pixels. The pixels of the input image A are called seed pixels, and the pixels obtained by expansion are called non-seed pixels. The seed pixels remain unchanged during the embedding process to ensure the reversibility of the scheme, while balancing the embedding capacity and the quality of the spoofed image.

[0010] The image is then segmented to obtain regions of interest (ROI) and regions of non-interest (RONI). Finally, sensitive information such as electronic patient records (EPR) and electronic signatures of medical images are embedded as secret information. The proposed corresponding bit histogram shift repetition embedding method (CBHSR) is used in the ROI to effectively avoid the image distortion problem introduced by histogram stretching.

[0011] The technical solution adopted in this invention is: a non-destructive medical image authentication method based on histogram stretching, comprising:

[0012] The first stage involves image interpolation and dilation, transforming the image to a size of... The input image is expanded by interpolation using neighboring pixels through an adaptive rounding method to obtain a size of [value missing]. The carrier image I;

[0013] The second stage is image segmentation. Based on the characteristics of medical images, the Ostu segmentation method is used to segment the carrier image, obtaining the region of interest (ROI), non-ROI, and quadrilateral regions. The ROI is the central region containing important information that contributes to accurate diagnosis; the non-ROI contains information that is not relevant to diagnosis; and the quadrilateral regions are fixed-size regions around the perimeter of the medical image. (The quadrilateral region is shown in the image description.) Figure 2 As shown, h A pre-set fixed value;

[0014] In the third stage, reversible data hiding is performed in the region of interest using the corresponding histogram repeated embedding technique.

[0015] In the fourth stage, reversible data hiding is performed in the non-interest areas using the prediction error propagation method;

[0016] The fifth stage involves data extraction and image restoration.

[0017] Furthermore, the first stage includes:

[0018] Input image A is expanded according to the following formula to obtain carrier image I:

[0019]

[0020]

[0021]

[0022]

[0023] in, i=0,1,…,M-1, j=0,1,…,N-1; The pixel values ​​of the last row and last column of the carrier image are equal to the pixel values ​​of its second-to-last row and second-to-last column;

[0024] The size is obtained The carrier image I.

[0025] Furthermore, the second stage includes:

[0026] The first step is to generate a histogram of the non-seed pixel image of the region of interest. H The stretching process is performed to obtain the stretching histogram. SH, when The range of pixel values ​​in the image histogram is [ H min , H max When ], the range of the stretched histogram is obtained by the following formula: [ L min , L max ];in round The representative uses the rounding rules.

[0027]

[0028] The second step involves identifying missing peaks in the stretched histogram and embedding secret information at the corresponding positions in the original histogram. If a pixel value in the stretched histogram does not have a corresponding pixel value in the original histogram, that peak point is not used. When there are available pixels... n At this time, the set of pixels usable in the stretched square diagram S It can be represented as The peak value, along with the secret information, is embedded into the next round of embedding. In the final round, the peak value is embedded into the four-sided region.

[0029] The third step, when embedding information, involves splitting the stretched histogram in half. Pixels in the original histogram whose secret information is 1 and whose stretched pixel value is in the left half are shifted to the right; pixels in the original histogram whose secret information is 1 and whose stretched pixel value is in the right half are shifted to the left. When the secret information is 0, the pixel value remains unchanged. The histogram shift is performed using the following formula:

[0030]

[0031] in k 1 These are the peak points of the original histogram. k 2 For the peak points of the stretched histogram, k ’ The peak point after embedding secret information;

[0032] Fourth, repeat steps two and three until there are no more peak points that meet the conditions;

[0033] The fifth step, the extraction and recovery process, is the reverse of steps one through four.

[0034] Furthermore, the extraction and recovery process includes:

[0035] Non-seed pixels in the ROI region are recovered using the following formula, where Modified when embedding information :

[0036]

[0037] Secret information is extracted using the following formula:

[0038] .

[0039] Furthermore, the third stage includes:

[0040] Image dilation

[0041] By using an adaptive inter-neighbor pixel interpolation dilation algorithm, the size is... The input image A is expanded to obtain a size of The carrier image I;

[0042] Image segmentation

[0043] The Ostu segmentation method is used to segment the image by finding the optimal threshold; during segmentation, seed pixels... I(x,y) The three non-seed pixels that are determined to expand I(x,y+1), I(x+1,y) and I(x+1,y+1) Which region does it belong to?

[0044] Information to be embedded

[0045] The four-sided region is preprocessed, and the least significant bit (LSB) and pixels with LSB vacancies are extracted. The LSB of the pixels in the four-sided region is concatenated with secret information to obtain the information to be embedded, which is used for carrier recovery. The secret information includes patient information, diagnostic information, and other privacy information, as well as the seed pixel hash values ​​of ROI and RONI. The information to be embedded is then encrypted to obtain the encrypted information to be embedded. B;

[0046] Region of Interest Information Embedding

[0047] The information to be embedded is embedded into the non-seed pixels of the region of interest (ROI) using the corresponding bit histogram repeated embedding method described above, while the seed pixels remain unchanged, thus obtaining the disguised ROI. The ROI payload, the last peak value of the ROI, and the maximum and minimum values ​​of the original ROI pixels are saved as additional information.

[0048] Embedding of information of no interest

[0049] The remaining information to be embedded is embedded into the non-seed pixels of the non-interest region according to the prediction error expansion method, while the seed pixels remain unchanged, thus obtaining the disguised non-interest region.

[0050] Additional information embedded in the four areas

[0051] The generated additional information is embedded into the least significant bit empty square region pixel using the LSB embedding method to obtain the dummy square region.

[0052] The camouflaged region of interest, the camouflaged region of non-interest, and the camouflaged quadrilateral region together constitute the camouflaged image.

[0053] Furthermore, the prediction error expansion method includes:

[0054] Predictor: Current pixel The mean of the two adjacent pixels to the left and right is used as the predicted value. The mathematical expression for the predictor:

[0055]

[0056] Prediction error:

[0057]

[0058] Prediction error expansion and information embedding, T Used to indicate the range of prediction error values ​​used:

[0059]

[0060]

[0061] Modify pixel values:

[0062]

[0063] Among them, the RONI location map M is a binary map composed of 0s and 1s, used to record whether the pixels in the RONI region can be used for embedding information; when When, it indicates that the embedding information of the pixel located in the i-th row and j-th column may overflow and cannot be used for embedding information; when At that time, the pixel can be used to embed information.

[0064] Furthermore, the fourth stage includes:

[0065] Based on the default square region width h, the fake square region and the fake non-square region are divided.

[0066] Based on the seed pixels of the camouflaged non-quadrilateral region, the same segmentation method at the embedding end is used to divide the camouflaged region of interest and the camouflaged region of non-interest of interest.

[0067] Based on the seed pixels of the disguised non-square regions, the same image dilation method at the embedding end is used to recover the carrier image pixel values ​​excluding the square regions;

[0068] Additional information is extracted from the LSB in the camouflaged quad region to obtain the ROI payload, the maximum and minimum values ​​of ROI pixels, the hash value of the ROI seed pixel, the RONI payload, the RONI compressed location map, and the hash value of the RONI seed pixel; the location map is decompressed to obtain the location map; at this point, the quad region is a quad region with the least significant bit missing;

[0069] Extraction of region of interest information by disguise;

[0070] Information extraction from disguised non-interested regions;

[0071] The information extracted by masquerading as regions of interest and regions of non-interest is encrypted information to be embedded. Decryption yields the secret information and the least significant bit of the four-sided region.

[0072] The least significant bit (LSB) of the extracted quad region is embedded into the quad region with the least significant bit missing to obtain the recovered quad region.

[0073] The restored carrier image is obtained by restoring the square region and the non-square region, and the input image is obtained by restoring the seed pixels.

[0074] Furthermore, the extraction of the camouflaged region of interest information includes:

[0075] By comparing the changes in the non-seed pixels of the recovered region of interest (ROI) with those of the masqueraded ROI, the same transformation is performed on the stretched histogram of the non-seed pixels of the ROI, resulting in a stretched histogram that determines the extraction order. Based on the last peak value of the ROI extracted from the four regions, the corresponding bit histogram is repeatedly shifted to extract information. The stretched image block of the masqueraded ROI utilizes the non-seed pixels to provide the recovered histogram. The specific implementation is as follows:

[0076]

[0077]

[0078] in For region of interest, To disguise the area of ​​interest, SW represents the stretched region of interest, while SW represents the dummy region of interest after stretching. , and These are seed pixels, and their pixel values ​​remain unchanged.

[0079] It is worth noting that the information extracted in the last round of the extraction process is all embedded data, while the information extracted in the remaining rounds all contain 8 bits of peak point record information.

[0080] Furthermore, the extraction of the disguised non-interest area information includes:

[0081] The prediction error is expanded and extracted for non-seed pixels disguised as non-interest regions. The specific process is as follows:

[0082] Predict using the same predictor as the sender , to obtain the predicted value ;

[0083] The expanded prediction error is calculated using the following formula. ,in These are the pixel values ​​of the spoofed image;

[0084]

[0085] The original prediction error value is restored according to the following formula. :

[0086]

[0087] The secret data is calculated using the following formula:

[0088] .

[0089] Furthermore, the fifth stage includes:

[0090] When embedding the RONI location map into the four-sided region, compression is performed first. Based on the size relationship between the location map and the four-sided region, the RLE compression algorithm is selected for compression.

[0091] Advantages of this invention:

[0092] This invention uses the AIA interpolation algorithm to divide the pixels of a carrier image into seed pixels and non-seed pixels, with one seed pixel corresponding to three non-seed pixels. We embed secret information using non-seed pixels within the Region of Interest (ROI), while keeping the seed pixels unchanged. Theoretically, this increases the number of embeddable pixels, thereby improving the embedding capacity of the proposed scheme. Simultaneously, the presence of seed pixels simplifies the carrier image recovery process. For the extraction of secret information, the seed pixels and the histogram composed of non-seed pixels recovered from the seed pixels play indispensable roles. Therefore, the image interpolation method AIA proposed in this invention, while maintaining reversibility, largely guarantees embedding quality and has good applicability in the proposed scheme.

[0093] The lossless authentication scheme of this invention solves the problem of imperceptible damage to camouflaged images caused by embedding information using histogram stretching. This authentication method uses the stretched histogram as a tool for selecting the embedding position, embedding at the corresponding position on the original histogram, effectively avoiding the problem of excessively large pixel value differences at the same pixel point between the carrier image and the camouflaged image.

[0094] This invention uses histogram stretching, a method that causes contrast distortion, as a tool for location selection. By flexibly selecting the information embedding location within the ROI region, it improves the security of secret information embedding and extraction while ensuring good quality of the camouflaged image, especially effectively avoiding the imperceptible damage caused by contrast enhancement. The proposed AIA not only guarantees the reversibility of the method but also balances the problem of reduced embedding capacity caused by CBHSR.

[0095] The algorithm used in the lossless authentication scheme of this invention is very simple to implement, has no special requirements for hardware devices, can be easily implemented on a general CPU platform, and has good applicability and portability.

[0096] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description

[0097] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0098] Figure 1 This is a flowchart of a reversible information hiding algorithm;

[0099] Figure 2 This is an example diagram of the ROI, RONI, and tetrahedral region of the present invention;

[0100] Figure 3 This is an example diagram of the adaptive inter-pixel interpolation expansion process of the present invention;

[0101] Figure 4 This is an example diagram showing the input and result of the corresponding bit histogram repetition embedding technique of the present invention;

[0102] Figure 5 This is a diagram illustrating the specific process of embedding the corresponding bit histogram repeat embedding technique of the present invention;

[0103] Figure 6 This is a flowchart illustrating the specific process of extracting corresponding bit histograms using the repetitive embedding technique of the present invention.

[0104] Figure 7 This is a flowchart of the lossless authentication algorithm embedding of the present invention. Detailed Implementation

[0105] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0106] Related existing technologies:

[0107] 1. Image interpolation algorithm

[0108] In digital image processing, to interpolate (scale) an image to a specified resolution, we need to employ interpolation strategies to calculate the color at the corresponding positions after scaling. The principle of interpolation scaling is based on points in the target resolution, mapping them to the source image according to the scaling relationship, finding points in the source image (not necessarily integer pixels), and then interpolating the target points using the relevant points in the source image.

[0109] 1) Nearest Neighbor Interpolation Algorithm

[0110] The target image is scaled using a scaling factor to calculate the position of its scaled coordinates within the original image. Calculate the distance from the position. Find the nearest integer coordinate point and use the color of that location as the color of the target point.

[0111] 2) Bilinear interpolation

[0112] The target image is scaled using a scaling factor to calculate the position of its scaled coordinates within the original image. , interpolation is performed using the pixels of the 4 nearest points to obtain the output. The method of linear interpolation is used to perform pixel interpolation in two directions.

[0113] 3) Bicubic interpolation

[0114] For the target image, through the scaling factor, the position of the scaled coordinates in the original image is calculated , interpolation is performed using the pixels of the 16 nearest points to obtain the output. The method of non-linear interpolation is used to perform pixel interpolation in two directions. For the points on the image edge, the boundary can be added in a mapped manner to meet the requirement of 16 points.

[0115] 2. Histogram shifting technique

[0116] As an important part of reversible data hiding (RDH), the histogram shifting (HS) technique was first proposed by Z. Ni et al. in 2006. Now we introduce the algorithm given in this literature. The algorithm process is as follows:

[0117] 1) First, obtain the histogram of the original image, and find a zero point and a maximum point.

[0118] 2) The pixel value corresponding to the zero point found in the histogram is z, and the pixel value corresponding to the maximum point is m. Without loss of generality, assume m < z. Then, scan the pixel points of the image in order. If the value of the pixel point is between m + 1 and z - 1 (including these two values), then the value of this pixel is incremented by 1, so that the number of points with pixel value m + 1 becomes zero.

[0119] 3) Hiding information: Scan the image in order. If the pixel value is m and the data bit to be hidden is 1, then the pixel value is incremented by 1; otherwise, if the data bit to be hidden is 0, then the pixel value remains unchanged.

[0120] 4) Extracting information: Scan the image in order. If the pixel value is m, then an information bit 0 is extracted; if it is m + 1, then the extracted information bit is 1, until the image data scanning is completed. In this way, the extraction of the hidden information is completed.

[0121] 5) Restoration of the original image: Scan the image in order, and subtract 1 from all values between m and z - 1. In this way, the original image is completely restored.

[0122] 3. Histogram direct stretching technique

[0123] Histogram stretching technology is used to stretch the grayscale of an image to improve its perceived quality, thereby increasing dynamic range or revealing image details.

[0124] The embedding algorithm flow for histogram direct stretching technology is as follows:

[0125] 1) Find the maximum gray value of the region R to be stretched in the original image. and minimum gray value The image is then stretched to obtain the corresponding grayscale value of each pixel and the stretched image is denoted as SR.

[0126] 2) Select the peak gray values ​​of adjacent missing values ​​in the stretched histogram. Embed the secret data, repeat the operation until all the secret data is embedded or there are no missing adjacent bits. The grayscale value of the last peak during embedding will be included. Embedded into the next round of embedding.

[0127] The extraction algorithm flow of the histogram direct stretching technique is as follows:

[0128] 1) Extract the grayscale value of the last peak during embedding. .

[0129] 2) According to Based on the payload size of the original graph R, extract the secret data and recover SR.

[0130] 3) According to and Restore R.

[0131] Technical solution of the present invention

[0132] This lossless authentication method utilizes the proposed Adaptive Neighbor Interpolation Expansion (AIA) technique to obtain seed pixels and non-seed pixels. The pixels of the input image A are called seed pixels, and the pixels obtained through expansion are called non-seed pixels. The seed pixels remain unchanged during embedding to ensure the reversibility of the scheme, while balancing embedding capacity and spoofing image quality.

[0133] The image is then segmented to obtain regions of interest (ROI) and regions of non-interest (RONI). Finally, sensitive information such as electronic patient records (EPR) and electronic signatures of medical images are embedded as secret information. The proposed corresponding bit histogram shift repetition embedding method (CBHSR) is used in the ROI to effectively avoid the image distortion problem introduced by histogram stretching.

[0134] The entire lossless authentication method consists of five stages: the first stage is image interpolation and dilation, which transforms the image into a larger format. The input image is expanded by interpolation using neighboring pixels through an adaptive rounding method to obtain a size of [value missing]. The first stage is the carrier image I; the second stage is image segmentation. Based on the characteristics of medical images, the Ostu segmentation method is used to segment the carrier image, obtaining the region of interest (ROI), non-ROI, and quadrilateral regions. The ROI is the central region containing important information that contributes to accurate diagnosis. The non-ROI contains information that is not relevant to diagnosis. The quadrilateral regions are fixed-size regions around the perimeter of the medical image, such as... Figure 2 As shown, h The first stage is to use a pre-set fixed value; the second stage is to perform reversible data hiding in the region of interest by using the corresponding histogram repeated embedding technique; the third stage is to perform reversible data hiding in the region of non-interest by using the prediction error expansion method; and the fourth stage is to perform data extraction and image restoration.

[0135] The following is a detailed introduction to these five stages.

[0136] 1. Adaptive inter-pixel interpolation dilatation technique

[0137] Input image A is expanded according to the following formula to obtain carrier image I:

[0138]

[0139]

[0140]

[0141]

[0142] in, i=0,1,…,M-1, j=0,1,…,N-1 The pixel values ​​in the last row and last column of the carrier image are equal to the pixel values ​​in the second-to-last row and second-to-last column.

[0143] Thus, we obtain a size of The carrier image I.

[0144] A simple adaptive inter-neighbor interpolation process is as follows: Figure 3 As shown, the size is The input image is expanded to One seed pixel can produce three non-seed pixels.

[0145] 2. Corresponding bit histogram repetition embedding technique

[0146] 1) Histogram of non-seed pixel images of the region of interest H The stretching process is performed to obtain the stretching histogram. SH Assume the range of pixel values ​​in the image histogram is [ Hmin , H max The range of the stretched histogram is obtained by the following formula: L min , L max ].in round The representative uses the rounding rules.

[0147]

[0148] 2) Locate missing peaks in the stretched histogram and embed secret information at the corresponding positions in the original histogram. If a pixel value in the stretched histogram does not have a corresponding pixel value in the original histogram, the peak point is not used. When there are available pixels... n At this time, the set of pixels usable in the stretched square diagram S It can be represented as The peak value, along with the secret information, is embedded into the next round of embedding. In the final round, the peak value is embedded into the four-sided region.

[0149] 3) When embedding information, the stretched histogram is divided in half. Pixels in the original histogram whose secret information is "1" and whose stretched pixel value is in the left half are shifted to the right; pixels in the original histogram whose secret information is "1" and whose stretched pixel value is in the right half are shifted to the left; when the secret information is "0", the pixel value remains unchanged. The histogram shift is performed using the following formula:

[0150]

[0151] in k 1 These are the peak points of the original histogram. k 2 For the peak points of the stretched histogram, k ’ The peak point after embedding secret information.

[0152] 4) Repeat steps 2) and 3) until there are no more peak points that meet the conditions.

[0153] 5) The extraction and restoration process is the reverse of the above process. Non-seed pixels in the ROI region are restored using the following formula, where... Modified when embedding information :

[0154]

[0155] Secret information is extracted using the following formula:

[0156]

[0157] Examples of corresponding bit histogram repetition embedding techniques are as follows: Figure 4 , Figure 5 and Figure 6 As shown.

[0158] The specific embedding process is as follows: Figure 5 As shown, Figure 5 The first row of each sub-image shows the information embedding process of the original histogram, and the second row shows the process of selecting the embedding position using the stretched histogram. The pixel value range is stretched from [3,8] to [1,10] for information embedding.

[0159] In the first round, the original histogram had bin points. The stretched histogram is a bit... In the stretched histogram, the peak point SH(3)=20 is found, which belongs to [1,4] and has a missing right neighbor. The embedding position is determined to be the bin with a pixel value of 4 in the original histogram. We embed 20 bits of information into the corresponding point in the original histogram. We assume that the information to be embedded, '0' and '1', appear with equal probability, H(4)=H(5)=10, and at this time SH(3)= SH(4)=10.

[0160] In the second round, the peak point of the stretched histogram is SH(8)=16, which belongs to [7,10] and has a missing left neighbor. 16 bits of information are embedded into H(7). H(7)=H(6)=8, at this time SH(8)=SH(7)=8.

[0161] In the third round, the peak point of the stretched histogram is SH(1)=10, which belongs to [1,4] and has a missing right neighbor. 10 bits of information are embedded into H(3). H(3)=H(4)=5, at this time SH(1)=SH(2)=5.

[0162] In the fourth round, SH(3) has no missing right neighbor, and SH(4) and SH(7) have no corresponding positions in the original histogram, so they are not used. The peak point of the stretched histogram is SH(10)=8, which belongs to [7,10] and has a missing left neighbor, so 8 bits of information are embedded into H(8). H(8)=H(7)=4, at this time SH(10)=SH(9)=4. All selectable bits are filled, and the peak point of the last round of the stretched histogram is saved. A maximum of 54 bits of information are embedded into the selectable bits. The result is as follows. Figure 4 (b) shows a histogram where the first row is the original histogram and the second row is a stretched histogram of the original histogram.

[0163] The specific extraction process is as follows: Figure 6 As shown. Figure 6The first row of each subgraph is the information extraction process from the histogram of the camouflaged image, and the second row is the process of determining the extraction position using the stretched histogram. In the first round, the last round peak point SH(10)∈[7,10] is saved, and the left neighbor SH(9)=4. The extraction position is determined, and 8 bits of embedding information are extracted from H(8) and H(7). This is repeated 4 times until the secret information is completely extracted. Figure 4 (a) shows a histogram where the first row is the histogram after embedding information and the second row is the stretched histogram after embedding information.

[0164] 3. Embedding Algorithm

[0165] The embedding algorithm block diagram of this lossless authentication method is as follows: Figure 7 As shown.

[0166] 1) Image dilation

[0167] By using the above adaptive inter-neighbor pixel interpolation dilation algorithm, the size is... The input image A is expanded to obtain a size of The carrier image I.

[0168] 2) Image segmentation

[0169] The Ostu segmentation method (maximum inter-class distance) is used to segment the image by finding the optimal threshold. Seed pixels are used during segmentation. I(x,y) The three non-seed pixels that are determined to expand I(x,y+1), I(x+1,y) and I(x+1,y+1) Which region does it belong to?

[0170] 3) Generation of information to be embedded

[0171] The four-sided region is preprocessed, and the least significant bit (LSB) and pixels with LSB vacancies are extracted. The LSB of each pixel in the four-sided region is concatenated with secret information to obtain the information to be embedded, used for carrier reconstruction. The secret information includes patient information, diagnostic information, and other privacy-related information, as well as the seed pixel hash values ​​of the ROI and RONI. The information to be embedded is then encrypted to obtain the encrypted information to be embedded. B .

[0172] 4) Embedding of Region of Interest Information

[0173] The information to be embedded is repeatedly embedded into the non-seed pixels of the region of interest (ROI) using the corresponding bit histogram embedding method described above, while the seed pixels remain unchanged, thus obtaining a masquerading ROI. To ensure correct information extraction and image reconstruction later, it is necessary to save the ROI payload, the last peak value of the ROI, and the maximum and minimum pixel values ​​of the original ROI as additional information.

[0174] 5) Embedding non-interesting information

[0175] The remaining information to be embedded is then embedded into the non-seed pixels of the non-interest region using the prediction error expansion method, while the seed pixels remain unchanged, thus obtaining a disguised non-interest region. To avoid pixel overflow, a location map is used for recording.

[0176] The process of prediction error spread:

[0177] a. Predictor: Current pixel The mean of the two adjacent pixels to the left and right is used as the predicted value. The mathematical expression for the predictor:

[0178]

[0179] b. Prediction error:

[0180]

[0181] c. Prediction error expansion and information embedding. T Used to indicate the range of prediction error values ​​used:

[0182]

[0183]

[0184] d. Modify pixel values:

[0185]

[0186] In order to correctly extract secret information and recover carrier images, and to save the RONI location map and

[0187] Payload is additional information.

[0188] Among them, RONI location map It is a binary image composed of "0"s and "1"s, used to record whether pixels in the RONI region can be used for embedding information. When When, it indicates that the embedding information of the pixel located in the i-th row and j-th column may overflow and cannot be used for embedding information; when At that time, the pixel can be used to embed information.

[0189] 6) Embed additional information in the four-sided area

[0190] The additional information generated in steps 5 and 6 is embedded into the least significant vacant square region pixel using the LSB embedding method to obtain the dummy square region.

[0191] The camouflaged region of interest, the camouflaged region of non-interest, and the camouflaged quadrilateral region together constitute the camouflaged image.

[0192] 4. Extraction and Recovery Algorithms

[0193] 1) Based on the default square area width h, the fake square area and the fake non-square area are divided.

[0194] 2) Based on the seed pixels of the masquerading non-square region, the same segmentation method is used at the embedding end to divide the region of interest into masquerading region of interest and region of non-interest.

[0195] 3) Based on the seed pixels of the disguised non-square regions, the same image dilation method at the embedding end is used to recover the carrier image pixel values ​​other than the square regions.

[0196] 4) Extract additional information from the LSB in the camouflaged quadrilateral region to obtain the ROI payload, the maximum and minimum ROI pixel values, the hash value of the ROI seed pixel, the RONI payload, the RONI compressed location map, and the hash value of the RONI seed pixel. Decompress the compressed location map to obtain the location map. At this point, the quadrilateral region is a quadrilateral region with a least significant bit vacancy.

[0197] 5) Extraction of information from disguised regions of interest

[0198] By comparing the changes in the non-seed pixels of the recovered region of interest (ROI) with those of the masqueraded ROI, the same transformation is performed on the stretched histogram of the non-seed pixels of the ROI, resulting in a stretched histogram that determines the extraction order. Based on the last peak value of the ROI extracted from the four regions, the corresponding bit histogram is repeatedly shifted to extract information. The stretched image block of the masqueraded ROI utilizes the non-seed pixels to provide the recovered histogram. The specific implementation is as follows:

[0199]

[0200]

[0201] in For region of interest, To disguise the area of ​​interest, SW represents the stretched region of interest, while SW represents the dummy region of interest after stretching. , and These are seed pixels, and their pixel values ​​remain unchanged.

[0202] It is worth noting that the information extracted in the last round of the extraction process is all embedded data, while the information extracted in the remaining rounds all contain 8 bits of peak point record information.

[0203] 6) Extracting information from disguised non-interesting regions

[0204] The prediction error is expanded and extracted for non-seed pixels disguised as non-interest regions. The specific process is as follows:

[0205] a. Use the same predictor as the sender to predict. , to obtain the predicted value ;

[0206] b. Calculate the expanded prediction error according to the following formula. ,in These are the pixel values ​​of the spoofed image;

[0207]

[0208] c. Restore the original prediction error value according to the following formula. :

[0209]

[0210] d. Calculate the secret data according to the following formula.

[0211]

[0212] 7) The information extracted from the disguised region of interest and the disguised region of non-interest is the encrypted information to be embedded. Decryption is performed to obtain the secret information and the least significant bit of the four-sided region.

[0213] 8) Embed the extracted least significant bit (LSB) of the quad region into the quad region with the least significant bit missing to obtain the recovered quad region.

[0214] 9) The restored carrier image is obtained by restoring the square region and the restored non-square region, and the input image is obtained by restoring the seed pixels.

[0215] 5. Run-length compression algorithm

[0216] To save storage space, the RONI location map is compressed before embedding it into the four-sided region. Based on the size relationship between the location map and the four-sided region, the RLE compression algorithm is selected for compression.

[0217] Run-length encoding (RLE) works by using an attribute representing the number of blocks and a data block to represent a series of otherwise continuous data strings. Since a location map is a binary image with a large number of consecutive black and white pixels, this compression algorithm is well-suited for this purpose.

[0218] Technical problem solved by the present invention

[0219] 1. Ensure embedding quality

[0220] When embedding EPR and medical logos as secret information, it is essential to ensure that the subjective and objective quality of medical images meets the actual diagnostic needs while effectively protecting patient privacy and hospital rights. This non-destructive authentication method, under the premise of reversibility, largely guarantees the embedding quality and has good applicability in the proposed scheme.

[0221] Currently, the fundamental techniques for reversible information hiding include differential expansion (DE), histogram shifting (HS), and prediction error expansion (PEE). Histogram-based reversible information hiding schemes and prediction error-based reversible watermarking schemes have been proposed, and researchers have continuously optimized and improved these schemes, particularly seeking a balance between embedding capacity and embedding quality. This authentication method proposes a novel image interpolation method, AIA, which largely guarantees embedding quality while satisfying reversibility, demonstrating good applicability to the proposed scheme.

[0222] 2. Ensure the imperceptibility of the camouflaged image.

[0223] This non-destructive authentication method addresses the imperceptible damage to spoofed images caused by embedding information using histogram stretching, and avoids the increased contrast problem resulting from histogram stretching.

[0224] Imperceptibility refers to the characteristic that embedding information does not cause a significant decrease in the quality of the original image or a noticeable change in visual effect. This is the premise and foundation of information hiding technology. If this requirement is not met, the fundamental characteristic of "hiding" is lost. Currently proposed reversible information hiding schemes, such as contrast-enhanced reversible information hiding schemes, adaptive reversible watermarking algorithms, and reversible medical image data hiding schemes based on region-of-interest contrast enhancement, all directly embed information in the stretched histogram. This inevitably leads to a significant increase in image contrast, thus undermining the imperceptibility requirement of information hiding.

[0225] Based on the characteristics of medical images, this invention proposes a non-destructive medical image authentication method based on histogram stretching, combining interpolation, segmentation, and histogram shifting techniques. This method protects the medical images themselves, patient privacy, and the rights of medical institutions. The main innovations of the proposed algorithm include:

[0226] 1) A novel adaptive inter-neighbor interpolation algorithm (AIA) is proposed, which outperforms most existing interpolation methods in terms of overall performance.

[0227] 2) A corresponding bit histogram shifting and repetitive embedding / extraction method (CBHSR) is proposed, which improves the embedding quality while ensuring the embedding capacity.

[0228] 3) The original image is recovered using seed pixels, which has low algorithm complexity.

[0229] This lossless authentication method uses histogram stretching, which causes contrast distortion, as a location selection tool. By flexibly selecting the information embedding location within the ROI region, it improves the security of secret information embedding and extraction while ensuring good quality of the camouflaged image, especially effectively avoiding the imperceptible damage caused by contrast enhancement. The proposed AIA not only guarantees the reversibility of the method but also balances the reduction in embedding capacity caused by CBHSR.

[0230] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A non-destructive medical image authentication method based on histogram stretching, characterized in that, include: The first stage involves image interpolation and dilation, transforming the image to a size of... The input image is expanded by interpolation using neighboring pixels through an adaptive rounding method to obtain a size of [value missing]. The carrier image I; The second stage is image segmentation. Based on the characteristics of medical images, the Ostu segmentation method is used to segment the carrier image to obtain the region of interest, the region of non-interest, and the quadrilateral region. The region of interest is the central region containing important information that helps in accurate diagnosis. Non-interest regions are areas containing information that does not play a role in diagnosis, while quadrilateral regions are fixed-size areas around the perimeter of a medical image. h A pre-set fixed value; In the third stage, reversible data hiding is performed in the region of interest using the corresponding histogram repeated embedding technique. In the fourth stage, reversible data hiding is performed in the non-interest areas using the prediction error propagation method; The fifth stage involves data extraction and image restoration. The first stage includes: Input image A is expanded according to the following formula to obtain carrier image I: , , , , in, i=0,1,…,M-1, j=0,1,…,N-1; The pixel values ​​of the last row and last column of the carrier image are equal to the pixel values ​​of its second-to-last row and second-to-last column; The size is obtained The carrier image I; The second phase includes: The first step is to generate a histogram of the non-seed pixel image of the region of interest. H The stretching process is performed to obtain the stretching histogram. SH, when The range of pixel values ​​in the image histogram is H min , H max When ], the range of the stretched histogram is obtained by the following formula: [ L min , L max ];in round The rounding rule is used: ; The second step involves identifying missing peaks in the stretched histogram and embedding secret information at the corresponding positions in the original histogram. If a pixel value in the stretched histogram does not have a corresponding pixel value in the original histogram, that peak point is not used. When there are available pixels... n At any given time, the set of pixels usable in the stretched histogram. S Represented as The peak value, along with the secret information, is embedded into the next round of embedding. In the final round, the peak value is embedded into the four-sided region. The third step, when embedding information, involves splitting the stretched histogram in half. Pixels in the original histogram whose secret information is 1 and whose stretched pixel value is in the left half are shifted to the right; pixels in the original histogram whose secret information is 1 and whose stretched pixel value is in the right half are shifted to the left. When the secret information is 0, the pixel value remains unchanged. The histogram shift is performed using the following formula: , in k 1 These are the peak points of the original histogram. k 2 For the peak points of the stretched histogram, The peak point after embedding secret information; Fourth, repeat steps two and three until there are no more peak points that meet the conditions; The fifth step, the extraction and recovery process, is the reverse of steps one through four. The extraction and recovery process includes: Non-seed pixels in the ROI region are recovered using the following formula, where Modified when embedding information : ; Secret information is extracted using the following formula: ; The third stage includes: Image dilation By using an adaptive inter-neighbor pixel interpolation dilation algorithm, the size is... The input image A is expanded to obtain a size of The carrier image I; Image segmentation The Ostu segmentation method is used to segment the image by finding the optimal threshold; during segmentation, seed pixels... I(x,y) The three non-seed pixels that are determined to expand I(x,y+1), I(x+1,y) and I(x+1,y+1) Which region does it belong to? Information to be embedded The four-sided region is preprocessed, and the least significant bit (LSB) and pixels with LSB vacancies are extracted. The LSB of the pixels in the four-sided region is concatenated with the secret information to obtain the information to be embedded, which is used for carrier recovery. The secret information includes patient information, diagnostic information, and seed pixel hash values ​​of ROI and RONI. The information to be embedded is then encrypted to obtain the encrypted information to be embedded. B; Region of Interest Information Embedding The information to be embedded is embedded into the non-seed pixels of the region of interest (ROI) using the corresponding bit histogram repeated embedding method described above, while the seed pixels remain unchanged, thus obtaining the disguised ROI. The ROI payload, the last peak value of the ROI, and the maximum and minimum values ​​of the original ROI pixels are saved as additional information. Embedding of information of no interest The remaining information to be embedded is embedded into the non-seed pixels of the non-interest region according to the prediction error expansion method, while the seed pixels remain unchanged, thus obtaining the disguised non-interest region. Additional information embedded in the four areas The generated additional information is embedded into the least significant bit empty square region pixel using the LSB embedding method to obtain the dummy square region. The camouflaged region of interest, the camouflaged region of non-interest, and the camouflaged quadrilateral region together constitute the camouflaged image; The prediction error propagation method includes: Predictor: Current pixel The mean of the two adjacent pixels to the left and right is used as the predicted value. The mathematical expression for the predictor: ; Prediction error: ; Prediction error expansion and information embedding, T Used to indicate the range of prediction error values ​​used: , ; Modify pixel values: , Among them, the RONI location map M is a binary map composed of 0s and 1s, used to record whether the pixels in the RONI region can be used for embedding information; when When, it means that embedding information for the pixel located in the i-th row and j-th column will cause overflow and cannot be used for embedding information; when At that time, the pixel can be used to embed information; The fourth stage includes: Based on the default square region width h, the fake square region and the fake non-square region are divided. Based on the seed pixels of the camouflaged non-quadrilateral region, the same segmentation method at the embedding end is used to divide the camouflaged region of interest and the camouflaged region of non-interest of interest. Based on the seed pixels of the disguised non-square regions, the same image dilation method at the embedding end is used to recover the carrier image pixel values ​​excluding the square regions; Additional information is extracted from the LSB in the camouflaged quad region to obtain the ROI payload, the maximum and minimum values ​​of ROI pixels, the hash value of the ROI seed pixel, the RONI payload, the RONI compressed location map, and the hash value of the RONI seed pixel; the location map is decompressed to obtain the location map; at this point, the quad region is a quad region with the least significant bit missing; Extraction of region of interest information by disguise; Information extraction from disguised non-interested regions; The information extracted by masquerading as regions of interest and regions of non-interest is encrypted information to be embedded. Decryption yields the secret information and the least significant bit of the four-sided region. The least significant bit (LSB) of the extracted quad region is embedded into the quad region with the least significant bit missing to obtain the recovered quad region. The restored carrier image is obtained by restoring the square region and the non-square region, and the input image is obtained by restoring the seed pixels; The extraction of the disguised region of interest information includes: By comparing the changes in the non-seed pixels of the recovered region of interest (ROI) with those of the masqueraded ROI, the same transformation is performed on the stretched histogram of the non-seed pixels of the ROI, resulting in a stretched histogram that determines the extraction order. Based on the last peak value of the ROI extracted from the four regions, the corresponding bit histogram is repeatedly shifted to extract information. The stretched image block of the masqueraded ROI utilizes the non-seed pixels to provide the recovered histogram. The specific implementation is as follows: , , in For region of interest, To disguise the area of ​​interest, SW represents the stretched region of interest, while SW represents the dummy region of interest after stretching. , and These are seed pixels, and their pixel values ​​remain unchanged. It is worth noting that the information extracted in the last round of the extraction process is all embedded data, while the information extracted in the other rounds contains 8 bits of peak point record information. The extraction of information about disguised non-interest areas includes: The prediction error is expanded and extracted for non-seed pixels disguised as non-interest regions. The specific process is as follows: Predict using the same predictor as the sender , to obtain the predicted value ; The expanded prediction error is calculated using the following formula. ,in These are the pixel values ​​of the spoofed image; ; The original prediction error value is restored according to the following formula. : ; The secret data is calculated using the following formula: ; The fifth stage includes: When embedding the RONI location map into the four-sided region, compression is performed first. Based on the size relationship between the location map and the four-sided region, the RLE compression algorithm is selected for compression.