Have a personal or library account? Click to login

Enhanced edge-based steganography using image segmentation and random LSB substitution for secure data hiding

Open Access
|Oct 2025

Figures & Tables

Figure 1:

Proposed diagram for data hiding.
Proposed diagram for data hiding.

Figure 2:

Proposed diagram for data extraction.
Proposed diagram for data extraction.

Figure 3:

Histogram analysis of cover and stego-image.
Histogram analysis of cover and stego-image.

Evaluation metrics for stego-image quality and performance

MetricDescriptionRole
Capacity (m)The total number of bits that can be embedded into the cover image; mathematically m = |M|, where M is the message bit-stream.Defines payload limit and governs the trade-off between embedding rate and imperceptibility.
MSEMSE between cover and stego images: MSE=1MNi=1Mj=1N(C(i,j)S(i,j))2. MSE = {1 \over {MN}}\sum\limits_{i = 1}^M {\sum\limits_{j = 1}^N {{{(C(i,j) - S(i,j))}^2}}}. Quantifies raw embedding noise energy; lower MSE indicates smaller average pixel perturbations.
PSNRPSNR, computed from MSE: PSNR=10log102552MSE. {\rm{PSNR}} = 10 \cdot {\log_{10}}\left({{{{{255}^2}} \over {MSE}}} \right). Transforms MSE into a more interpretable logarithmic scale; values > 40 dB typically imply perceptual losslessness.
SSIMStructural Similarity Index, measuring perceptual quality: SSIM(C,S)=(2μCμS+C1)(2σCS+C2)(μC2+μS2+C1)(σC2+σS2+C2), SSIM(C,S) = {{(2{\mu_C}{\mu_S} + {C_1})(2{\sigma_{CS}} + {C_2})} \over {(\mu_C^2 + \mu_S^2 + {C_1})(\sigma_C^2 + \sigma_S^2 + {C_2})}}, where μ, σ, and σCS denote means, variances, and covariance, respectively.Assesses structural and contrast preservation; high SSIM (≈1) ensures imperceptibility and resists structure-based attacks.
Embedding time (Te)Total time for the embedding operation:; Te=Tpre+Tembed, {T_e} = {T_{{\rm{pre}}}} + {T_{{\rm{embed}}}}, where Tpre is preprocessing (e.g., edge detection) and Tembed is bit embedding.Measures computational efficiency; critical for real-time or large-scale applications.
Histogram analysisComparison of pixel-intensity histograms between cover and stego images to detect distribution shifts.Detects statistical anomalies introduced by embedding; ensures stego-images remain statistically indistinguishable from covers.

Existing steganographic techniques: contributions and limitations

S. No.ReferenceContributionLimitation
1[3]Multilevel encryption + blue-channel block shuffling; near-zero MSE, SSIMVulnerable to geometric distortions and lossy compression.
2[2]LSB + PVD + multitier encryption; PSNR > 30 dB, SSIM ≈1Trade-offs between payload, imperceptibility, and robustness not fully explored.
3[13]Center-pixel offset + pseudorandom sequence; high PSNR, low costUntested against advanced steganalysis.
4[8]LoG + Canny hybrid in wavelet domain; high capacity, strong imperceptibilityLimited payload when edges are sparse.
5[10]Survey of chaotic and randomizedIncreased computational complexity.
6[14]LSB strategies; improved stealth MSB matching + LSB substitution; up to 6 bits/pixel, minimal distortionResilience under compression not evaluated.
7[15]Distinction grade value method; robust against noiseLacks new experimental validation.
8[16]Embedding in high-variance regions; PSNR/SSIM gainsComputationally intensive for real-time use.

Comparison of PSNR and SSIM with recent LSB-based methods

No.ReferenceBaseline PSNR (dB)Baseline SSIMOur PSNR (dB)Our SSIM
1Ali et al. [14]63.950.96565.601.0000
2Chaudhary and Sharma [34]54.320.94363.951.0000
3Mali and Dongre [12]65.190.97265.301.0000
4Mukherjee and Sanyal [36]52.870.93066.821.0000
5Rahman et al. [3]52.140.96865.191.0000
6Zhang et al. [7]65.300.97065.651.0000
7Kaur and Singh [18]64.690.96065.181.0000
8Wu and Li [37]65.000.97565.301.0000
9Wang and Zhang [25]66.000.97867.631.0000

Evaluation metrics of different cover and message images

S. No.Cover imageMessage imageCapacity (BPP)PSNR (dB)SSIMEmbedding time (s)
1MoonLena0.035865.601.00000.2441
2BarbLena0.052463.951.00000.0613
3BlueseaLena0.022567.631.00000.1500
4BoatLena0.028866.821.00000.0126
5HouseLena0.039565.191.00000.2096
6LoinLena0.035565.651.00000.0286
7MandrillLena0.039465.181.00000.0144
8NatureLena0.038465.301.00000.3303
9RiverLena0.044064.691.00000.0690
10WaterLena0.048864.251.00000.2434

Comparison of edge detection techniques

DetectorNoise sensitivityEdge thicknessComp. costKey reference
SobelMediumThickLowSun et al. [5]
PrewittMediumThickLowSun et al. [5]
LaplacianHighThick but noisyLow–MedHabiban et al. [8]
CannyLowThin, connectedMed–HighMohanty et al. [6] and Zhang et al. [7]

Average improvement in PSNR and SSIM

MetricAverage improvement (%)
PSNR improvement3.24
SSIM improvement3.95

Proposed algorithm

  • Require: Cover image C, Message image M

  • Ensure: Stego image S

    • 1: Step 1: Preprocessing and Image Segmentation

    • 2: Load C and M

    • 3: if C and M are color images then

    • 4: Convert them to grayscale using [32]: G(i,j)=0.2989R(i,j)+0.5870G(i,j)+0.1140B(i,j) G(i,j) = 0.2989R(i,j) + 0.5870G(i,j) + 0.1140B(i,j)

    • 5: end if

    • 6: Apply threshold T for binarization: B(i,j)=1,ifG(i,j)>T0,otherwise B(i,j) = \left\{{\matrix{{1,} \hfill & {{\rm{if}}\,G(i,j) > T} \hfill \cr {0,} \hfill & {{\rm{otherwise}}} \hfill \cr}} \right.

    • 7: Use Otsu's method to calculate T: T=argmaxTσB2(T) T = \arg {\max_T}\sigma_B^2(T) where σB2(T) \sigma_B^2(T) is the between-class variance.

    • 8: Perform segmentation on BC(x, y) and BM (x, y).

    • 9: Step 2: Edge Detection

    • 10: Apply Canny edge detection on BC(x, y) [33]: |I|=IX2+IY2 |\nabla I| = \sqrt {{{\left({{{\partial I} \over {\partial X}}} \right)}^2} + {{\left({{{\partial I} \over {\partial Y}}} \right)}^2}}

    • 11: Retain edge pixels whose lengths match edges in BM (i, j).

    • 12: Step 3: Randomization and LSB Substitution

    • 13: Randomly select edge pixels using a pseudo-random number generator RNG with secret key K [34]: Q(j)=RNG(EC(i,j),K) Q(j) = RNG({E_C}(i,j),K)

    • 14: Perform LSB substitution: Q(i,j)=Q(i,j)(Q(i,j)mod2)+b,ifembeddingbitb=1Q(i,j)(Q(i,j)mod2),ifb=0 Q'(i,j) = \left\{{\matrix{{Q(i,j) - (Q(i,j)\bmod 2) + b,} \hfill & {{\rm{if}}\,{\rm{embedding}}\,{\rm{bit}}\,b = 1} \hfill \cr {Q(i,j) - (Q(i,j)\bmod 2),} \hfill & {{\rm{if}}\,b = 0} \hfill \cr}} \right.

    • 15: Step 4: Stego Image Generation

    • 16: Combine modified edge pixels with non-edge regions to form S(i, j).

    • 17: Step 5: Post-Processing and Quality Metrics

    • 18: Compute PSNR [35]: PSNR=10log10MAX2MSE {\rm{PSNR}} = 10 \cdot {\log_{10}}\left({{{MA{X^2}} \over {MSE}}} \right) where MSE=1MNi=1Mj=1N(C(i,j)S(i,j))2 MSE = {1 \over {MN}}\sum\limits_{i = 1}^M {\sum\limits_{j = 1}^N {{{(C(i,j) - S(i,j))}^2}}}

    • 19: Accept S only if PSNR > 40.

    • 20: Step 6: Embedding Time

    • 21: Measure embedding time Te [26]: Te=Tpre+Tembed {T_e} = {T_{pre}} + {T_{embed}}

    • 22: Optimize Te by refining edge detection and randomization steps.

Performance comparison of embedding strategies

Embedding strategyAverage PSNR (dB)Average SSIMEmbedding rate (BPP)
Edge-guided embedding65.431.0000.0385
Global embedding62.990.9620.0568
Language: English
Submitted on: Mar 30, 2025
Published on: Oct 17, 2025
Published by: Professor Subhas Chandra Mukhopadhyay
In partnership with: Paradigm Publishing Services
Publication frequency: 1 issue per year

© 2025 Juhi Singh, Arun Kumar Singh, Shishir Singh Chauhan, published by Professor Subhas Chandra Mukhopadhyay
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.