Image low-distortion reversible contrast enhancement method based on rdh
By employing an RDH-based low-distortion reversible contrast enhancement method, which utilizes histogram normalization, gray-level mapping, and fuzzy mean clustering, the problems of image distortion, overflow, and undercurrent in traditional methods are solved, achieving efficient data embedding and natural-looking image enhancement.
Patent Information
- Application Number
- CN202411093343.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-08-09
AI Technical Summary
In the existing technology, traditional reversible contrast enhancement methods suffer from problems such as image distortion, overflow and undercurrent risks, low data embedding efficiency, and poor visual effects caused by global processing.
A low-distortion reversible contrast enhancement method based on RDH is adopted. Through histogram normalization, gray-level mapping, fuzzy mean clustering and local contrast enhancement techniques, combined with one-to-one and one-to-many gray-level mapping data structures, global and local contrast enhancement is performed, and distortion is reduced by peak and zero point selection and variable length coding.
It effectively reduces distortion caused by pixel displacement and overflow/underflow, improves data embedding efficiency, maintains the naturalness and visual effect of the image, and avoids over-enhancement of regions caused by global processing.
Smart Images

Figure CN119205600B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image processing, and in particular to a reversible contrast enhancement method based on RDH. BACKGROUND
[0002] In the field of image processing, the combination of reversible contrast enhancement technology (RCE) and reversible data hiding technology (RDH) has become a research hotspot. These technologies are constantly advancing, mainly focusing on achieving contrast enhancement through image histogram adjustment while ensuring the reversibility of information and the integrity of the original image data.
[0003] RCE technology was first proposed by Wu et al. by modifying the RDH scheme to achieve the expansion of the image histogram across the entire gray level range. This technology relies on histogram shifting methods, which adjust the gray levels of the image and create gaps in the histogram to embed data.
[0004] The main adverse effects that may occur during reversible contrast enhancement are two-fold: excessive contrast enhancement leading to loss of image details and excessive image distortion during data embedding. Therefore, in recent years, many studies have been conducted by domestic and foreign scholars. Some top domestic scholars have proposed a reversible data hiding technology that combines controlled contrast enhancement and integer wavelet transform, which sets a threshold to avoid excessive contrast enhancement. S. Kim et al. effectively avoid overflow or underflow problems by merging the displacement direction of the lowest bit and the adjacent bit, which greatly reduces artifacts caused by preprocessing and intensity mismatch, but requires a position map to track the merging of pixels. Wu et al. made a new breakthrough in subsequent research and proposed a more optimal bit merging selection method. In order to further enhance the naturalness of contrast enhancement, domestic and foreign scholars have also conducted a large number of related researches, such as by combining local histogram selection and global brightness adjustment strategies, which not only effectively enhance the image contrast but also accurately restore the original image, ensuring that the image is enhanced while maintaining its authenticity. In addition, bidirectional histogram expansion not only achieves effective contrast enhancement and higher information security, but also maintains the average brightness of the image, avoiding excessive processing of the image. By adaptively selecting histogram bins and using double histogram shifting technology, these methods effectively integrate contrast enhancement and reversible data hiding functions, significantly improving embedding capacity while ensuring the integrity of the image and data. The above technologies ensure the implementation of reversible contrast enhancement while avoiding excessive contrast enhancement caused by excessive processing of the image, but there is still a lack of methods that avoid introducing large distortions while restoring data embedding.
[0005] Therefore, in order to reduce the distortion caused by data embedding, many scholars at home and abroad have done a lot of research on reversible data hiding (RDH). From the existing pair reversible data hiding (RDH) technology, a series of high-fidelity RDH scheme is born. For example, an adaptive pixel pairing technology is introduced, which is specially designed for pixel pairs with similar prediction errors. This adaptive method increases the number of pixel pairs that can be embedded simultaneously, and reduces the number of pixels that need to be shifted, thereby achieving a lower embedding bit rate. In addition, a new RDH scheme based on pixel value ordering (PVO) optimizes the selection of two-dimensional mapping through a novel predictor and self-learning mechanism, significantly improving the fidelity and image quality during data embedding. There is also a double pair PEE (Prediction Error Expansion) strategy, which significantly improves the balance between data embedding capacity and image quality by more effectively utilizing the correlation of errors. These schemes improve image quality while maintaining low embedding distortion. It should be noted that 2D methods provide better image quality contrast enhancement than 1D methods while maintaining low embedding distortion. The above technologies have made a major breakthrough in ensuring high fidelity of images during data embedding, but the performance of reducing distortion has reached the upper limit, and it is difficult to make further improvement.
[0006] Therefore, with the deepening of research, the technical personnel proposes a direct RCE method, which is different from the traditional RCE technology. It covers the entire dynamic range through image sharpening and adjustment to realize the enhancement of global contrast. The specific method is to process the part below the average gray value through linear mapping, and adjust the lowest gray value to zero, and the part above the average gray value is also adjusted through linear mapping, so that the highest gray value reaches 255. Then embed the relevant information of contrast enhancement and image sharpening through reversible data hiding technology (RDH). This simple linear adjustment method is particularly effective for images with low contrast. However, if the lowest gray value of the image itself is close to zero, and the highest gray value is also close to 255, the effect of this contrast enhancement will be limited. Then, Zhang et al. proposed a similar bilinear stretching mapping scheme, which uses the median instead of the average gray level, and through the adaptive multi-bit prediction error expansion (RDH) technology, the embedding bit rate is improved.
[0007] Based on the above new RCE technology, Dinu Coltuc et al. proposed a RCE technology that can guarantee very low distortion, which is centered on contrast enhancement. The image is first globally enhanced in contrast, and then the data is embedded based on the histogram sparsity of the enhanced image. The embedding process uses a very low distortion (VLD) histogram shifting RDH scheme designed specifically for sparse histogram images. At the same time, the recovered data sequence is encoded to further reduce the embedding distortion. The emergence of this technology not only realizes reversible contrast, but also guarantees very low distortion of the image after embedding data. The fidelity performance achieved by this scheme far exceeds the low distortion RDH schemes that have been proposed so far, but the disadvantage is that the implementation of this technology is based on the enhancement of global contrast. This approach leads to over-enhancement of the contrast in some specific images, resulting in loss of image details and affecting the visual effect of the image.
[0008] It can be seen that the prior art has the following problems:
[0009] (1) Image distortion problem caused by pixel shifting: In traditional RDH technology, data is embedded by moving pixels to the highest bin (peak value). This method requires adjusting the pixel position, and this displacement may cause image quality to decline, especially in areas with rich details.
[0010] (2) Risk of overflow and underflow: In traditional methods, adjustment of pixel values may cause pixel values to overflow (exceed the maximum gray value) or underflow (fall below the minimum gray value), which will cause irreversible information loss and image distortion.
[0011] (3) Balance between data embedding efficiency and image distortion: Traditional RDH methods may need to move multiple pixels in a large range to create enough space in the peak bin to embed data, which not only affects the embedding efficiency, but also may increase the overall distortion of the image.
[0012] (4) In traditional contrast enhancement methods, global processing techniques are often used, which may cause some areas of the image to be over-enhanced, affecting the visual effect and naturalness of the image. In addition, the global method does not work well when dealing with images with complex brightness distribution, and cannot effectively highlight the local features of the image. SUMMARY
[0013] The purpose of the present application is to provide an RDH-based image low-distortion reversible contrast enhancement method to reduce the distortion of the image caused by embedding the recovered data in traditional reversible contrast technology.
[0014] The technical solution adopted by the present application is:
[0015] A method for image low distortion reversible contrast enhancement based on RDH, comprising the following steps:
[0016] Step 1, histogram specification processing is performed on the original image to calculate the contrast-enhanced gray level mapping;
[0017] Step 2, the original image is transformed according to the gray level mapping to obtain a globally enhanced image;
[0018] Step 3, data structures A and B of inverse one-to-one and one-to-many gray mapping are respectively calculated according to the gray level mapping, the data structure A is a table containing L α entries, which maps the actual gray level to the original gray level. The data structure B is a structure containing L β entries, which links each actual gray level to the corresponding compressed list of original gray levels;
[0019] Specifically, the contrast enhancement method adopts histogram specification. Histogram specification cannot distinguish pixels with the same gray level. Let i, j be the gray levels of the original image and the transformed image respectively. Basically, there are two cases: one-to-one gray level transformation i→j, or many-to-one transformation {i1, i2, …, ik}→j, where k>1 and i k is a set of gray levels satisfying i1≤i j ≤i j ≤i k . The one-to-one conversion is inverted at the cost of storing the corresponding gray level pair (i, j). The many-to-one conversion needs to reserve a list corresponding to the original gray level for each j. The transformed image is scanned, and whenever a pixel with gray level j is encountered, its original gray level i j will be recorded in the corresponding list. Let L α , L β represent the number of one-to-one mapping and many-to-one mapping respectively. The information required to restore the original image includes two data structures, A and B. The data structure A is a table containing L α entries, which maps the actual gray level to the original gray level. The data structure B is a structure containing L β entries, which links each actual gray level to the corresponding compressed list of original gray levels.
[0020] Step 4, the data structure A and B are used to extract the global restoration data information from the original image;
[0021] Step 5, the global restoration data information is encoded as embedded data;
[0022] Step 6, the encoded restoration data is embedded in the globally enhanced image to obtain a reversible global contrast-enhanced image, which uses the selection method of peak and zero point introduced to obtain a reversible global contrast-enhanced image containing p pairs (zk ,p k A list of peaks. Further, create a peak mapping M. p For data embedding, data extraction utilizes peak mapping M. p Generate zero-point mapping M z Through M z Extract data structures A and B, and decompress the list of B to restore the image with global contrast enhancement to the original image;
[0023] Step 7: Use the fuzzy mean clustering algorithm to perform local contrast enhancement on the reversible global contrast enhancement image, thereby obtaining a local contrast enhancement image;
[0024] Step 8: After performing grayscale transformation on the image using the fuzzy mean clustering algorithm, the number L of one-to-one mappings and many-to-one mappings is also converted using the mapping inversion method. α and L β Recording allows for the extraction of local restoration data from reversibly global contrast-enhanced images, which can be used to restore locally contrast-enhanced images to their original form.
[0025] Step 9: Embed the local recovery data information into the local contrast enhancement image to obtain a reversible local contrast enhancement image.
[0026] Further, in step 1, the contrast-enhanced grayscale mapping is calculated through histogram equalization or histogram specification. Specifically, in step 1, the original image is processed using exponential histogram specification.
[0027] Furthermore, the variable-length encoding method in step 5 is as follows: different encoding methods are used for "1" and "0", that is, "1" is transformed into "010" and "0" is transformed into "00" for encoding.
[0028] Furthermore, step 6 specifically includes the following steps:
[0029] Step 6-1: Calculate the histogram of the enhanced image to generate peak and zero mapping M. p And calculate the maximum bit rate;
[0030] Step 6-2, by using M p To embed data;
[0031] Step 6-3, the required bit rate should ensure that the embedded data structure satisfies the following formula:
[0032]
[0033] Where |.| represents the bit size, N represents the total number of pixels in the image; A is a set of bits containing L. αA table of entries maps the actual grayscale values to the original grayscale values. B is a table containing L... β The structure of each entry links each actual grayscale value to a compressed list of corresponding original grayscale values. Peak image M p The size of the embedded data is stored in the header of the reserved image area. In the middle, at the same time, header file A parameter should be added to store the extended data sequence.
[0034] Furthermore, the calculation steps for the maximum bit rate in step 6-1 are as follows:
[0035] Step 6-1-1: Traverse the histogram H = {h0, h1, ..., h...} of the contrast-enhanced images one by one from the right end of the histogram. L The interval} is used to find the interval pairs (z) of adjacent zero and peak values of p. k ,p k );
[0036] Step 6-1-2, based on p pairs of adjacent zero and peak intervals (z) k ,p k Create a peak mapping M. p Used for data embedding and extraction; if h i If M is not selected as a peak bin, then p (i) = 0; if h i If selected, then M p (i)≠0 indicates the position of the corresponding adjacent zero bins; if the corresponding zero bin is on i-1, then M p (i) = -1; if zero bin is in i+1, then M p (i) = 1.
[0037] Step 6-1-3 calculates the maximum bit rate guaranteed by pairing. The formula for calculating the maximum bit rate is as follows:
[0038]
[0039] in N is the maximum number of pixels used for embedding; P is the total number of pixels; P represents the interval pair of adjacent zero and peak values (z0). k ,p k The quantity of ); z k Let p represent the zero interval of the k-th pair of intervals. k This represents the peak interval of the k-th interval pair.
[0040] Furthermore, the interval pair lookup method in step 6-1-1 is as follows: determine the value h of the current interval. iwhether only one of the two adjacent bins has a non-zero value; if yes, the non-zero adjacent bin is selected as the peak bin and paired with the current zero bin to form a bin pair; otherwise, if both of the two adjacent bins have a non-zero value, it is checked whether the value of the previous bin of the adjacent bin is zero; if yes, the previous bin of the adjacent bin is selected as the peak bin and paired with the current zero bin to form a bin pair, and the next bin of the adjacent bin is selected as the peak bin and paired with the current zero bin to form another bin pair; otherwise, if the value of the previous bin of the adjacent bin is greater than zero, the bin with the greatest value among the two adjacent bins is selected as the peak bin and paired with the current zero bin to form a bin pair.
[0041] Specifically, if the current bin h i = 0, it is checked whether the two adjacent bins of h i-1 = 0 or h i+1 = 0. If only one of the two adjacent bins has a non-zero value, it is selected as the peak bin and paired with the current zero bin to form a bin pair. If both of the two adjacent bins have a non-zero value, it is checked whether h i-2 = 0. If yes, p i-2 = h k = h i+1 = h i-1 = h i-2 = h i-2 > 0, i.e. only one bin pair can be formed, the maximum value p k = max(h i-1 , h i+1 ) is selected as the peak bin and paired with the current zero bin to form a bin pair.
[0042] Further, the specific steps of step 6-2 are as follows:
[0043] Step 6-2-1, b i , i = 1, …, P are defined as the bit sequence to be embedded, and the embedding process is as follows: scanning the image from left to right and from top to bottom, and checking each pixel a
[0044] Step 6-2-2, it is checked whether M p (a) = 0 is true; if yes, the pixel is skipped; otherwise, step 4-2-3 is executed,
[0045] Step 6-2-3, the embedding bit b i is performed: if b i = 0, the pixel remains unchanged; if b i = 1, the gray level of the pixel is increased or decreased according to the corresponding zero bin position a; the embedding of b i is represented by the following equation:
[0046] A = a + bi M p (a),if M p (a)≠0 (7)。
[0047] Step 6-2-4, data extraction and original recovery is performed immediately. It should be detected whether the pixels belong to the selected peak-zero pair. If they belong to the selected bins, the embedded bits should be extracted (b i =0 if it is a peak; b i =1 if it is a zero) and the original gray level is recovered. A zero map M p is created using the peak map M z , similar to the map of peaks:
[0048]
[0049] Step 6-2-5, the pixels are checked in the scan order, and for each pixel A, the recovery of the original gray level is as follows:
[0050] a=A-M z (a) (9).
[0051] Step 6-2-6, the embedded data is extracted bit by bit from the selected storage cells.
[0052]
[0053] The only information needed for detection is the map of peaks and the number of embedded bits.
[0054] Further, the fuzzy mean clustering of step 7 specifically comprises the following steps:
[0055] Step 7-1, initialize the membership matrix U with random numbers between 0 and 1, such that the following constraint equation is satisfied:
[0056]
[0057] where n is the total number of data points, c is the total number of cluster centers, u ij is the membership degree of data point x i to cluster center c j .
[0058] Step 7-2, calculate the c cluster centers c i (i=1,…,c) as follows:
[0059]
[0060] Step 7-3, calculating the objective function, when the value of the objective function is less than a set value, or the value of the objective function changes relative to the last objective function value by less than a set threshold ε, the algorithm stops;The calculation formula of the objective function is as follows:
[0061]
[0062] Where n is the total number of data points, c is the total number of cluster centers, u ij The membership of data point x i To cluster center c j , m is a real number greater than 1, called fuzzy parameter, which controls the fuzziness of clustering;||x i -c j || is the Euclidean distance from x i To cluster center c j .
[0063] Step 7-4, calculate the update membership U matrix, and execute step 7-2;The update formula of the membership U matrix is as follows:
[0064]
[0065] Where n is the total number of data points, c is the total number of cluster centers, u ij The membership of data point x i To cluster center c j , m is a real number greater than 1, called fuzzy parameter, which controls the fuzziness of clustering;||x i -c j || is the Euclidean distance from x i To cluster center c h .
[0066] The above technical scheme is adopted in the present application, in order to minimize the distortion introduced by pixel displacement and overflow / underflow control, the peak is selected by limiting the bit rate within the required range;The peak is selected to provide embedding space without overflow / underflow control and / or pixel displacement, and the sparseness of the specified histogram is selected;Simply pairing empty histogram bins with adjacent non-empty bins eliminates pixel displacement and overflow / underflow control, and provides very low distortion. In order to further reduce the distortion caused by embedding data, the embedding data is encoded, and the same information is represented by fewer "1" bits, which is realized by the operation of encoding the embedding data first and then embedding. In order to prevent some areas of the image from being over enhanced after global contrast enhancement, the image is divided into different areas by fuzzy mean clustering, and appropriate local contrast enhancement techniques are applied to these areas. This helps to maintain the natural feeling and visual effect of the image, while avoiding the problem of over enhancement of some areas caused by global processing techniques. BRIEF DESCRIPTION OF DRAWINGS
[0067] The application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0068] Figure 1 The schematic diagram of the principle of the RDH-based image low-distortion reversible contrast enhancement method of the application;
[0069] Figure 2 The schematic diagram of the image of the Kodak set;
[0070] Figure 3 The schematic diagram of the local contrast enhancement effect display of different images;
[0071] Figure 4 The schematic diagram of the result graph of the experiment of the application and the global contrast enhancement effect comparison. EMBODIMENT
[0072] To make the purpose, technical scheme and advantages of the embodiments of the application clearer, the technical scheme of the embodiments of the application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the application.
[0073] In order to reduce the distortion caused by embedding data, the scheme proposed by the application adopts the following two methods (1) selection of zero point and peak value during embedding: in order to minimize the distortion introduced by pixel displacement and overflow / underflow control, the improved RDH scheme selects the peak value by limiting the bit rate within the required range. The proposed scheme selects the peak value that provides embedding space without overflow / underflow control and / or pixel displacement. The selection is based on the sparseness of the specified histogram. The proposed method simply pairs the empty histogram bins with the adjacent non-empty bins. As the pixel displacement and overflow / underflow control are eliminated, very low distortion is provided. (2) further reducing distortion by encoding: in order to further reduce the distortion caused by embedding data, the embedded data can be encoded. Since the size of the distortion is determined by the number of "1" bits in the embedded data. Therefore, if the same information can be represented by fewer "1" bits, the distortion will be reduced, and at this time, the operation of encoding the embedded data first and then embedding can be implemented.
[0074] In order to solve the problem that the global method does not work well when processing images with complex brightness distribution and cannot effectively highlight the local features of the image, the scheme proposed by the application adopts the following method: (1) introducing local contrast enhancement: in order to prevent some regions of the image from being over-enhanced after global contrast enhancement, the image is divided into different regions by fuzzy mean clustering, and appropriate local contrast enhancement techniques are applied to these regions. This helps to maintain the natural feeling and visual effect of the image, while avoiding the problem of over-enhancement of some regions caused by global processing techniques.
[0075] As Figures 1 to 4 The application discloses a low-distortion reversible contrast enhancement method based on RDH, which comprises the following steps:
[0076] Step 1, the original image is subjected to histogram specification processing to obtain a contrast-enhanced gray scale mapping;
[0077] Step 2, the original image is transformed according to the gray scale mapping to obtain a globally enhanced image;
[0078] Step 3, data structures A and B of inverse one-to-one and one-to-many gray scale mappings are respectively calculated according to the gray scale mapping; the contrast enhancement mode adopts histogram specification. Histogram specification cannot distinguish pixels with the same gray scale. Let i and j be the gray scales of the original image and the transformed image respectively. Basically, there are two cases: one-to-one gray scale transformation i→j, or many-to-one transformation {i1,i2,…,ik}→j, where k>1 and i k j is a gray scale set with i j ≤i k . The one-to-one conversion is inverted at the cost of storing the corresponding gray scale pair (i,j). The many-to-one conversion needs to reserve a list corresponding to the original gray scale for each j. The transformed image is scanned, and whenever a pixel with a gray scale of j is encountered, its original gray scale i j will be recorded in the corresponding list. Let L α and L β represent the number of one-to-one mapping and many-to-one mapping respectively. The information required to restore the original image includes two data structures, A and B. A is a table containing L α entries, which maps the actual gray scale to the original gray scale. B is a structure containing L β entries, which links each actual gray scale to the corresponding compressed list of original gray scales.
[0079] Step 4, global restoration data information is extracted from the original image using data structures A and B to prepare data for the original image restoration, which is obtained by calculating the inverse one-to-one and one-to-many gray scale mapping data structures A and B respectively;
[0080] Step 5, the global restoration data information is encoded as embedded data with indefinite length;
[0081] Step 6, the encoded restoration data is embedded in the globally enhanced image to obtain a reversible globally contrast-enhanced image. This step uses the selection method of the peak and zero point introduced, and a list containing p pairs (z k ,p k ) will be obtained at the end of the process. A peak mapping M p For data embedding, the extraction of data is by using the peak mapping M p The zero point mapping M is generated z , by M z The data structure A and B are extracted, and the list of decompression B can be used to restore the image with global contrast enhancement to the original image;
[0082] Step 7, using fuzzy mean clustering algorithm to enhance the local contrast of the reversible global contrast enhanced image, so as to further obtain the local contrast enhanced image;
[0083] Step 8, after using fuzzy mean clustering algorithm to perform gray scale transformation on the image, using the inverse mapping method, the number of one-to-one mapping and many-to-one mapping L α and L β are recorded, so as to extract the local recovery data information from the reversible global contrast enhanced image, and the data here can be used to restore the image with local contrast enhancement to the original image;
[0084] Step 9, embedding the local recovery data information into the local contrast enhanced image to obtain the reversible local contrast enhanced image.
[0085] Further, in step 1, the contrast enhanced gray scale mapping is calculated by histogram equalization or histogram specification. Specifically, in step 1, the original image is processed by exponential histogram specification.
[0086] Further, the indefinite length coding method of step 5 is: different coding methods are adopted for "1" and "0", that is, "1" is transformed into "010", and "0" is transformed into "00", and then coding is performed.
[0087] Further, step 6 specifically includes the following steps:
[0088] Step 6-1, calculating the histogram of the enhanced image to generate the peak value and zero point mapping M p , and calculating the maximum bit rate;
[0089] Step 6-2, embedding data by using M p ;
[0090] Step 6-3, the required bit rate should ensure that the embedded data structure satisfies the following formula:
[0091]
[0092] Where, |. | represents the size of the bit, N represents the total number of image pixels; A is a table containing L α entries, which maps the actual gray scale to the original gray scale. B is a table containing L βThe structure of each entry links each actual grayscale value to a compressed list of corresponding original grayscale values. Peak image M p The size of the embedded data is stored in the header of the reserved image area. In the middle, at the same time, header file A parameter should be added to store the extended data sequence.
[0093] Furthermore, the calculation steps for the maximum bit rate in step 6-1 are as follows:
[0094] Step 6-1-1: Traverse the histogram H = {h0, h1, ..., h...} of the contrast-enhanced images one by one from the right end of the histogram. L The interval} is used to find the interval pairs (z) of adjacent zero and peak values of p. k ,p k );
[0095] Step 6-1-2, based on p pairs of adjacent zero and peak intervals (z) k ,p k Create a peak mapping M. p Used for data embedding and extraction; if h i If M is not selected as a peak bin, then p (i) = 0; if h i If selected, then M p (i)≠0 indicates the position of the corresponding adjacent zero bins; if the corresponding zero bin is on i-1, then M p (i) = -1; if zero bin is in i+1, then M p (i) = 1.
[0096] Step 6-1-3 calculates the maximum bit rate guaranteed by pairing. The formula for calculating the maximum bit rate is as follows:
[0097]
[0098] in N is the maximum number of pixels used for embedding; P is the total number of pixels; P represents the interval pair of adjacent zero and peak values (z0). k ,p k The quantity of ); z k Let p represent the zero interval of the k-th pair of intervals. k This represents the peak interval of the k-th interval pair.
[0099] Furthermore, the interval pair lookup method in step 6-1-1 is as follows: determine the value h of the current interval. iIf the value is 0, check if the value of the two adjacent intervals is true. If so, check if only one adjacent interval has a non-zero value. If so, pair the corresponding non-zero adjacent interval as the peak interval with the current zero interval to form an interval pair. Otherwise, check if the values of the two adjacent intervals are both greater than zero. If so, check if the value of the interval preceding the adjacent interval is zero. If so, pair the adjacent preceding interval as the peak interval with the interval preceding the adjacent interval to form an interval pair, and simultaneously pair the adjacent following interval as the peak interval with the current zero interval to form an interval pair. Otherwise, if the value of the interval preceding the adjacent preceding interval is greater than zero, select the interval with the largest value among the adjacent intervals as the peak interval and pair it with the current zero interval to form an interval pair.
[0100] Specifically, if the current interval h i If h = 0, then its two adjacent intervals need to be checked. If only one of the intervals is non-zero (i.e., h...), then... i-1 or h i+1 If the value in either interval is greater than zero, then select it as the peak value and pair it with the current zero-value interval. If the value in both intervals is greater than zero, then continue checking h. i-2 If h i-2 =0, then choose p k =h i+1 , and h i-1 Will with h i-2 Pairing. If h i-2 If the interval is greater than 0, meaning only one interval pair can be formed, then the maximum value p between the two intervals is chosen. k =max(h i-1 ,h i+1 ).
[0101] Furthermore, the specific steps of step 6-2 are as follows:
[0102] Step 6-2-1, place b i ,i=1,…,P is defined as the bit sequence to be embedded. The embedding process is as follows: scan the image from left to right and from top to bottom, and check each pixel a.
[0103] Step 6-2-2 Determine M p (a) = 0 is true; if so, skip the pixel; otherwise, proceed to step 4-2-3.
[0104] Step 6-2-3; Embed bit b i If b i =0, then the pixel remains unchanged; if b i =1, then the gray level of the corresponding zero bin position a will increase or decrease; b i The embedding is represented by the following equation:
[0105] A = a + bi M p (a),if M p (a)≠0 (7)。
[0106] Step 6-2-4, data extraction and original recovery is performed immediately. It should be detected whether the pixels belong to the selected peak-zero pair. If they belong to the selected bins, the embedded bits should be extracted (b i =0 if it is a peak; b i =1 if it is a zero) and the original gray level is recovered. A zero map M p is created, similar to the map of peaks: z
[0107]
[0108] Step 6-2-5, the pixels are examined in the scan order, and for each pixel A, the original gray level is recovered as follows:
[0109] a=A-M z (a) (9).
[0110] Step 6-2-6, the embedded data is extracted bit by bit from the selected storage cells.
[0111]
[0112] The only information needed for the detection is the map of peaks and the number of embedded bits.
[0113] Further, the fuzzy mean clustering of step 7 specifically comprises the following steps:
[0114] Step 7-1, initialize the membership matrix U with random numbers between 0 and 1, such that the following constraint equation is satisfied:
[0115]
[0116] where n is the total number of data points, c is the total number of cluster centers, u ij is the membership degree of data point x i to cluster center c j .
[0117] Step 7-2, calculate the c cluster centers c i (i=1,…,c) as follows:
[0118]
[0119] Step 7-3, calculating the objective function, when the value of the objective function is less than a set value, or the value of the objective function changes relative to the last objective function value by less than a set threshold ε, the algorithm stops; the calculation formula of the objective function is as follows:
[0120]
[0121] Where n is the total number of data points, c is the total number of cluster centers, u ij is the membership of data point x i to cluster center c j , and m is a real number greater than 1, called the fuzzification parameter, which controls the fuzziness of clustering; ||x i -c j || is the Euclidean distance of x i to cluster center c j .
[0122] Step 7-4, calculate the updated membership U matrix and execute step 7-2; the update formula of the membership U matrix is as follows:
[0123]
[0124] Where n is the total number of data points, c is the total number of cluster centers, u ij is the membership of data point x i to cluster center c j , and m is a real number greater than 1, called the fuzzification parameter, which controls the fuzziness of clustering; ||x i -c h || is the Euclidean distance of x i to cluster center c j .
[0125] The specific principles of the present application are described in detail as follows:
[0126] The technical scheme of the present application includes two main stages: contrast enhancement and reversible data hiding with extremely low distortion. The contrast enhancement includes global contrast enhancement and local contrast enhancement. The global contrast enhancement is realized by using the classic histogram equalization / normalization, and the local contrast enhancement is realized by first performing fuzzy mean clustering on the image after global enhancement, and then using different contrast enhancement techniques for different gray value blocks after clustering to improve the local contrast. After contrast enhancement, the relevant information is embedded in the enhanced image using reversible information hiding method to ensure that the original image can be restored at the receiving end, realizing reversible contrast enhancement.
[0127] The process of the contrast enhancement (CE) stage is as follows:
[0128] (1) Calculate the contrast enhanced gray level mapping by histogram equalization or histogram specification;
[0129] (2) Transform the image according to the gray level mapping;
[0130] (3) Prepare data for the original image recovery: Calculate the data structure A and B of the inverse one-to-one and one-to-many gray mapping respectively.
[0131] (4) Then the application further uses the fuzzy mean clustering algorithm to perform local contrast enhancement on the enhanced image.
[0132] The RDH stage embeds the information of the complete image enhancement stage:
[0133] (1) Calculate the histogram of the enhanced image, generate the peak and zero point mapping M p , and evaluate the maximum bit rate according to formula (6);
[0134] (2) After discussing the selection of the peak and zero point, embed the data by using M p .
[0135] (3) The required bit rate should ensure the embedding of the data structure of the CE mapping and the parameters required by the RDH algorithm.
[0136]
[0137] Where |. | represents the size of the bit, and N represents the total number of image pixels. The header file should be added to store the parameters of the data sequence extension.
[0138] (4) A total of two cases of fixed-length coding and variable-length coding of embedded data are discussed, and the performance of the two different encodings in reducing distortion is evaluated.
[0139] (5) The recovery of the original image, the recovery information is extracted from the globally enhanced and locally enhanced images, so that the image can be restored.
[0140] Enhancement of image contrast: The appearance of an image is mainly determined by the gray level distribution of the pixels. Therefore, the application usually enhances the contrast of the image by changing the gray level transformation of the image. This operation aimed at changing the gray level distribution is called histogram specification.
[0141] Histogram specification problems are typically solved within a statistical framework. This framework provides an exact solution for continuous images and an approximate solution for discrete images. In this framework, image intensity is treated as a continuous random variable (RV), whose properties are described by its probability density function (PDF). Under this setting, given a random variable with a known distribution, this invention aims to find a transformation such that the transformed random variable possesses a specific PDF.
[0142] Histogram equalization: A well-known example of histogram specification is histogram equalization, which aims to modify pixels to ensure a uniform distribution of gray levels. In other words, histogram equalization distributes pixels across the entire gray level range and assigns an equal number of pixels to each gray level. After histogram equalization, the contrast of a black and white image is improved, and the gray level distribution becomes more balanced.
[0143] In the case of histogram equalization, let r be a continuous random variable (RV) taking values in the range [0,1], and p r Let (r) be its probability density function (PDF). Let T(r) be the cumulative distribution function (CDF) of r. If T(r) is strictly increasing, the random variable z = T(r) is uniformly distributed. Given a continuous grayscale image f with values ranging from [0,L], let f / L be the random variable r. The random variable z obtained in the above manner is uniformly distributed on [0,1], and L×z is uniformly distributed on [0,L]. Therefore, transforming r → L×T(r) can achieve grayscale image equalization.
[0144] The discrete version of the statistical method is directly converted to use image histograms and cumulative histograms to replace the probability density function (PDF) and cumulative distribution function (CDF). The transformation r→L×T(r) becomes:
[0145]
[0146] in It is the largest integer not exceeding x, r = 0, ..., L, h i ,i=0,…,L is the histogram of the original image.
[0147] According to formula (4), histogram equalization becomes a simple grayscale mapping. The histogram is stretched to the entire grayscale range, consecutive data segments are merged together, and the data segments are typically placed in the histogram flattening. Histogram equalization enhances image contrast and, in addition, makes details in dark or bright areas of the original image visible.
[0148] Gaussian and Exponential Histogram Specification: Histogram normalization generalizes the case of histogram equalization. As mentioned above, consider the continuous case. Let r be the original random variable (RV) and u be a random variable (RV) with the desired probability density function p u (u). Let T and G be the cumulative distribution functions (CDF) of r and u, respectively, and assume, as before, that both T and G are strictly increasing. And let z = T(r) and v = G(u). Since z and v are uniformly distributed over [0, 1], v = z, hence u = G -1 (z) = G -1 (T(r)). Thus, G -1 (T) maps a given r to the desired u with the probability density function p u (u). In the discrete case, since the cumulative distribution functions are equal, there is the following mapping:
[0149]
[0150] where 0 ≤ r, u ≤ L, and g i is the specified histogram. In this study, Gaussian and Exponential Histogram Specification are used. This is achieved by computing the pixel mapping that minimizes the difference between the cumulative distributions of the two histograms. Specifically, for each original gray level r, the formula finds a target gray level u that minimizes the absolute difference between the cumulative of the original histogram up to r and the cumulative of the target histogram up to u.
[0151] Histogram equalization is a special case of histogram specification, and both methods are typically applied to enhance image contrast.
[0152] Since histogram equalization can over-enhance the contrast, histogram specification can achieve better results. For example, one can consider using Gaussian or Exponential histograms instead of the uniform histogram for specification. By using a Gaussian histogram, one can easily control the contrast and brightness by adjusting σ and μ. For example, histogram equalization that preserves the brightness can be immediately addressed by increasing σ only, while setting μ to the average gray level of the image.
[0153] In addition to the histograms mentioned in the above, one can also consider Exponential histograms, etc. This is because the human visual system has a logarithmic response, and in fact, the equalization of perceived gray levels should require a hyperbolic distribution of image gray levels, not a uniform distribution. Using these histograms for specification, one can achieve better visual results.
[0154] Zero and Peak Selection and Data Embedding: To minimize distortion introduced by pixel shift and overflow / undercurrent control, the improved RDH scheme selects peaks by limiting the bit rate to the desired range. The proposed scheme selects peaks that provide embedding space without overflow / undercurrent control and / or pixel shift. The selection is based on the sparsity of the specified post-histogram. The proposed method simply pairs empty histogram bins with adjacent non-empty bins. Very low distortion is provided due to the elimination of pixel shift and overflow / undercurrent control.
[0155] The selection of zero and peak values is based on the following method. Let H = {h0, h1, ..., h...} L} is defined as a histogram of the contrast-enhanced image. H is traversed interval by interval to find pairs of adjacent zeros and peaks (z). k ,p k The pairing process begins from the right end of the histogram. If the current interval h... i If h = 0, then its two adjacent intervals need to be checked. If only one of the intervals is non-zero (i.e., h...), then... i-1 or h i+1 If the value in either interval is greater than zero, then select it as the peak value and pair it with the current zero-value interval. If the value in both intervals is greater than zero, then continue checking h. i-2 If h i-2 =0, then choose p k =h i+1 , and h i-1 Will with h i-2 Pairing. If h i-2 If the interval is greater than 0, meaning only one interval pair can be formed, then the maximum value p between the two intervals is chosen. k =max(h i-1 ,h i+1 ).
[0156] The process will end with a result containing p pairs (z) k ,p k A list of peaks. Further, create a peak mapping M. p Used for data embedding and extraction. This mapping contains L+1 elements. If h i If M is not selected as a peak bin, then p (i) = 0. If h i If selected, then M p (i)≠0 indicates the position of the corresponding adjacent zero bins. Therefore, if the corresponding zero bin is in i-1, then M p (i) = -1, if zero bin is in i+1, then M p (i) = 1.
[0157] The process will end with a result containing p pairs (z) kp k ) of the list. Further a peak map M p is created for data embedding and extraction. This map contains L+1 elements. If h i is not selected as a peak bin, then M p (i) = 0. If h i is selected, then M p (i)≠0 indicates the position of the corresponding adjacent zero bin. Thus, if the corresponding zero bin is on i-1, then M p (i) = -1, if the zero bin is on i+1, then M p (i) = 1.
[0158] Let N be the total number of pixels. Pairing ensures the maximum bitrate:
[0159]
[0160] where is the maximum number of pixels used for embedding.
[0161] Let b i , i = 1,..., P be the bit sequence to be embedded. The embedding process is as follows. The image is scanned from left to right, top to bottom, and each pixel a is examined. If M p (a) = 0, then the pixel is skipped; otherwise the bit b i is embedded. If b i = 0, then the pixel remains unchanged. If b i = 1, then the gray level of a is increased or decreased according to the corresponding zero bin position. The embedding of b i can be expressed in one equation:
[0162] A = a + b i M p (a), if M p (a)≠0 (7)
[0163] Data extraction and original recovery are performed immediately. It should be detected whether the pixels belong to the selected peak-zero pairs. If they belong to the selected bins, the embedded bits should be extracted (b i = 0 if it is a peak; b i = 1 if it is a zero) and the original gray level is recovered. Let the invention first create a zero map M z , similar to the map of peaks:
[0164]
[0165] The pixels are examined in scan order, and for each pixel A, the recovery of the original gray level is as follows:
[0166] a = A - M z (a) (9)
[0167] The embedded data is extracted bit by bit from the selected memory cells.
[0168]
[0169] The only information needed for detection is the map of peaks and the number of embedded bits. The zero bit map can be immediately derived from the peak map. The verification code, the peak map M p and the size of the embedded data are stored in the header in the reserved image area. It is noted that the amount of data needed for detection is very low. This is because the proposed variable length data hiding does not cause overflow or underflow.
[0170] A distortion of ±1 is introduced when embedding a "1" bit. This is the only distortion introduced by the proposed scheme. Since "1" and "0" are equally likely, the mean square error introduced when embedding P bits is 0.5P. Let B = P / N be the embedding bit rate, then the mean square error is 0.5B. In summary, the proposed scheme operates the same in mean square error as simple LSB replacement and the embedding is invertible.
[0171] Multi-stage embedding: To further enhance the embeddable space of data, after embedding the entire first stage available space, additional space can be obtained by a second stage embedding. As described above, a new mapping is created by performing the second stage pairing. Then, embedding is performed according to equation (7) using the mapping generated by the new pairing.
[0172] The second stage selected peak bins come from the first stage selected peaks or zero points. The peaks previously selected as peaks also have a "0" bit embedded. The second stage embedding introduces a distortion of at most ±1. The peak bins previously selected as zero points contain pixels with a "1" bit embedded, i.e. already distorted by ±1. For these pixels, the second stage introduces a distortion of ±1 (embedding "0") or ±2 (embedding "1"). The maximum distortion caused at this time is also only ±2. In order to ensure that the result after multi-stage embedding is still very low distortion, it is necessary to limit the pairing of the second stage to the previously selected peaks.
[0173] The second stage provides less space than the first stage: In the first stage, the peaks are halved, in addition, the number of selected pairs is also reduced. On the other hand, with the second stage embedding, variable length data hiding (VLD RDH) of more than 1 bpp is possible. This is easy to understand because in two stages the selected bins h i provide 3h i / 2 bits of space, i.e. the first stage provides h i bits and the second stage provides hi The bit rate of VLD RDH is theoretically limited to 1.5 bpp.
[0174] When higher bit rates are needed, in addition to selecting all pairs at the second level, one can continue to the third level, and so on. Each new level provides less space than the previous one. Moreover, the maximum distortion increases by ±1 with each embedding level. Thus, after embedding s stages, the maximum distortion is ±s, i.e., the maximum square error increases by s 2 .
[0175] Recovery of the original image: The exact recovery technique based on residuals: First, an approximate image is recovered that matches the original histogram. This approximate image is expected to be visually indistinguishable from the original image. Next, the approximate image is modified to exactly recover the original image. Specifically, the difference values between the original and the approximate image are computed. Subsequently, these difference values are losslessly compressed and embedded with the original histogram data in the enhanced image. The original image is recovered by performing the inverse embedding of the difference values and the original histogram data. Figure 1 Although the amount of data for the original histogram is small, the compressed difference values are not. By using an exact histogram specification method instead of the traditional one, a slight data reduction is achieved. By using the exact histogram specification, a version of the original image is obtained after histogram equalization.
[0176] At the same time, the exact recovery technique based on residuals is introduced, a two-stage robust invertible watermark embedding process is used. To ensure the coexistence of robustness and invertibility, a robust watermark embedding stage is first implemented, followed by the embedding of residuals and necessary information to enable the inverse operation of the robust and invertible watermark by using the invertible differential spread spectrum technique. In the case of no attack on the system, the method shows both robustness and invertibility; while under attack, although the robust watermark can still be identified, the invertibility can be destroyed.
[0177] This way of recovering the original image is often used when both global and local contrast enhancement are used in the invertible contrast to ensure invertibility.
[0178] Mapping inversion: Another way to recover the original image is to directly invert the mapping defined by equations (4) and (5). Histogram specification cannot distinguish pixels with the same gray level. Let i, j be the gray levels of the original image and the transformed image, respectively. Basically, there are two cases: one-to-one gray level transformation i→j, or many-to-one transformation {i1, i2,..., ik}→j, where k > 1 and i k . j i1< i j ≤ i k k.
[0179] One-to-one transformations are inverted at the cost of storing the corresponding grayscale pairs (i,j). One-to-many transformations require maintaining a list corresponding to the original grayscale for each j. The transformed image is scanned, and whenever a pixel with grayscale j is encountered, its original grayscale i is... j It will be recorded in the corresponding list.
[0180] Let L α ,L β These represent the number of one-to-one and many-to-one mappings, respectively. The information needed to reconstruct the original image includes two data structures, A and B. A is a data structure containing L... α A table of entries maps the actual grayscale values to the original grayscale values. B is a table containing L... β The structure of each entry links each actual grayscale value to a compressed list of the corresponding original grayscale values.
[0181] Encoding the embedded data: The distortion introduced by the reversible data hiding method is strictly dependent on the embedded data. The squared error introduced by the algorithm is exactly the number of "1" bits. Therefore, to reduce distortion, this invention should minimize the number of "1" bits in the embedded data, that is, it needs to use fewer "1" bits to represent the same information. Since the data to be embedded is either encrypted or lossless compressed, the number of "1" bits and "0" bits is approximately equal. Therefore, this invention should select an appropriate encoding method to encode the embedded data to reduce the number of "1" bits.
[0182] Fixed-length encoding: The data encoding process is based on the observation that if a bit string of n bits contains k 1s, then its complement sequence contains nk 1s. Therefore, by embedding these bits or their complements, the number of bits and the implicit distortion are reduced. This is achieved by adding an (n+1) to each group of n bits. th This is to ensure correct detection. Assume b1b2…b n For an n-bit sequence, For b i The complement of . The number of 1s in each group of n bits is:
[0183]
[0184] The data sequence is divided into disjoint n-bit groups, and each group is expanded to n+1 bits as follows:
[0185]
[0186] Thus, for the entire sequence, first study the sequence into n = 2 groups, there are four cases: "00", "01", "10" and "11". The worst case is for "11". By taking the complement code and expanding the sequence to 3 bits, get "11"→"001". The worst case is only one bit of "1" to encode, not two bits. The number of "1" in other 3 cases does not change after expansion: "00"→"000", "01"→"010" and "10"→"100". By encoding the bit pair in three bits, there is at most one "1" in a group of 3 bits. On average, each bit has 3 / (4x3) = 0.250, i.e. one of 4 bits is "1". By considering the bit pair, the number of "1" is halved, but the length of the data sequence is increased by 50%.
[0187] Variable length encoding: Similarly, the embedded data can also be encoded in a variable length encoding manner, which can be realized by using different encoding manners for "1" and "0". That is, "1"→"010", "0"→"00". After such encoding, each bit has 1 / 5 = 0.2, i.e. one of 5 bits is "1". It should be noted that after encoding in this variable length manner, the present application does not need to further discuss the grouping of the original data sequence in n-bit groups, and the encoding is directly based on each bit of the original data.
[0188] Although there is a lower number of "1", it also increases the length of the data sequence. In summary, the distortion gain of the two encoding manners is realized at the expense of the increase of the embedded bit rate.
[0189] Local contrast enhancement - fuzzy C-means clustering algorithm: Fuzzy C-Means (FCM) is a commonly used clustering algorithm, which allows a data point to belong to multiple clusters. The degree of belonging is represented by membership or fuzziness. Unlike the traditional K-Means clustering algorithm, in which each data point can only belong to one cluster center, Fuzzy C-Means provides more flexible attribution for data points by introducing fuzzy set theory.
[0190] Core concept of fuzzy C-means clustering: In fuzzy C-means clustering, each data point is associated with each cluster center through a membership function, which represents the degree to which the data point belongs to a cluster center. The value of membership is between 0 and 1, and the sum of the membership of all cluster centers for a data point is equal to 1.
[0191] The goal of fuzzy C-means clustering is to minimize the weighted sum of the distance between the cluster center and all data points belonging to the cluster, and the weight is the membership of the data point to the cluster.
[0192] The objective function is calculated as follows:
[0193]
[0194] where n is the total number of data points, c is the total number of cluster centers, u ij is the membership of data point x i to cluster center c j , and m is a real number greater than 1, called the fuzzification parameter, which controls the fuzziness of the clustering. ||x i -c j || is the Euclidean distance of x i to cluster center c h . Note that the objective function above should also satisfy the following constraint:
[0195]
[0196] The membership update formula is:
[0197]
[0198] This formula is used to update the membership of data point x i to all cluster centers c j , reflecting the relative closeness of x i to different cluster centers.
[0199] The cluster center update formula is:
[0200]
[0201] The position of cluster center c j is updated by considering the weighted average of all data points (weights are the mth power of the membership), to reflect the center of the data points belonging to this cluster.
[0202] The implementation steps of fuzzy c-means clustering (FCM) are as follows:
[0203] Step 1: Initialize the membership matrix U with random numbers between 0 and 1, satisfying the constraint in equation (14).
[0204] Step 2: Calculate the c cluster centers c i (i = 1,..., c) using formula (16).
[0205] Step 3: Calculate the objective function according to equation (13). If it is less than a certain value, or the change in its value relative to the last value of the objective function is less than a certain threshold ε, the algorithm stops.
[0206] Step 4: Calculate the new U matrix using equation (15). Return to step 2.
[0207] The above algorithm can also initialize the cluster centers first, and then perform the iteration process.
[0208] Technical effects:
[0209] To evaluate the performance of the reversible contrast scheme, the performance of the experiment will be verified from the following experiments. First, verify whether the new embedding method can achieve extremely low distortion, for example, use the exponential histogram to enhance the global contrast, study the similarity of the image before and after embedding the data after the data is recovered. Secondly, study the influence of encoding and embedding on reducing distortion. Finally, global contrast enhancement and local contrast enhancement will be introduced at the same time, and the gain size of the reversible contrast scheme for further enhancing the contrast of the image will be studied. Whether it has better visual effect of light and dark details.
[0210] The experimental object adopts the gray scale version of Kodak set, as shown in Figure 1 The Kodak set consists of 24 full-color images with a size of 512x768. The gray scale version of the full-color image is calculated by weighted average of three color channels, that is, 0.2126R+0.7152G+0.0722B. Gray scale version of Kodak01-Kodak24: from left to right, from top to bottom.
[0211] Performance analysis of exponential histogram specification: in order to verify the superiority of exponential histogram specification, a group of comparative experiments are carried out to compare exponential histogram specification with Gaussian histogram specification.
[0212] According to the histogram adjusted by exponential distribution, the total number of pixels P and the average value μ of exponential distribution are mainly used. In this function, the average value μ is used to calculate the rate parameter λ of the distribution, that is, λ=1 / μ, and is applied to the formula f(x)=λe -λ To calculate the probability density of each gray level. Let μ o and μ e represent the average gray value of the original image and the histogram equalization image respectively. These probability densities are multiplied by the total number of pixels P and rounded to obtain the expected number of pixels of each gray level. If the total number of pixels of the histogram does not match P, the function will adjust the number of pixels of some gray levels by increasing or decreasing appropriately to ensure that the total number of pixels matches accurately. Thus, the histogram can reflect the characteristics of exponential distribution.
[0213] Because the change of exponential histogram is only affected by μ, in order to study the influence of this parameter on the maximum embedding space B max and the change of PSNR after embedding data under the condition of global specification of exponential histogram. By specifying an average value to reduce the contrast, and according to the difference of μ, two experiments can be considered. The first experiment keeps the brightness of the original image, μ = μ o . The second experiment is μ = μ e , aiming to keep the brightness of the histogram equalization image version. The following is a performance comparison study of the image gray average value in three different cases with different parameters. It should be noted that B max in the following data is calculated by two-level embedding, which contains two layers of embedding space. The specific data is shown in Table 1.
[0214] Table 1 Performance comparison of different parameters of exponential histogram
[0215]
[0216]
[0217] From the data in the above table, it can be clearly seen that under the same parameters, the selection of zero and peak value is extremely superior, which ensures extremely low distortion after embedding and restoring data. The average PSNR of the embedding and restoring data under the two conditions of exponential histogram specification is 56.50dB and 56.79dB, which is very close to the Gaussian histogram specification. However, B max in the case of exponential histogram specification is obviously greater than B max in the case of Gaussian histogram specification, and the difference between B max under the two parameters is 0.04bpp and 0.07bpp, which is a significant gain for the embedding space, which is improved by 5% to 10%. It can be seen from here that, compared with Gaussian histogram specification, exponential histogram specification has better embedding performance advantage.
[0218] The gain of the variable length coding proposed in the present application to the image signal-to-noise ratio. The coding method used in the present application is variable length coding, and in order to study the performance of the variable length coding method, the performance of the traditional fixed length coding is compared. By using the two coding methods to encode the embedded data, the effect of reducing distortion is compared. The specific coding will be described in the specific embodiment. Let μ o , σ o and μ e , σ e represent the gray average value and standard deviation of the original image and the histogram equalization image respectively. This study is carried out under four different conditions of global contrast enhancement, which are histogram equalization, Gaussian histogram specification under the parameter specification σ = (σ o + σ e ) / 2, and μ respectively equal to μ o and μ eand μ = μ e After global contrast enhancement by these methods, the recovered data is encoded in different ways to get new PSNR indicators. The specific data is shown in Table 2.
[0219] Table 2 Gain of encoding in different ways for PSNR
[0220]
[0221] The above table records the gain of encoding for PSNR in different cases in detail. After encoding the embedded data using fixed-length encoding with n = 2, the PSNR of histogram equalization increases from 58.66 dB to 60.62 dB, and the PSNR of Gaussian histogram specification with two parameters increases from 57.14 dB and 57.15 dB to 59.18 dB and 57.17 dB, respectively. For exponential histogram specification, the PSNR increases from 56.79 dB to 59.28 dB compared with the data in Table 1. For the four cases, encoding using traditional fixed-length code with n = 2, the average gain of PSNR is 2.13 dB.
[0222] Further research on the gain of PSNR using variable-length code shows that it has greater gain than using fixed-length code with n = 2. As shown in the last row of Table 2, the gain of variable-length code encoding over fixed-length code encoding is 0.98 dB, 0.97 dB, 1.02 dB, and 0.97 dB, respectively, with an average gain of 0.985 dB for variable-length encoding compared with fixed-length encoding with n = 2.
[0223] To ensure data comparability, different global contrast enhancement techniques and the same local contrast enhancement parameter settings are used, and at the same time, 16 clusters are formed, and gamma correction is used for the 5th cluster with a gamma correction value of 0.5. The Kodak03, Kodak04, Kodak11, Kodak17, and Kodak18 images are used as experimental objects, and the RCE, RMBE, and PSNR data are recorded in Table 3.
[0224] The RCE indicator generally refers to the performance indicator of reversible contrast enhancement. This indicator is used to evaluate the degree of improvement in image quality after reversible contrast enhancement processing. Specifically, the RCE indicator involves the enhancement effect of contrast and the ability to preserve image details, as well as the reversibility of the enhancement process.
[0225]
[0226] As shown in equation (1), the calculation of RCE utilizes the standard deviation (Std.) to the image and the number of gray levels "L". Since the quantitative value of each evaluation index is fixed between 0-1 in this study, a constant 0.5 is added in the formula to achieve the desired range. When the image contrast reaches the optimal level, RCE = 1; if RCE equals 0.5, the contrast of the image has not been enhanced. When the image contrast decreases, RCE is less than 0.5, and vice versa.
[0227] The RMBE index, which stands for "Reversible Mean Brightness Error", is an index for evaluating the brightness preservation performance in image processing. In image processing, especially when embedding additional data into the image (such as watermark or other information), it is very important to maintain the original visual attributes of the image. RMBE mainly focuses on the deviation between the average brightness of the processed image and the average brightness of the original image, which is a key link to ensure that the image quality is not significantly changed.
[0228]
[0229] The RMBE formula is equation (2), where M original represents the average brightness of the original image, M new represents the average brightness of the image to be tested, and L represents the maximum gray level. When the average brightness of the contrast-enhanced image remains unchanged, RMBE is 1, but the greater the difference between the average brightness of the original image and the enhanced image, the closer RMBE is to zero.
[0230] Table 3 introduces the local contrast enhancement parameter index record table
[0231]
[0232] From the data in the above table, it can be seen that after the image is enhanced by different global contrast enhancement techniques, the same local contrast enhancement technique is introduced, and the contrast of the image is also improved to different degrees. The effect of the enhancement is shown in Figure 2 . The histogram equalization of Kodak03 (first row), Kodak04 (second row), Kodak11 (third row), Kodak17 (fourth row) and Kodak18 (fifth row) is shown in the first column, the local contrast enhancement with Gaussian histogram specification with μ o is shown in the second column, the local contrast enhancement with Gaussian histogram specification with μ e is shown in the third column, and the local contrast enhancement with exponential histogram specification with μ e is shown in the fourth column.
[0233] Meanwhile, comparing the data, it can be concluded that the local contrast enhancement under the parameter should be the best in the aspect of contrast enhancement, and the RCE can reach 0.53 when the Gaussian histogram specification is based on σ=(σ o +σ e ) / 2 and μ=μ e , and the RMBE of the exponential histogram specification is 0.989, and the visual effect in the brightness aspect is almost the same as that of the image without local contrast enhancement. However, it should be pointed out that the image is further modified by this method while the contrast is improved, and the PSNR after embedding has a 4.1dB attenuation under the local contrast enhancement of the parameter.
[0234] This experiment shows that the image can be further modified by the application to achieve the purpose of local contrast enhancement and enhance the light and dark details of the image after global contrast enhancement of the specified image, and the residual-based accurate recovery technology is used to ensure the reversibility of the overall algorithm.
[0235] In order to visually show the effect of the application scheme, in the Figure 3 , the effect of the Gaussian histogram specification under the condition of σ=(σ o +σ e ) / 2 and μ=μ e is compared with the effect of the application scheme under the parameter, and still taking Kodak03, Kodak04, Kodak11, Kodak17 and Kodak18 as experimental objects, it can be seen that the result image formed by the scheme described in the application has more advantages in local contrast, the light and dark details are more abundant, and has better visual effect.
[0236] The application adopts the above technology and has the following technical characteristics: the traditional reversible contrast enhancement technology is usually global contrast enhancement, which may also lead to the loss of part of the details of the image, and the application also proposes a solution by introducing local contrast enhancement to solve this problem, and finally the superiority of the application in solving the two problems is verified by experiments.
[0237] It is apparent that the described embodiments are only some — but not all — of the embodiments of the present application. The embodiments described in this application and features in the embodiments can be combined with each other in cases without conflict. The components of the embodiments of the present application, which are generally described and shown in the accompanying drawings, can be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of the present application is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work, shall fall within the scope of protection of the present application.
Claims
1. A method for image low-distortion reversible contrast enhancement based on RDH, characterized in that: It comprises the following steps: Step 1, the original image is histogram equalization processing to calculate the contrast enhanced gray level mapping; Step 2, the original image is transformed according to the gray level mapping to obtain the global enhanced image; Step 3. Calculate the data structures A and B for the inverse one-to-one and one-to-many gray scale mapping, respectively, according to the gray scale mapping. Data structure A is a table containing L α entries, mapping the actual gray scale to the original gray scale. Data structure B is a structure containing L β entries, which associates each actual gray level with the compressed list of the corresponding original gray levels; Step 4, the data structure A and B are used to extract the global recovery data information from the original image, that is, the data for the original image recovery, which is obtained by calculating the data structure A and B of the inverse one-to-one and one-to-many gray mapping respectively; Step 5, the global recovery data information is encoded as embedded data; Step 6, embedding the coded recovery data into the globally enhanced image to obtain the reversible globally contrast enhanced image, using the selection method of peak and zero to obtain a list containing p pairs (z k ,p k ) creating a peak map M p for data embedding, the extraction of data is by means of the peak map M p into a zero map M z , by means of M z extracting data structures A and B, and decompressing the list of B for restoring the image with global contrast enhancement to the original image; Step 7, the fuzzy mean clustering algorithm is used to enhance the local contrast of the reversible global contrast enhanced image, so as to further obtain the local contrast enhanced image; Step 8, after the image is converted into gray scale by using the fuzzy mean clustering algorithm, a one-to-one mapping and a many-to-one mapping are used in the same way of mapping inversion, and the number L of the one-to-one mapping and the many-to-one mapping is calculated α and l β recorded, so that the local recovery data information is extracted from the reversible global contrast enhanced image, and the image with the enhanced local contrast is recovered to the original image; Step 9, the local recovery data information is embedded into the local contrast enhanced image to obtain the reversible local contrast enhanced image.
2. The RDH-based image low-distortion reversible contrast enhancement method of claim 1, wherein: In step 1, the contrast enhanced gray level mapping is calculated by histogram equalization or histogram specification.
3. The RDH-based image low-distortion reversible contrast enhancement method according to claim 2, characterized in that: In step 1, the original image is processed by exponential histogram specification.
4. The RDH-based image low-distortion reversible contrast enhancement method of claim 1, wherein: The indefinite length coding method of step 5 is: different coding methods are adopted for "1" and "0", that is, "1" is transformed into "010", and "0" is transformed into "00" for coding.
5. The RDH-based image low-distortion reversible contrast enhancement method of claim 1, wherein: Step 6 specifically comprises the following steps: Step 6-1, Compute histogram of enhanced image to generate peaks and zero-point map M p and compute maximum bitrate; Step 6-2, embedding data by using M p ; Step 6-3, the required bit rate should ensure that the embedded data structure satisfies the following formula: where |. | denotes the size of a bit, N denotes the total number of image pixels; A is a table containing L α entries mapping the actual gray levels to the original gray levels; B is a structure containing L β entries linking each actual gray level to the compressed list of corresponding original gray levels; the size of the peak map M p and of the embedded data are stored in the header in the reserved image area, while the header file is augmented to store the parameters of the data sequence extension.
6. The RDH-based image low-distortion reversible contrast enhancement method according to claim 5, characterized in that: The calculation steps of the maximum bit rate of step 6-1 are as follows: Step 6-1-1, traverse the bins of the histogram H = {h0, h1,..., hn} of the contrast enhanced image from the right end to find the pair of adjacent zero and peak value of p, (z L , p k ). k ) Step 6-1-2, based on p pairs of adjacent zero and peak intervals (z) k ,p k Create a peak mapping M. p Used for data embedding and extraction; if h i If M is not selected as a peak bin, then p (i) = 0; if h i If selected, then M p (i)≠0 indicates the position of the corresponding adjacent zero bins; if the corresponding zero bin is on i-1, then M p (i) = -1; If zero bin is on i+1, then M p (i) = 1; Step 6-1-3, the maximum bit rate is calculated to ensure pairing, and the maximum bit rate calculation formula is as follows: wherein is the maximum number of pixels for embedding; N is the total number of pixels; P denotes the number of interval pairs (z k ,p k ) of adjacent zero and peak values; z k denotes the zero interval of the kth interval pair, p k denotes the peak interval of the kth interval pair.
7. The RDH-based image low-distortion reversible contrast enhancement method according to claim 6, characterized in that: The interval pair search method of step 6-1-1 is to determine whether the value h of the current interval is equal to 0; if so, check the values of two adjacent intervals. i = 0; if so, check the values of two adjacent intervals. Determine whether only one adjacent interval has a value other than zero; if so, the corresponding non-zero adjacent interval is taken as the peak interval and paired with the current zero interval to form an interval pair; otherwise, determine whether the values of two adjacent intervals are both greater than zero; if so, check whether the value of the previous interval of the adjacent interval is zero; if so, the adjacent previous interval is taken as the peak interval and paired with the previous interval of the adjacent interval to form an interval pair, and the adjacent posterior interval is taken as the peak interval and paired with the current zero interval to form an interval pair; otherwise, the value of the previous interval of the adjacent interval is greater than zero, and the interval with the maximum value of the adjacent interval is selected as the peak interval and paired with the current zero interval to form an interval pair.
8. The RDH-based image low-distortion reversible contrast enhancement method of claim 5, wherein: The specific steps of step 6-2 are as follows: Step 6-2-1, b i i = 1,..., P is defined as the bit sequence to be embedded, the embedding process is: scan the image from left to right, from top to bottom, and check each pixel a; Step 6-2-2, judging M p (a) = 0 is true; if so, skip this pixel; otherwise, perform Step 4-2-3, Step 6 - Embedding bit b i If b i = 0, the pixel remains unchanged; if b i = 1, the gray level will increase or decrease according to the corresponding zero bin position a; the embedding of b i is expressed by the following equation: A = a + b i M p (a), if M p (a) ≠ 0 (7); Step 6-2-4, data extraction and original recovery are immediately performed, and it is detected whether the pixel belongs to the selected peak-zero pair; If belonging to the selected bins, the embedded bits are extracted, i.e. b i = 0 if being a zero point, b i = 1 ; the original grey levels are restored; the peak value map M p is created; a zero point map M z is created: Step 6-2-5, the pixel is checked according to the scanning order, and the original gray level recovery of each pixel A is as follows: a = A - M z (a) (9); Step 6-2-6, the embedded data is extracted from the selected storage unit bit by bit, and the only information required for detection is the peak value map and the number of embedded bits; 9. The RDH-based image low-distortion reversible contrast enhancement method of claim 1, wherein: The fuzzy mean clustering of step 7 specifically comprises the following steps: Step 7-1, the membership matrix U is initialized with random numbers between 0 and 1, so that the following constraint condition is satisfied: where n is the total number of data points, c is the total number of cluster centers, u ij is the membership of data point x i to cluster center c j . Step 7-2, calculate c cluster centers c i (i = 1,..., c), the specific calculation formula is as follows: Step 7-3, the objective function is calculated, and the algorithm stops when the value of the objective function is less than a set value, or the change amount of the value of the objective function relative to the last objective function is less than a set threshold ε; the calculation formula of the objective function is as follows: where m is a real number greater than 1, called fuzzifying parameter, which controls the fuzziness degree of clustering; ||x i - c j is the Euclidean distance from x i to the cluster center c j . Step 7-4, calculate the update membership U matrix, and perform step 7-2; the update formula of the membership U matrix is as follows:
Citation Information
Patent Citations
Reversible data hiding method and recovery method for realizing contrast enhancement of a color image
CN110111270A
Contrast enhancement RDH method and system based on histogram movement
CN113781285A