semanurbilada/dct-image-steganography-study

GitHub: semanurbilada/dct-image-steganography-study

Stars: 0 | Forks: 0

# 🎯 Advanced DCT-Based Image Steganography Study A simple and effective **DCT-based image steganography system** that focuses on: - 🔒 Imperceptibility - 🛡️ Robustness - 📦 Embedding capacity ## 📌 Overview This project hides secret data inside images using **Discrete Cosine Transform (DCT)**, similar to JPEG compression. ✅ Key ideas: - Embed data in **frequency domain** - Use **Y (luminance) channel only** - Modify **AC** and **DCT coefficients with LSB** ## ⚙️ Workflow

Workflow

The system follows a JPEG-like pipeline where data is embedded directly into DCT coefficients and later reconstructed back into a valid image. The same transform steps are reversed during extraction. ## 📊 Sample Results ### 🔹 Image Quality | Image | PSNR | SSIM | |------|------|------| | Astronaut | 39.35 dB | 0.954 | | Lenna | 36.17 dB | 0.953 | ➡️ High similarity → embedding is visually hidden 🔗 Code: [`final/quality_metrics.py`](final/quality_metrics.py) ### 📸 Visual Comparison

➡️ Stego images remain visually indistinguishable from originals ### 🔹 Robustness - ✅ JPEG Compression → High recovery (~100%) - ❌ Noise (Gaussian / S&P) → Near 0% recovery ➡️ Strong against compression, weak against noise
📊 [View detailed results!](https://github.com/semanurbilada/dct-image-steganography-study/tree/main/images) 🔗 Code: - [`final/attack_jpeg.py`](final/attack_jpeg.py) - [`final/attack_noise.py`](final/attack_noise.py) - [`final/extraction_test.py`](final/extraction_test.py) ### 🔹 Capacity Insight - Theoretical capacity > Effective capacity - Depends on **DCT coefficient availability** 🔗 Code: [`final/max_capacity_analysis.py`](final/max_capacity_analysis.py) ## 📸 Example Outputs

➡️ Heatmaps show that embedding is **block-based and globally distributed** in the frequency domain 🔗 Code: [`final/embedding_heatmap.py`](final/embedding_heatmap.py) ### 📈 Analysis Visualizations

➡️ PSNR–BPP curves show the trade-off between capacity and quality ➡️ Histogram analysis confirms statistical similarity between cover and stego images ## 📂 Project Structure core/ → DCT, zigzag, embedding logic docs/ → Reports (midterm & final) midterm/ → Basic steganography pipeline final/ → Analysis (JPEG, noise, metrics, heatmaps) images/ → Datasets, results, graphs ├── astronaut.png # Original cover image (Astronaut) ├── lenna.png # Original cover image (Lenna) ├── stego_astronaut.png # Stego image with embedded data (Astronaut) ├── stego_lenna.png # Stego image with embedded data (Lenna) ├── graphs/ # Generated plots and statistical visualizations ├── jpeg_attacks/ # Output images after JPEG compression attacks └── noise_attacks/ # Output images after noise-based attacks ## ▶️ How to Run ### Basic pipeline python3 -m midterm.run_stego_algorithm python3 -m midterm.extract_hidden_message python3 -m final.max_capacity_analysis.py ### Analysis Alternatively, you can run scripts directly inside their respective directories: python3 -m attack_jpeg.py python3 -m attack_noise.py python3 -m hitogram_analysis.py python3 -m jpeg_vs_noise_plot.py python3 -m quality_metrics.py ## 🙏 Acknowledgement Based on:
[DCT-Image-Steganography (original repo)](https://github.com/MasonEdgar/DCT-Image-Steganography) with MIT License. Extended with analysis, visualization and robustness evaluation. ## 👩‍💻 Author Semanur Bilada (MSc)
Advanced Digital Image Processing ## 📌 Citation If you use dct-image-steganography-study in your research, please cite: @software{dct-image-steganography-study2026, title = {Advanced DCT-Based Image Steganography Study}, author = {Semanur Bilada}, year = {2026}, url = {https://github.com/semanurbilada/dct-image-steganography-study} } ## Licence MIT License - see the [LICENSE](https://github.com/semanurbilada/dct-image-steganography-study?tab=MIT-1-ov-file) file for details.