Runs lossy image compression on images with choice parameters.
./__main__.py [SOURCE] [ALGORITHM] [MODE] [COMPRESSION] [OVERFLOW] [LOG DATA] [TARGET]
./__main__.py [SOURCE] [ALGORITHM] [MODE] [COMPRESSION] [OVERFLOW] [LOG DATA]
./__main__.py [SOURCE] [ALGORITHM] [MODE] [COMPRESSION] [OVERFLOW]
./__main__.py [SOURCE] [ALGORITHM] [MODE] [COMPRESSION]
./__main__.py [SOURCE]
Note: If arguments incomplete, user will complete parameters through terminal
- Select file from "images" folder with valid extension:
- .jpg
- .jpeg
- .png
- .tif
- pca: Principal Component Analysis
- svd: Singular Value Decomposition
- v: Select a percentage of variance to keep
- c: Select a number of components to keep
- q: Select quality from predefined settings
Note: If using algorithm=svd, only mode=c is valid
Compression | Mode=v | Mode=c | Mode=q |
---|---|---|---|
Type and Range | float between 0 and 100 | int between zero and image height | low, medium, or high |
Valid for | pca | pca, svd | pca |
- 1: True, values of pixels on one or more channels may overflow, resulting in cool noise
- 0: False, prevent cool noise but retain maximum image quality
- Optional
- 1: Log data from algorithm to logs/
- 0: Do not log data from algorithm to logs/
- Optional
- file name: name with valid extension which will be saved to "output" folder
- Optional
./__main__.py tiger.jpg pca 1 95 0 1 tiger_pca_v_95.tif
./__main__.py flower.jpg svd 3 min
./__main__.py knight.png