-
Notifications
You must be signed in to change notification settings - Fork 26
Installation and usage
Robert edited this page Jul 13, 2019
·
2 revisions
Following tools needs to be installed:
- Python 3.x
- pillow (Python image library)
- numpy (Python numeric operation library).
On Ubuntu for Windows it can be done this way:
apt install python3-pip
pip3 install pillow
pip3 install numpy
Configurable parameters are stored in srconfig.py file.
Run:
python3 automate.py (filename of image in ./samples directory)
Example
python3 automate.py circuit.tif
This will create low resolution samples in ./input directory and then perform high resolution restoration based on them.
Example of output:
Testing algorithm for circuit.tif, iterations: 5, scaling factor: 2.000000
Creating Camera Model
Samples created cuccesfully, restoring (this might take time)
Estimate Motion Between Sample And Original Image
S_0_0.tif
S_0_1.tif
S_0_1.tif: (0, 1)
S_0_2.tif
S_0_2.tif: (0, 3)
S_1_0.tif
S_1_0.tif: (1, 0)
S_1_1.tif
S_1_1.tif: (1, 1)
S_1_2.tif
S_1_2.tif: (1, 3)
S_2_0.tif
S_2_0.tif: (2, 0)
S_2_1.tif
S_2_1.tif: (2, 1)
S_2_2.tif
S_2_2.tif: (2, 2)
samples loaded
Creating Camera Model
Size Of Estimated Original: 84x104
0: estimation error: 90.053265
1: estimation error: 67.434944
2: estimation error: 52.375802
3: estimation error: 40.919872
4: estimation error: 32.288271
Total elapsed time: 0.27477276722590127 mins
Note that errors of estimation decreases with each iteration. Output image is in ./samples named super_resolution.tif