An image processing method and device based on an asymmetric histogram algorithm

CN117768657BActive Publication Date: 2026-10-27SHANGHAI UNIVERSITY OF ELECTRIC POWER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311533276.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-16
Publication Date
2026-10-27
Estimated Expiration
2043-11-16

AI Technical Summary

Technical Problem

[0003]然而,AHS算法仅对图像块中的中心像素进行信息嵌入,其余大量像素被浪费,使得平均嵌入率过低,总体嵌入容量较小

Benefits of technology

[0017]与现有技术相比,本发明利用图像块中的最大值、最小值像素预测其他像素,并结合改进的预测器以生成更为陡峭的直方图,能够一定程度上提高图像质量的同时,大幅度的提升其嵌入容量,能够满足更多情况的嵌入需求,可以应用于图像隐写、信息安全等领域。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117768657B_ABST
    Figure CN117768657B_ABST
Patent Text Reader

Abstract

The application provides an image processing method and device based on an asymmetric histogram algorithm, which comprises the following steps: finding a maximum value pixel in an image block, and sequentially predicting the remaining pixels in the block according to the spatial position of the maximum value pixel; adjusting the parameters in a prediction formula through an improved predictor, calculating the prediction error of the maximum value pixel and the remaining pixels, generating a prediction error histogram, finding the peak point in the prediction error histogram, and embedding information in the pixel in the decreasing direction thereof; finding a minimum value pixel in the image block, and sequentially predicting the remaining pixels in the block according to the spatial position of the minimum value pixel; adjusting the parameters in a prediction formula through an improved predictor, calculating the prediction error of the minimum value pixel and the remaining pixels, generating a prediction error histogram, finding the peak point in the prediction error histogram, and embedding information in the pixel in the increasing direction thereof.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more specifically, to an image processing method and apparatus based on an asymmetric histogram algorithm. Background Technology

[0002] Reversible data hiding (RDH) not only extracts secret information from a hidden data structure but also restores the original data structure without loss. Among algorithms based on prediction error histograms (PEE), asymmetric histogram shaving (AHS) is a particularly ingenious approach. AHS divides the image into blocks, sets the center pixel as the pixel to be predicted, and finds the maximum and minimum values ​​among the remaining pixels as the prediction pixels. Predictions are then made for the center pixel separately, generating a prediction error histogram. Peak points in the histogram are found, and the center pixel is either decreased or increased to embed information. Performing these two opposite operations allows for a compensation and restoration reaction, reducing image distortion.

[0003] However, the AHS algorithm only embeds information from the center pixel of the image patch, wasting a large number of other pixels, resulting in a low average embedding rate and a small overall embedding capacity. Furthermore, the AHS algorithm uses a traditional predictor to calculate the prediction error by subtracting the predicted pixel from the predicted pixel, resulting in a prediction error histogram that is not steep enough, further reducing the overall embedding capacity. Summary of the Invention

[0004] To address the shortcomings of existing technologies, the present invention aims to provide an image processing method and apparatus based on an asymmetric histogram algorithm. The present invention uses the maximum and minimum pixel values ​​in an image block to predict other pixels, and combines an improved predictor to generate a steeper histogram, which can significantly improve image quality while greatly increasing its embedding capacity.

[0005] To solve the above problems, the technical solution of the present invention is as follows:

[0006] An image processing method based on an asymmetric histogram algorithm includes the following steps:

[0007] Find the maximum pixel in the image block and use it as the predicted pixel. Use the remaining pixels in the image block as the predicted pixels and use the maximum pixel to predict the remaining pixels in the block according to their spatial positions.

[0008] By improving the predictor, adjusting the parameters in the prediction formula, calculating the prediction error between the maximum pixel and the other pixels, generating a prediction error histogram, finding the peak point in the prediction error histogram, and embedding information into the pixels in the histogram in the direction of its decrease.

[0009] Find the minimum pixel in the image block and use it as the predicted pixel. Use the remaining pixels in the image block as the predicted pixels and use the minimum pixel to predict the remaining pixels in the block according to their spatial positions.

[0010] By improving the predictor, adjusting the parameters in the prediction formula, calculating the prediction error between the minimum pixel and the other pixels, generating a prediction error histogram, finding the peak point in the prediction error histogram, and embedding information into the pixels in the direction that increases the peak point.

[0011] Preferably, the steps of adjusting the parameters in the prediction formula using an improved predictor, calculating the prediction error between the maximum pixel and other pixels, generating a prediction error histogram, finding the peak point in the prediction error histogram, and embedding information into the pixels in the peak point in the direction of decreasing peak value specifically include: finding the maximum pixel in the image block, then scanning in spatial order, calculating the prediction error using the maximum pixel after each scan, and processing the prediction formula using an improved predictor to adjust the parameters in the prediction formula and generate a steeper histogram. The specific processing formula is as follows: Here, f > 0 and 0 < z ≤ f + 1 are used to ensure that the histogram remains on one side of the coordinate axis after modification.

[0012] Preferably, the steps of adjusting the parameters in the prediction formula using an improved predictor, calculating the prediction error between the maximum pixel and other pixels, generating a prediction error histogram, finding the peak point in the prediction error histogram, and embedding information into the pixels in the histogram in the direction of decreasing error specifically include: after all image blocks have been predicted, generating a maximum prediction error histogram, finding its peak point and zero point, embedding data into the pixels at the peak point of the prediction error, performing a displacement operation on pixels located between the peak point and zero point, keeping other pixels unchanged, and performing a "subtraction" operation on all pixel modifications, that is, reducing the pixel value. The prediction error modification formula is: The formula for pixel modification is: x i ′=x i -e max .

[0013] Preferably, the steps of adjusting the parameters in the prediction formula using an improved predictor, calculating the prediction error between the minimum pixel and the remaining pixels, generating a prediction error histogram, finding the peak point in the prediction error histogram, and embedding information into the pixels in the direction of increasing peak value specifically include: after embedding using the maximum pixel, returning to the first image block, sequentially finding the minimum pixel, using the minimum pixel to predict other pixels within the block, and processing the prediction formula by improving the predictor, adjusting the parameters in the prediction formula, and generating a steeper histogram. The specific processing formula is as follows: Here, f > 0 and 0 < z ≤ f + 1 are used to ensure that the histogram remains on one side of the coordinate axis after modification.

[0014] Preferably, the steps of adjusting the parameters in the prediction formula using an improved predictor, calculating the prediction error between the minimum pixel and the remaining pixels, generating a prediction error histogram, finding the peak point in the prediction error histogram, and embedding information into the pixels in the direction of increasing the peak point specifically include: generating a minimum prediction error histogram after calculating the prediction error for all image block pixels, finding its peak point and zero point, embedding data into the pixels at the peak point of the prediction error, performing a displacement operation on the pixels located between the peak point and the zero point, keeping other pixels unchanged, and performing an "addition" calculation in the data modification process, that is, increasing all modified pixels. The prediction error modification formula is:

[0015] The pixel modification formula is: x′ i =x i +e min .

[0016] Furthermore, the present invention also provides an image processing apparatus based on an asymmetric histogram algorithm, the apparatus including a processor and a memory for storing executable instructions of the processor, the processor being configured to perform the image processing method based on the asymmetric histogram algorithm as described above by executing the executable instructions.

[0017] Compared with existing technologies, this invention uses the maximum and minimum pixel values ​​in an image block to predict other pixels, and combines an improved predictor to generate a steeper histogram. This can improve image quality to a certain extent while significantly increasing its embedding capacity, meeting the embedding needs of more situations. It can be applied to fields such as image steganography and information security. Attached Figure Description

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

[0019] Figure 1A flowchart of an image processing method based on an asymmetric histogram algorithm provided in an embodiment of the present invention;

[0020] Figure 2 This invention provides a method for predicting the remaining pixel map using the maximum value, as provided in this embodiment.

[0021] Figure 3 This invention provides a method for predicting the remaining pixel map using the minimum value, as provided in this embodiment.

[0022] Figure 4 Six basic test images provided for embodiments of the present invention;

[0023] Figure 5a , 5b A comparison chart of embedding capacity performance with different parameters on Lena and Peppers images provided in an embodiment of the present invention;

[0024] Figure 6 This is a diagram illustrating the influence of parameter f on PSNR performance on different basic images, provided in an embodiment of the present invention.

[0025] Figure 7 A comparison chart of the maximum embedding capacity of the multi-channel and improved predictor provided in the embodiments of the present invention on different images;

[0026] Figure 8a , 8b EC-PSNR comparison chart of multi-channel and improved predictors on Lena and Peppers provided for embodiments of the present invention. Detailed Implementation

[0027] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.

[0028] Specifically, this invention, building upon the research on improving embedding capacity using Pixels Value Order (PVO) algorithms, provides an image processing method based on an asymmetric histogram algorithm, such as... Figure 1 As shown, the method includes the following steps:

[0029] S1: Find the maximum pixel in the image block and use it as the predicted pixel. Use the remaining pixels in the image block as the predicted pixels and use the maximum pixel to predict the remaining pixels in the block according to their spatial positions.

[0030] S2: By improving the predictor, the parameters in the prediction formula are adjusted, the prediction error between the maximum pixel and the other pixels is calculated, a prediction error histogram is generated, the peak point in the prediction error histogram is found, and the information of the pixels in the peak point is embedded in the direction of its decrease.

[0031] Specifically, first, find the maximum pixel x in the image patch. max Mark it in yellow, such as Figure 2 As shown, the scanning is then performed in spatial order, and the prediction error is calculated using the maximum pixel value after each scan. By improving the predictor and processing the prediction formula, the parameters in the prediction formula are adjusted to generate a steeper histogram. The specific processing is shown in the following formula:

[0032]

[0033] Here, f > 0 and 0 < z ≤ f + 1 ensures that the modified histogram remains on one side of the coordinate axis. When z is 0, it follows the traditional prediction error algorithm. By adjusting the parameters, the scattered histograms will cluster together to generate a steeper histogram, improving image quality and embedding capacity.

[0034] After all image patches have been predicted, a histogram of prediction error for the maximum value is generated, and its peak and zero points are identified. Pixels with prediction errors at the peak points are embedded, pixels between the peak and zero points are shifted, and other pixels remain unchanged. All pixel modifications are performed using a "subtraction" operation, which reduces the pixel value to ensure that the initial maximum value pixel retains its maximum identity for easy extraction.

[0035] The prediction error is modified as shown in the following formula:

[0036]

[0037] The pixel modification is shown in the following formula:

[0038] x i ′=x i -e max (3)

[0039] S3: Find the minimum pixel in the image block and use it as the predicted pixel. Use the remaining pixels in the image block as the predicted pixels and use the minimum pixel to predict the remaining pixels in the block according to their spatial positions.

[0040] S4: By improving the predictor, adjusting the parameters in the prediction formula, calculating the prediction error between the minimum pixel and the other pixels, generating a prediction error histogram, finding the peak point in the prediction error histogram, and embedding information into the pixels in the direction of its increase.

[0041] Specifically, after embedding using the maximum pixel, we return to the first image block and sequentially find the minimum pixel x. min Mark it in green, such as Figure 3 As shown, predictions are made for other pixels within the block (including the maximum value pixel), and the prediction error is calculated using the minimum value pixel. By improving the predictor and processing the prediction formula, the parameters in the prediction formula are adjusted to generate a steeper histogram. The specific processing is shown in the following formula:

[0042]

[0043] Here, f > 0 and 0 < z ≤ f + 1 ensures that the modified histogram remains on one side of the coordinate axis. When z is 0, it follows the traditional prediction error algorithm. By adjusting the parameters, the scattered histograms will cluster together to generate a steeper histogram, improving image quality and embedding capacity.

[0044] After calculating the minimum prediction error histogram for all image patch pixels, the process still involves finding peak and zero points. However, the data modification process is now changed to an addition calculation, where all modified pixels are enlarged to ensure the minimum pixel's position remains unchanged. The prediction error modification formula is shown below:

[0045]

[0046] The pixel modification is shown in the following formula:

[0047] x′ i =x i +e min (6)

[0048] Therefore, on the one hand, every pixel within all image blocks participates in the embedding process, significantly improving the average embedding rate. On the other hand, except for the largest / smallest pixel which is modified or embedded once, the remaining pixels undergo two reverse processing steps, enabling a compensation and restoration reaction and ensuring the stability of image quality changes.

[0049] like Figure 4 As shown, six grayscale images were selected in the experiment. Figure 5a and Figure 5b The maximum embedding capacity of the Lena and Peppers images under different parameters is shown. It can be seen that when z=1, the performance trends of the two images are completely different, but both achieve optimal results. There is no clear rule pattern for different values ​​of f. Therefore, further research is needed on the selection of parameter f.

[0050] like Figure 6As shown, the PSNR performance of different images with different parameters f is compared when z=1. The image quality performance is best when f is "0" or "1". However, from... Figure 5a and Figure 5b As can be seen, the performance is poor when f = 0. Therefore, the optimal choice of parameters is f = 1 and z = 1.

[0051] Figure 7 The comparison of the maximum embedding capacity before and after the predictor improvement is shown. Figure 8a and Figure 8b The image quality comparison between the two algorithms is shown under different embedding capacities. It can be seen that, for the base image, the improved prediction algorithm offers a significant improvement in embedding capability.

[0052] This invention improves the predictor by adjusting the parameters in the prediction formula, resulting in a sharper histogram. This improved histogram distribution increases the number of pixels at peak points, enhancing the embedding capacity, and reduces the involvement of invalid pixels in processing, thus improving image quality.

[0053] Therefore, this invention, through its improved multi-channel embedding and predictor algorithm, can meet the needs of applications requiring large embedding capacity while maintaining image quality. Furthermore, due to the improved predictor, a large number of invalid shifted pixels are reduced, thus improving image quality. Experiments demonstrate that the method of this invention improves image quality to a certain extent while significantly increasing the image embedding capacity, meeting embedding requirements in a wider range of situations.

[0054] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.

Claims

1. An image processing method based on an asymmetric histogram algorithm, characterized in that, The method includes the following steps: Find the maximum pixel in the image block and use it as the predicted pixel. Use the remaining pixels in the image block as the predicted pixels and use the maximum pixel to predict the remaining pixels in the block according to their spatial positions. By improving the predictor and adjusting the parameters in the prediction formula, the prediction error between the maximum pixel and other pixels is calculated, generating a prediction error histogram. The peak points in the histogram are then identified, and information is embedded into the pixels within these peaks in the direction of decreasing peak values. Specifically, this involves finding the maximum pixel in the image patch, scanning in spatial order, and calculating the prediction error using the maximum pixel after each scan. The prediction formula is then improved by adjusting its parameters to generate a steeper histogram. The specific formula is as follows: Where f > 0 and 0 < z ≤ f + 1, the modified histogram remains on one side of the coordinate axis. After all image patches have been predicted, a histogram of the maximum prediction error is generated. The peak and zero points are identified. Pixels with the prediction error at the peak point are embedded, while pixels between the peak and zero points are shifted. Other pixels remain unchanged. All pixel modifications are performed using a "subtraction" operation, reducing the pixel value. The prediction error modification formula is: The pixel modification formula is: ; Find the minimum pixel in the image block and use it as the predicted pixel. Use the remaining pixels in the image block as the predicted pixels and use the minimum pixel to predict the remaining pixels in the block according to their spatial positions. By improving the predictor and adjusting the parameters in the prediction formula, the prediction error between the minimum pixel and the remaining pixels is calculated, a prediction error histogram is generated, and the peak point in the prediction error histogram is found. The pixels in the peak point are then embedded with information in the direction that increases in peak value. Specifically, after embedding using the maximum pixel, the process returns to the first image block and sequentially finds the minimum pixel. The minimum pixel is then used to predict other pixels within the block. By improving the predictor and processing the prediction formula, the parameters in the prediction formula are adjusted to generate a steeper histogram. The specific processing formula is as follows: Where f > 0 and 0 < z ≤ f + 1, the modified histogram remains on one side of the coordinate axis. After calculating the minimum prediction error histogram for all image block pixels, the peak and zero points are identified. Pixels with the prediction error at the peak point are embedded, while pixels between the peak and zero points are shifted. Other pixels remain unchanged. The data modification process involves an "addition" calculation, which increases the value of all modified pixels. The prediction error modification formula is as follows: The pixel modification formula is: .

2. An image processing device based on an asymmetric histogram algorithm, characterized in that, The apparatus includes a processor and a memory for storing executable instructions of the processor, the processor being configured to perform the image processing method based on the asymmetric histogram algorithm as described in claim 1 by executing the executable instructions.

Citation Information

Patent Citations

  • High-fidelity reversible information hiding method and device based on prediction error value sorting

    CN111898136A

  • Reversible data hiding algorithm based on adaptive pairwise error expansion and embedding complement

    CN114998164A