Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhengpeng7/leafveinextraction
To extract leaf veins from scanned leaf groups.
https://github.com/zhengpeng7/leafveinextraction
computer-vision curvature edge-detection extract-leaf-veins leaf region-growth veins
Last synced: 10 days ago
JSON representation
To extract leaf veins from scanned leaf groups.
- Host: GitHub
- URL: https://github.com/zhengpeng7/leafveinextraction
- Owner: ZhengPeng7
- License: bsd-2-clause
- Created: 2018-05-11T15:18:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-07T12:12:18.000Z (over 6 years ago)
- Last Synced: 2023-10-20T23:59:49.623Z (about 1 year ago)
- Topics: computer-vision, curvature, edge-detection, extract-leaf-veins, leaf, region-growth, veins
- Language: Python
- Size: 7.43 MB
- Stars: 17
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LeafVeinExtraction
> To extract leaf veins from scanned leaf groups and save some valuable data, like curvatures.
>
> Done:
>
> 1. Use K-means to get the **order** of each leaf in current group, then use Radon Transformation to **straighten** the leaf images.
> 2. Use an improved dynamic Canny + Region Growth with two direction to **extract leaf vein** from the scanned leaf groups.
> 3. Use DFT(Discrete Fourier Transformation) to evaluate the **curvatures** of the discrete vein points.
> 4. Use curve-fitting to calculate the **angles** between the main-vein and sub-veins.
>
> Author: Peng Zheng.> Project duration: 6/2017~12/2017, while some data formatting jobs still need to be done.
#### Required_packages:
+ numpy
+ scipy
+ opencv-python
+ scikit-image
+ scikit-learn
+ matplotlib
+ xlsxwriter## Essential methods:
1. Preprocessing:
1. Radon transformation.
2. FloodFill.
3. K-means
2. Extraction:
1. Improved Canny.
2. Region growth.
3. Data formatting:
1. Discrete Fourier Transformation.
2. Skeletonization.
3. Curve fitting.### Usage:
1. Put the scanned leaf group image in the "split_before" folder.
2. `python main.py`.### Result:
![cannied_edges](./images/Cannied_Edges.jpg)
![veins](./images/Veins.jpg)
![main_veins](./images/Main_Veins.jpg)
![color_veins_with_angles](./images/Colored_Veins.jpg)
![find_tops_bottoms](./images/Leaves_with_tops_and_bottoms.jpg)
## TODO:
- Use superpixel to adapt canny theshold locally.
- Upgrade Region Growth with Kalman Filter.
> If you've ever met any confusion or bug in related algorithms or code, please be not mean about your issue:)