DWB1962/svd_codes
0
The model:
- Reshape the RGB image (rows, columns, channels), where channels == 3, as a pixels matrix of (channels, rows*columns) (see function get_pixels at svdcodes.py)
- Evaluate the singular values decomposition (u, s, v matrices and mu vector)of the pixels matrix (see function gettransformeddata at svdcodes.py)
- Get the code for each pixel using v and a parameter alpha (number of divisions), such that 2 <= alpha.
- Note that the maximun code is (alphaalpha + alpha + 1) (alpha - 1), and the minimum code is 0.
- It is possible to generate several outputs using these codes: a. histogram of codes b. segment the RGB image (a channel per code) c. compressed image (each segment has only one color)
Some images in google drive
You can download Some images in google drive to be used as examples with the program compress.py (running in your local terminal of choice).
Test compression, local execution
It isn't fair to test execution via the web demo. You must download Some images in google drive, and run compress.py in your machine.
