|
|
@ -15,57 +15,61 @@ Before cloning repository, you need these to succesfully use the application.
|
|
|
|
* python version 3.10 is a requirement might work on earlier python 3 versions
|
|
|
|
* python version 3.10 is a requirement might work on earlier python 3 versions
|
|
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
```sh
|
|
|
|
sudo apt install python3.10
|
|
|
|
sudo apt install python3.10
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
* virtualenv for virtual enviroment creation
|
|
|
|
* virtualenv for virtual enviroment creation
|
|
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
```sh
|
|
|
|
pip install virtualenv
|
|
|
|
pip install virtualenv
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
# Installation
|
|
|
|
# Installation
|
|
|
|
|
|
|
|
|
|
|
|
1. Go to a suitable installation folder, for example Documents.
|
|
|
|
1. Go to a suitable installation folder, for example Documents.
|
|
|
|
```sh
|
|
|
|
```sh
|
|
|
|
cd /home/username/Documents
|
|
|
|
cd /home/username/Documents
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
2. Clone the repository to a suitable directory, for example
|
|
|
|
2. Clone the repository to a suitable directory, for example
|
|
|
|
```sh
|
|
|
|
```sh
|
|
|
|
git clone ssh://git@strade.fit.vutbr.cz:3022/xlanro00/BP_DP-xlanro00.git
|
|
|
|
git clone ssh://git@strade.fit.vutbr.cz:3022/xlanro00/BP_DP-xlanro00.git
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
3. Go inside cloned directory
|
|
|
|
3. Go inside cloned directory
|
|
|
|
```sh
|
|
|
|
```sh
|
|
|
|
cd BP_DP-xlanro00
|
|
|
|
cd BP_DP-xlanro00
|
|
|
|
```
|
|
|
|
```
|
|
|
|
v
|
|
|
|
|
|
|
|
4. Create and enter the virtual enviroment.
|
|
|
|
4. Create and enter the virtual enviroment.
|
|
|
|
```sh
|
|
|
|
```sh
|
|
|
|
virtualenv .venv && source .venv/bin/activate
|
|
|
|
virtualenv .venv && source .venv/bin/activate
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
5. Install required python modules from requirements.txt.
|
|
|
|
5. Install required python modules from requirements.txt.
|
|
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
```sh
|
|
|
|
pip install -r requirements.txt
|
|
|
|
pip install -r requirements.txt
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
6. Run the application, as an example there is a file in res/examples called Palec_P4.tif. This is shown in the section below.
|
|
|
|
6. Run the application, as an example there is a file in res/examples called Palec_P4.tif. This is shown in the section below.
|
|
|
|
|
|
|
|
|
|
|
|
# Filtering images
|
|
|
|
# Filtering images
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* You will need to enter the virtual enviroment every time you want to use the application.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
|
|
|
source .venv/bin/activate
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Once all the requirements are installed, the program is ready to use. There are two ways to enter the filters:
|
|
|
|
Once all the requirements are installed, the program is ready to use. There are two ways to enter the filters:
|
|
|
|
|
|
|
|
|
|
|
|
1. manually list filter names and parameters from command line
|
|
|
|
1. manually list filter names and parameters from command line
|
|
|
|
```sh
|
|
|
|
```sh
|
|
|
|
python3 src/main.py res/examples/Palec_P4.tif res/examples/Palec_P4.png 600 denoise_tv_chambolle iterations=1 weight=0.2 median ksize=5
|
|
|
|
python3 src/main.py res/examples/Palec_P4.tif res/examples/Palec_P4.png 600 denoise_tv_chambolle iterations=1 weight=0.2 median ksize=5
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
2. from preset saved in a json config file, that can be used to tune and modify existing presetrs, or create new ones
|
|
|
|
2. from preset saved in a json config file, that can be used to tune and modify existing presetrs, or create new ones
|
|
|
|
```sh
|
|
|
|
```sh
|
|
|
|
python3 src/main.py res/examples/Palec_P4.tif res/examples/Palec_P4_from_preset.png 600 --config config/config.json git_example
|
|
|
|
python3 src/main.py res/examples/Palec_P4.tif res/examples/Palec_P4_from_preset.png 600 --config config/config.json git_example
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
# Configuration and presets
|
|
|
|
# Configuration and presets
|
|
|
@ -181,14 +185,14 @@ In base mode the output model will be a curved finger model, with optional param
|
|
|
|
First optional parameter is papilar line height, second rate of curvature along x axis and the third is the rate of curvature along y axis.
|
|
|
|
First optional parameter is papilar line height, second rate of curvature along x axis and the third is the rate of curvature along y axis.
|
|
|
|
|
|
|
|
|
|
|
|
* General form for curved stl generation
|
|
|
|
* General form for curved stl generation
|
|
|
|
```sh
|
|
|
|
```sh
|
|
|
|
python3 src/main.py input_file output_file dpi --config config_file preset --stl height_line height_base curvature_x curvature_y
|
|
|
|
python3 src/main.py input_file output_file dpi --config config_file preset --stl height_line height_base curvature_x curvature_y
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
* Working example curved stl generation
|
|
|
|
* Working example curved stl generation
|
|
|
|
```sh
|
|
|
|
```sh
|
|
|
|
python3 src/main.py res/examples/Palec_P4.tif res/examples/Palec_P4_from_preset.png 600 --config config/config.json git_example --stl 2 10 2 2
|
|
|
|
python3 src/main.py res/examples/Palec_P4.tif res/examples/Palec_P4_from_preset.png 600 --config config/config.json git_example --stl 2 10 2 2
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
# Generating planar finger model
|
|
|
|
# Generating planar finger model
|
|
|
|
|
|
|
|
|
|
|
@ -196,14 +200,14 @@ Using `-p` switch makes the generated model planar.
|
|
|
|
Optional parameters are model base thickness and papilar lines height, they are set after stl file name.
|
|
|
|
Optional parameters are model base thickness and papilar lines height, they are set after stl file name.
|
|
|
|
|
|
|
|
|
|
|
|
* General form for planar stl generation
|
|
|
|
* General form for planar stl generation
|
|
|
|
```sh
|
|
|
|
```sh
|
|
|
|
python3 src/main.py input_file output_file dpi --config config_file preset --stl height_line height_base -p
|
|
|
|
python3 src/main.py input_file output_file dpi --config config_file preset --stl height_line height_base -p
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
* Working example planar stl generation
|
|
|
|
* Working example planar stl generation
|
|
|
|
```sh
|
|
|
|
```sh
|
|
|
|
python3 src/main.py res/examples/Palec_P4.tif res/examples/Palec_P4_from_preset.png 600 --config config/config.json git_example --stl 2 10 -p
|
|
|
|
python3 src/main.py res/examples/Palec_P4.tif res/examples/Palec_P4_from_preset.png 600 --config config/config.json git_example --stl 2 10 -p
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
# Mapping to existing finger model
|
|
|
|
# Mapping to existing finger model
|
|
|
|
|
|
|
|
|
|
|
|