Image Information Hiding via DCT Block-Based Gray Image Steganography with Histogram

Introduction

Image steganography conceals secret data within a cover image. This method utilizes the Discrete Cosine Transform (DCT) and histogram manipulation to embed information into grayscale images, aiming for robustnes and imperceptibility.

Methodology

The proposed technique involves the following key steps:

  1. DCT Block Processing: The cover image is partitioned into 8x8 pixel blocks. A two-dimensional DCT is applied to each block, transforming spatial pixel data in to frequency domain coefficients.
  2. Data Embedding: Secret bits are embedded by modifying specific low-frequency DCT coefficients according to a predefined encoding rule. This leverages the perceptual importance of these coefficients.
  3. Histogram Adjustment: Post-embedding, histogram processing is performed on the modified DCT blocks to adjust contrast and luminance distribution, helping to maintain visual fidelity.
  4. Image Reconstruction: An inverse DCT (IDCT) is applied to each processed block. The blocks are then reassembled to produce the final stego-image containing the hidden data.

Experimental Results

The method was evaluated on several metrics:

  • Capacity: The technique supports embedding a larger payload compared to some conventional spatial domain steganography methods.
  • Robustness: The hidden information demonstrates resilience against common image processing operations such as JPEG compression and filtering.
  • Imperceptibility: Visual inspection and similarity metrics (like PSNR) indicate minimal perceptual difference between the cover and stego-images.

Code Example

Below is a MATLAB function for calculating the probability histogram of an image, which can be used in the analysis phase.

function probDist = computeHistogramProb(imgMatrix)
% computeHistogramProb Calculates the normalized histogram (probability distribution).
%   probDist = computeHistogramProb(imgMatrix) returns a 256-element vector
%   where each element is the probability of a pixel intensity (0-255).

    imgMatrix = uint8(imgMatrix);
    [rows, cols] = size(imgMatrix);

    freqCount = zeros(256, 1);
    for r = 1:rows
        for c = 1:cols
            intensityVal = imgMatrix(r, c) + 1; % MATLAB indices start at 1
            freqCount(intensityVal) = freqCount(intensityVal) + 1;
        end
    end

    totalPixels = rows * cols;
    probDist = freqCount / totalPixels;
end

Tags: MATLAB DCT Steganography Image Processing Histogram

Posted on Wed, 26 Aug 2026 16:30:02 +0000 by po