- Notifications
You must be signed in to change notification settings - Fork0
Abstract representation of data for machine vision
License
ps-nithin/pyrebel
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A pure python library that implements abstraction of data.
python3 -m pip install --upgrade pyrebel
git clone https://github.com/ps-nithin/pyrebel
cd pyrebel
python3 -m pip install .
Demo programs are found in 'demo/' directory.cd demo/
Usage:python3 pyrebel_main.py --input <filename.png>
Optional arguments--abs_threshold <value>
Selects the threshold of abstraction. (Defaults to 5)
For example,python3 pyrebel_main.py --input images/abc.png --abs_threshold 10
The output is written to 'output.png'
This is a demo of edge detection achieved using data abstraction.
Usage:python3 pyrebel_main_edge.py --input <filename>
For example,python3 pyrebel_main_edge.py --input images/wildlife.jpg
The output is written to 'output.png'.Below is a sample input image,
Below is the output image,
This is a demo of 2D sketch formation using data abstraction.
Usage:python3 pyrebel_main_vision.py --input <filename>
Optional arguments for tweaking the result,
--edge_threshold <value>
Selects the threshold of edge detection.(Defaults to 5)--abs_threshold <value>
Selects the threshold of output abstraction. (Defaults to 10)--bound_threshold <value>
Selects the threshold of boundary size. (Defaults to 100)
For example,python3 pyrebel_main_vision.py --input images/lotus.jpg
Below is a sample input image,
Below is the output image,
This is a demo of pattern recognition achieved using data abstraction.
- Learning
Usage:python3 pyrebel_main_learn.py --learn /path/to/image/directory/
For example runningpython3 pyrebel_main_learn.py --learn images/train-hand/
learns all the images in the directory and links the filename with the signatures. - Recognition
Usage:python3 pyrebel_main_learn.py --recognize <filename>
For example runningpython3 pyrebel_main_learn.py --recognize images/recognize.png
displays the symbols recognized in the file 'images/recognize.png'.
To reset the knowledge base just delete file 'know_base.pkl' in the current working directory.The program expects a single pattern in the input image. Otherwise, a pattern has to be selected by changing variable 'blob_index' accordingly.