Name | imagecompress-svd JSON |
Version |
0.1.2
JSON |
| download |
home_page | None |
Summary | A Python package for image compression using Singular Value Decomposition (SVD). |
upload_time | 2024-09-25 08:15:09 |
maintainer | None |
docs_url | None |
author | Katie Wen-Ling Kuo |
requires_python | >=3.6 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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:
```bash
pip install .
```
## Usage
```python
from imagecompress_svd import rgb2gray, plot_compressed_images
from PIL import Image
import numpy as np
# Load image and convert to grayscale
image = Image.open('your_image.jpg')
gray_image = rgb2gray(np.array(image))
# Define different k values for compression
k_values = [1, 2, 5, 10, 20, 50]
# Plot compressed images
plot_compressed_images(gray_image, k_values)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "imagecompress-svd",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Katie Wen-Ling Kuo",
"author_email": "katie20030705@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a6/55/31b6cc1952698cf547c16a5c8905ddb38240159f2d8c11a1aabbae0e0945/imagecompress_svd-0.1.2.tar.gz",
"platform": null,
"description": "# Image Compression\r\n\r\n## Overview\r\n`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.\r\n\r\n## Features\r\n- Convert RGB images to grayscale.\r\n- Compress images using SVD with adjustable singular values.\r\n- Visualize the compressed images for different levels of compression.\r\n\r\n## Installation\r\n\r\nTo install the package, first clone the repository or download the code, then navigate to the package directory and run:\r\n\r\n```bash\r\npip install .\r\n```\r\n\r\n## Usage\r\n```python\r\nfrom imagecompress_svd import rgb2gray, plot_compressed_images\r\nfrom PIL import Image\r\nimport numpy as np\r\n\r\n# Load image and convert to grayscale\r\nimage = Image.open('your_image.jpg')\r\ngray_image = rgb2gray(np.array(image))\r\n\r\n# Define different k values for compression\r\nk_values = [1, 2, 5, 10, 20, 50]\r\n\r\n# Plot compressed images\r\nplot_compressed_images(gray_image, k_values)\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python package for image compression using Singular Value Decomposition (SVD).",
"version": "0.1.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "20967f7d06d1cac2c98ac285653b0ff51aa177ac644452271758bf9c7c6e26fe",
"md5": "06ccee8dc79ad35ede01350292a8152e",
"sha256": "c19520047a4326468fb9645c6579f94b2b0f1fd47a24f31256b173bd4327812f"
},
"downloads": -1,
"filename": "imagecompress_svd-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "06ccee8dc79ad35ede01350292a8152e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 3732,
"upload_time": "2024-09-25T08:15:08",
"upload_time_iso_8601": "2024-09-25T08:15:08.160054Z",
"url": "https://files.pythonhosted.org/packages/20/96/7f7d06d1cac2c98ac285653b0ff51aa177ac644452271758bf9c7c6e26fe/imagecompress_svd-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a65531b6cc1952698cf547c16a5c8905ddb38240159f2d8c11a1aabbae0e0945",
"md5": "990e1815b05ee8184fd0b2076bc6bb44",
"sha256": "bab8a1e4ca7209f5b9dde0b4ab4fc3b9faa0384803d2f51a814b2b3b2ca94f57"
},
"downloads": -1,
"filename": "imagecompress_svd-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "990e1815b05ee8184fd0b2076bc6bb44",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3255,
"upload_time": "2024-09-25T08:15:09",
"upload_time_iso_8601": "2024-09-25T08:15:09.823494Z",
"url": "https://files.pythonhosted.org/packages/a6/55/31b6cc1952698cf547c16a5c8905ddb38240159f2d8c11a1aabbae0e0945/imagecompress_svd-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-25 08:15:09",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "imagecompress-svd"
}