It will create an approximation of a picture/file by a set of superimposed or imposed circles.
There are multiple algorithms implemented and some benchmark tools.
Steps to run our code:
Change directory to our pix2circ directory and build it by using make:
cd pix2circ/
make
We have 3 working algorithms you can choose from. We have assigned numbers to chose which algorithm you want to use. We have prepared two binary images, the batman logo and the kfc logo, converted them into 0's and 1's and exported them to a .txt file. Namely batman.txt and kfc.txt, the batman logo is a bit small, the results are shown better with the kfc image.
Bogo place :1
Directed random place :2
Bogo feedback :3
The different algorithms work in different ways, for Bogo place and the placeholder name algorithms, you have to assign how many circles you want to run with. For the modified bogo place, you assign the accuracy that you want it to run with, with a number between 1-99, the higher the number, the better accuracy you will get. After you have run the program, it will generate a .png image in the pix2circ folder.
Example for running Bogo place:
./pix2circ kfc.txt 1 500
This will run the bogo place algorithm, on the kfc image, with 500 circles.
Example for running Directed random place:
./pix2circ batman.txt 2 1000
This will run the directed random place algorithm, on the batman logo, with 1000 circles.
Example for running Bogo feedback:
./pix2circ kfc.txt 3 99
This will run the bogo feedback algorithm, on the kfc image, with 99% accuracy.
Documentation and dependencies
The work is documented using Sphinx, it is required that Sphinx is set up to view the documentation. This was taught to us in a previous INF course, namely INF200 as a valid way of providing documentation.
Setting up Sphinx
for Linux users, you can install it by writing the following command in the terminal:
apt-get install python3-sphinx
For more information regarding sphinx or if you use other distributions, please read the installation guide underneath: https://www.sphinx-doc.org/en/master/usage/installation.html
Setting up Read the docs theme The built-in themes didn't do it for us, so we need to install "Read the docs" sphinx theme. this can be done by typing in 1 out of these 2 options in the terminal:
pip install sphinx_rtd_theme
OR
pip3 install sphinx sphinx_rtd_theme
For more information regarding this theme, or using other distributions: https://sphinx-rtd-theme.readthedocs.io/en/stable/installing.html
IF by any chance you as the viewer do not wish to install this theme, and not view it in its best form, you have to open the conf.py file, and change line number 39 from:
html_theme = 'sphinx_rtd_theme'
TO
html_theme = 'sphinxdoc'
When these steps are done, change directory to the docs directory and build the documentation, followed by changing directory to html via the _build directory and open the index.html file.
cd docs/
make html
cd _build/html
As an alternative we have added a PDF file aswell that can be viewed, however, we must add this does not reflect the documentation in its best form as it is an autogenerated file by the help of make latexpdf. This should be considered a last resort alternative as for viewing goes.
pix2circ's People
pix2circ's Issues
Documentation finalized
Need to polish documentation, aswell as updating the images if there is more added to the actual scripts
Update documentation
Add the latest documentation to the documentation library.
Files to be documented:
- Image.h
- Imageconverter.h
Memory safety
-Add use of vectors (dynamic memory allocating)
-Add use of shared pointer (dynamic deletion of objects)
Slice image
Slice the new generated image, by dimensions.
Bonus algorithms
-A different version of bogo modded.
Visualize the circles
Implement the given code for visualizing the circles in a popup window.
Benchmark
Add a feature to compare and benchmark the newly generated image to the original image.
Should output different values to tell how well the image is, compared to the original image.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.