diff --git a/README.md b/README.md index 97cdc4d..ccacd17 100644 --- a/README.md +++ b/README.md @@ -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 ```sh - sudo apt install python3.10 + sudo apt install python3.10 ``` * virtualenv for virtual enviroment creation ```sh - pip install virtualenv + pip install virtualenv ``` # Installation 1. Go to a suitable installation folder, for example Documents. ```sh - cd /home/username/Documents + cd /home/username/Documents ``` 2. Clone the repository to a suitable directory, for example ```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 ```sh - cd BP_DP-xlanro00 + cd BP_DP-xlanro00 ``` -v + 4. Create and enter the virtual enviroment. ```sh - virtualenv .venv && source .venv/bin/activate + virtualenv .venv && source .venv/bin/activate ``` 5. Install required python modules from requirements.txt. - ```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. # 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: 1. manually list filter names and parameters from command line ```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 ```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 @@ -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. * 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 -``` + ``` * 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 -``` + ``` # 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. * 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 -``` + ``` * 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 -``` + ``` # Mapping to existing finger model