Project

image_svd

0.0
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Break down images into their singular value decomposition.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
~> 0.9
~> 10.3
~> 2.14

Runtime

~> 0.3
~> 2.0
 Project Readme

Gem Version Stories in Ready

image_svd

A utility to compress images, with interesting Richter-esque blur effects at high compression.

woman with umbrella almost

The above image (source) was chosen for its resemblance to Woman with Umbrella

Installation

Add this line to your application's Gemfile:

gem 'image_svd'

And then execute:

$ bundle

Or install it yourself as:

$ gem install image_svd

Usage

image_svd --help

A prerequisite is to have imagemagick, and a ruby version 1.9.2 or greater installed.

image_svd -i ~/Downloads/svd_photos/in_RichterfuneralM.jpg -n 10

will create a new image in the current directory using 10 singular values.

Be warned! Compression is by no means quick! A 200x300 image takes 15 seconds on my computer. Finding the eigenvalues of a matrix is no easy computational task (O(n!) by brute force, O(n2.3) by super fancy approximation).

You may also specify a (ruby-style inclusive) range of singular values to output images with, ex:

image_svd -i ~/Downloads/svd_photos/in_RichterfuneralM.jpg -n 1..10

This will lead to 10 images being output, and it is 10 times faster than calling the command 10 times since the most costly step (finding eigenvalues) is only done once.

Contributing

  1. Fork it ( http://github.com//image_svd/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request