Bakalářská práce 2022/2023
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Rostislav Lán 7e45cf4a5b
Added base height param to curved generation, solved naming issue.
2 years ago
config Fixed all stl errors, should now work properly. 2 years ago
res Fixed readme images. 2 years ago
src Added base height param to curved generation, solved naming issue. 2 years ago
.gitignore Updated .gitignore. 2 years ago
README.md Fixed readme images. 2 years ago
requirements.txt Added requirements for venv, removed some includes 2 years ago

README.md

About this Project

This project is being developed as a practical part of bachelor's thesis at Brno Universtiy of Technology - Faculty of Information Studies. It is as of now a work in progress, no results guaranteed.

The topic of this thesis is Generating a 3D Fingerprint Model. This application can be used to apply series of image processing filters to a fingerprint image to make it more suitable for conversion to 3D stl model and printing. It also includes the functionality to use generated image as a height map for generating an stl model. This model can either be planar or curved.

Prerequisites

For now this is only viable for ubuntu gnu/linux machines 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

        apt install python3.10
    
  • python graphical modules

        pip install numpy==1.23.3 matplotlib==3.5.3 opencv-python=4.7.0.72
        stl==0.0.3 scikit-image==0.19.3
    

Installation

Installation is relatively fast and easy.

  1. Clone the repository

        git clone ssh://git@strade.fit.vutbr.cz:3022/xlanro00/BP_DP-xlanro00.git
    
  2. Prepare an image file containing fingerprint

  3. Run the application

Filtering images

Once all the requirements are installed, the program is ready to use. There are two ways to enter filters:

  • manually from command line, list filter names and parameters
        python src/main.py res/test_fp.png res/test_fp_cpy.png 100 denoise_tv_chambolle iterations=1 weight=0.1 median ksize=3
    
  • manually from preset saved in a json config file, that can be used to create new presets
        python src/main.py res/test_fp.png res/test_fp_cpy.png 100 --config config/config.json weak
    

Configuration

There is an option to input the filter series as a preset to json configuration file.

{
    "weak": [
        {
            "name": "denoise_tv_chambolle",
            "weight": 0.01,
            "iterations": 1
        },
        {
            "name": "median",
            "ksize": 3
        },
    ],
    "strong": [
        ...
    ]
    ...
}

All the filters used and their parameters will be described in documentation.

Comparison

Image before processing the fingerprint and after applying a presets.

Before After

Generating curved finger model

It is possible to generate 3D printable stl model using --stl switch, which requires aditional parameter containing stl filename. In base mode the output model will be a curved finger model, with optional parameters following the filename controlling its shape. 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.

  • Example planar stl generation
    python src/main.py res/test_fp.png res/test_fp_mod.png 508 --config config/config.json weak --stl res/test_fp.stl 2 2 4

Generating planar finger model

Using -p switch makes the generated model planar. This is not the main goal of the application. Optional parameters are model base thickness and papilar lines height, they are set after stl file name.

  • Example curved stl generation
    python src/main.py res/test_fp.png res/test_fp_mod.png 508 --config config/config.json weak --stl res/test_fp.stl 10 2 -p

Mapping to existing finger model

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

Roadmap

  • Load and store image
  • Apply basic image processing filters
    • Scale the image using given dpi
  • Create filter library with more filters
    • Add more suitable filters to the library
  • Use presets from config files
    • Add the option to save current filter preset to config file
  • Add the option to modify filter parameters
  • Convert the processed image to stl lithophane
  • Add the option to curve the lithophane into the shape of a finger
  • Add the option to map the lithophane on a given finger model
  • Export final model ready for 3D print

Author

Rostislav Lán - xlanro00@stud.fit.vutbr.cz

Supervisor

Ing. Petr Malaník

Project Link: https://strade.fit.vutbr.cz/git/xlanro00/BP_DP-xlanro00