From a1b81722c431c23f5d8c57743542df56bc5cabea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rostislav=20L=C3=A1n?= Date: Fri, 28 Apr 2023 20:04:27 +0200 Subject: [PATCH] Updated README and user manual. --- README.md | 14 ++++++++++--- doc/manual/manual.html | 13 +++++++----- doc/manual/manual.md | 46 +++++++++++++++++++++++++++++------------- 3 files changed, 51 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 528f72e..0cae173 100644 --- a/README.md +++ b/README.md @@ -274,16 +274,24 @@ Optional parameters are height of the papilar lines and base thickness. # Mapping to existing finger model -This section will be added later, (if implemented) mapping of fingerprint to a given finger model. +Using `m` mode modifies the preexisting finger model to contain fingerprint. +First optional parameter is papilar line height `height_line`, second is the number of iterations `iter` to make the finger mesh denser. Higher number of itertions results in denser finger mesh and better result. +The last three parameters are axis offsets for the finger, `finger_x`, `finger_y`, `finger_z`. +These control the location of the finger. They need to be set only if the user wants to move core of the print closer to the center of the finger. * General command form for mapped stl generation ```sh - python3 src/main.py input_file output_file dpi --config config_file preset --stl m height_line height_base finger_file + python3 src/main.py input_file output_file dpi --config config_file preset --stl m height_line iter finger_x finger_y finger_z ``` +* Working example of finger mapping + ```sh + python3 src/main.py res/examples/Palec_P4.tif res/examples/Palec_P4.png 600 --config conf/conf.json ridge --stl m 0.2 2 0 0 0 + ``` + # Usage -usage: main.py [-h] [-m | --mirror | --no-mirror] input_file output_file dpi ([-c | --config config_file preset] | [filters ...]) [-s | --stl_file p height_line height_base | --stl_file c height_line height_base curv_rate_x curv_rate_y | --stl_file m height_line height_base finger_file] +usage: main.py [-h] [-m | --mirror | --no-mirror] input_file output_file dpi ([-c | --config config_file preset] | [filters ...]) [-s | --stl_file p height_line height_base | --stl_file c height_line height_base curv_rate_x curv_rate_y | --stl m height_line iter finger_x finger_y finger_z] [-d | --database database_filename] Program for processing a 2D image into 3D fingerprint. diff --git a/doc/manual/manual.html b/doc/manual/manual.html index 478b6c4..32e1af0 100644 --- a/doc/manual/manual.html +++ b/doc/manual/manual.html @@ -219,10 +219,12 @@ Woking example
python3 src/main.py res/examples/Palec_P4.tif res/examples/Palec_P4_from_preset.png 600 --config config/config.json git_example --stl p 2 10

Mapping to existing finger model

-

This section will be added later, (if implemented) mapping of fingerprint to a given finger model.

+

Using m mode modifies the preexisting finger model to contain fingerprint. First optional parameter is papilar line height height_line, second is the number of iterations iter to make the finger mesh denser. Higher number of itertions results in denser finger mesh and better result. The last three parameters are axis offsets for the finger, finger_x, finger_y, finger_z. These control the location of the finger. They need to be set only if the user wants to move core of the print closer to the center of the finger.

Usage

When in doubt, you can always check the help with:

@@ -231,8 +233,9 @@ Woking example
usage: main.py [-h] [-m | --mirror | --no-mirror] input_file 
 output_file dpi ([-c | --config config_file preset] | 
 [filters ...]) [-s | --stl_file p height_line height_base | 
---stl_file c height_line height_base curv_rate_x curv_rate_y |
- --stl_file m height_line height_base finger_file]
+--stl_file c height_line height_base curv_rate_x curv_rate_y | 
+--stl m height_line iter finger_x finger_y finger_z] 
+[-d | --database database_filename]
 
 Program for processing a 2D image into 3D fingerprint.
 
diff --git a/doc/manual/manual.md b/doc/manual/manual.md
index 4c8e554..ba79d1f 100644
--- a/doc/manual/manual.md
+++ b/doc/manual/manual.md
@@ -311,12 +311,21 @@ Optional parameters are height of the papilar lines and base thickness.
 
 ## Mapping to existing finger model
 
-This section will be added later, (if implemented) mapping of fingerprint to a given finger model.
+Using `m` mode modifies the preexisting finger model to contain fingerprint.
+First optional parameter is papilar line height `height_line`, second is the number of iterations `iter` to make the finger mesh denser. Higher number of itertions results in denser finger mesh and better result.
+The last three parameters are axis offsets for the finger, `finger_x`, `finger_y`, `finger_z`.
+These control the location of the finger. They need to be set only if the user wants to move core of the print closer to the center of the finger.
 
-* General command form for mapped stl generation:
+* General command form for mapped stl generation
 
     ```
-    python3 src/main.py input_file output_file dpi --config config_file preset --stl m height_line height_base finger_file
+    python3 src/main.py input_file output_file dpi --config config_file preset --stl m height_line iter finger_x finger_y finger_z
+    ```
+
+* Working example of finger mapping
+
+    ```
+    python3 src/main.py res/examples/Palec_P4.tif res/examples/Palec_P4.png 600 --config conf/conf.json ridge --stl m 0.2 2 0 0 0
     ```
 
 # Usage
@@ -331,8 +340,9 @@ Which will print out the following message.
 usage: main.py [-h] [-m | --mirror | --no-mirror] input_file 
 output_file dpi ([-c | --config config_file preset] | 
 [filters ...]) [-s | --stl_file p height_line height_base | 
---stl_file c height_line height_base curv_rate_x curv_rate_y |
- --stl_file m height_line height_base finger_file]
+--stl_file c height_line height_base curv_rate_x curv_rate_y | 
+--stl m height_line iter finger_x finger_y finger_z] 
+[-d | --database database_filename]
 
 Program for processing a 2D image into 3D fingerprint.
 
@@ -366,7 +376,7 @@ options:
     
     
         
-              
+            
                 main.py: error: the following arguments are required: input_file, output_file, dpi, filters
             
             
@@ -374,7 +384,7 @@ options:
             
         
         
-              
+            
                 ERROR: Input file res/Palec_P14.tif does not exist
             
             
@@ -382,7 +392,7 @@ options:
             
         
         
-              
+            
                 ERROR: Config file not found
             
             
@@ -390,7 +400,7 @@ options:
             
         
         
-              
+            
                 ERROR: Preset not found in config file
             
             
@@ -398,7 +408,7 @@ options:
             
         
         
-              
+            
                 ERROR: Filter undefined_filter not found
             
             
@@ -406,7 +416,7 @@ options:
             
         
         
-              
+            
                 ERROR: Unrecognized generation mode
             
             
@@ -414,7 +424,7 @@ options:
             
         
         
-              
+            
                 ERROR: Line depth must be less than plate thickness
             
             
@@ -422,7 +432,7 @@ options:
             
         
         
-              
+            
                 ERROR: Depth of plate height must be positive
             
             
@@ -430,12 +440,20 @@ options:
             
         
         
-              
+            
                 ERROR: Base and line height must both be positive
             
             
                 In curved generation any negative argument is an error, casts are only for planar mode.
             
         
+        
+            
+                ERROR: Fingerprint image is outside of the finger model
+            
+            
+                Outside of range of the finger, fingerprint cannot be mapped to nothing. Try to change finger_x, finger_y and finger_z parameters.
+            
+        
     
 
\ No newline at end of file