Skip to main content

A Python library for higher level python functions used in image analysis and computer vision for steganography

Project description

Steganography Tools

Authors: Sébastien Mascha & Thomas Le Couédic

Installation

pip install steganography-tools

References

Module: Steganography for Image, Sounds, Text

Available formats

  • PNG
  • JPEG

Importation

from steganography_tools import st

Usage

# Encoding
steg = st.LSBSteganography(cv2.imread("image.jpg"))
img_encoded = steg.encode_text("my message")
cv2.imwrite("image_enc.png", img_encoded)
plt.imshow(img_encoded)

# Decoding
im = cv2.imread("image_enc.png")
steg = st.LSBSteganography(im)
print("Text value:",steg.decode_text())

Compare original and encoded images

original = cv2.imread('image.jpg')
lsbEncoded = cv2.imread("image_enc.png")
original = cv2.cvtColor(original, cv2.COLOR_BGR2RGB)
lsb_encoded_img = cv2.cvtColor(lsbEncoded, cv2.COLOR_BGR2RGB)

compare_images = st.Compare(original, lsb_encoded_img)
compare_images.get_results()

Module: Image processing

Importation

from steganography_tools import image_processing as st_processing

Usage

TEST_PHOTO = "image.jpg"

# This function allows us to get the basic information of an image
st_processing.img_information(TEST_PHOTO)

# Check for potential metadata
st_processing.get_metadata(TEST_PHOTO)

# TRANSFORMATION

st_processing.rgb2grayscale(TEST_PHOTO_GRAYSCALE)

TEST_PHOTO = cv2.imread(TEST_PHOTO) 
print("Type: ",type(TEST_PHOTO))
TEST_PHOTO = TEST_PHOTO[:,:,0]

st_processing.plot_histogram(TEST_PHOTO)
st_processing.thresholding(TEST_PHOTO, 55)

# Left to right : grayscale image | contrast increased
st_processing.display_images(TEST_PHOTO)

# Image manipulation and numpy arrays
st_processing.image_manipulation("image_grayscale.jpg")

# Geometrical transformations
st_processing.geo_transfomation(TEST_PHOTO)

# Blurring
st_processing.blurring(TEST_PHOTO)

# Sharpenning
st_processing.sharpenning(TEST_PHOTO)

# Denoising
st_processing.denoising(TEST_PHOTO)

CLI

Command Line Arguments:
 -h, --hide                      To hide data in an image file
 -r, --recover                   To recover data from an image file
 -i, --input TEXT                Path to an bitmap (.bmp or .png) image
 -s, --secret TEXT               Path to a file to hide in the image
 -o, --output TEXT               Path to an output file
 --help                          Show this message and exit.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

steganography_tools-0.1.5.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

steganography_tools-0.1.5-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file steganography_tools-0.1.5.tar.gz.

File metadata

  • Download URL: steganography_tools-0.1.5.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.8.7 Darwin/20.3.0

File hashes

Hashes for steganography_tools-0.1.5.tar.gz
Algorithm Hash digest
SHA256 923cc7c7f31981357f7b68e3ae26ed5529874ecfaa3f9e66d804da744e6552a0
MD5 6cbaf109e49cb493f0caa631429d31c7
BLAKE2b-256 25c0ca38b14a277e6ba1f28ad5f96c83824f3be3cf30dc8ecb48b94a2db938e7

See more details on using hashes here.

File details

Details for the file steganography_tools-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for steganography_tools-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 52116e9233d7ce28021759986ba7f6794214bc78943356e90edd88453a4e2a94
MD5 14e1cffbe4de8b75e2504cd40130382b
BLAKE2b-256 8b4b3e6aa2a3c8471df51d9a17a13392b31d3cafa6335f2966b38ce8cc164b22

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page