Code Monkey home page Code Monkey logo

imagesteganography's Introduction

Steganography

Hide text messages in images

Description

(TL;DR : This program can hide a text message in an image, which can only be decoded by this program only.)

Steganography can be divided into two types:

  1. Spatial domain transformation:
    • LSB (Least Significant Bit) transformation.
  2. Frequency domain transformation:
    • DCT (Discrete Cosine Transformation).
    • DWT (Discrete Wavelet Transformation).

Usage:

Make sure you have pip installed!

Go to your terminal. And run the following command to install dependencies:

pip install -r requirements.txt

Now to run the program, run the following command:

python watermarking.py

It will create 3 new folders (it will overwrite if those folders previously exixsted) named "Encoded_image" , "Decoded_output" and "Comparison_result".

Encoding:

Pressing 1 will ask you which carrier image you want to use, remember to enter full name of any of the file.

lenna.png
pepper.png
babylon.png

You can also use any image you want as carrier, but make sure to add them inside the folder named "Original_image"

Now this will ask you to enter the text which you want to hide inside that image. Then it will encode your text in the image and save it inside the folder named "Encoded_image".

Decoding:

Pressing 2 will create decoded text file from the image in the folder named "Decoded_output" which contains the text you entered earlier.

Comparison:

Pressing 3 will create a spreadsheet file with the details of MSE (Mean Square Error) and PSNR (Peak Signal to Noise Ratio) in the folder named "Comparison_result".

Now let's see what changed visually:

Lenna:

Here is the comparison:

Pepper:

Here is the comparison:

Babylon:

Here is the comparison:

Known issues:

DCT:
  You can see blue tint on the DCT encoded images.
  This code is now working on the blue channel of the images.
  If I specify any other RGB channel, like red or green, It gets tinted with that exact channel colour.
DWT:
  DWT doesn't work in this code for now.

To-do:

Add implementation of DWT in this program.

imagesteganography's People

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.