Skip to main content

A Python package for image compression using Singular Value Decomposition (SVD).

Project description

Image Compression

Overview

imagecompress_svd is a Python package that compresses images using Singular Value Decomposition (SVD). It provides functions to convert RGB images to grayscale, compress images by retaining a specified number of singular values, and visualize the compressed images.

Features

  • Convert RGB images to grayscale.
  • Compress images using SVD with adjustable singular values.
  • Visualize the compressed images for different levels of compression.

Installation

To install the package, first clone the repository or download the code, then navigate to the package directory and run:

pip install .

Usage

from image_compressor import load_image, plot_compressed_images

# Load an image and convert to grayscale
gray_image = load_image('path_to_your_image.jpg')

# Define the number of singular values to retain
k_values = [1, 5, 10, 20, 50]

# Visualize the compressed images
plot_compressed_images(gray_image, k_values)

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

imagecompress_svd-0.1.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

imagecompress_svd-0.1.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file imagecompress_svd-0.1.1.tar.gz.

File metadata

  • Download URL: imagecompress_svd-0.1.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for imagecompress_svd-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6f1efcf18c99228e86b72dfff47c6ee09d75b603aef97d0b8fede323033eb9f1
MD5 2cf058fcb1942f6088e6458309e9f129
BLAKE2b-256 cc06576d50bd27f099a8571ac7ddce13f857678d511c51ad94e7f2bec8c84e62

See more details on using hashes here.

File details

Details for the file imagecompress_svd-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for imagecompress_svd-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18b6730e3d73239fb78f49d23ce358b653d5ddb341de4d4c1d3e19a211a99c5d
MD5 0058a942245e3f282cf76e9770328719
BLAKE2b-256 c0b289c669704ee2379dedbea6083d79cb807c205776b4bc6a4f59efaa2ee4ac

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