https://github.com/vadim-geroim/image-blur-2
Build a data transformation on a data representation of an image.
https://github.com/vadim-geroim/image-blur-2
datastructures image-blur rspec ruby
Last synced: 3 months ago
JSON representation
Build a data transformation on a data representation of an image.
- Host: GitHub
- URL: https://github.com/vadim-geroim/image-blur-2
- Owner: vadim-geroim
- Created: 2019-08-17T02:31:32.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-24T04:00:21.000Z (over 5 years ago)
- Last Synced: 2025-01-13T08:12:31.941Z (5 months ago)
- Topics: datastructures, image-blur, rspec, ruby
- Language: Ruby
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image-Blur-2
Solution and Tests to the Columbia University Image #2 problem.## Project structure
- `lib/image.rb` - contains solution
- `spec/image_spec.rb` - includes three different examples## Solution
- the method `blank_matrix` - gets as a parameter matrix and
converts it to the matrix with the same dimention but with
only zero values in it.
- the method `blur` - iterates through the matrix specified in a
class constructor and if met ones it will replaces values in the
matrix called `transformed_matrix` which is used as a result of the
program. This method returns `transformed_matrix` as a result.
- the method `output_image` - converts matrix to string and prints it
in a console## Test execution
- Run `bundle install`
- Open terminal window
- From the project directory run `rspec`