{"id":19385879,"url":"https://github.com/zhengpeng7/leafveinextraction","last_synced_at":"2025-04-23T22:32:11.905Z","repository":{"id":134376322,"uuid":"133055800","full_name":"ZhengPeng7/LeafVeinExtraction","owner":"ZhengPeng7","description":"To extract leaf veins from scanned leaf groups.","archived":false,"fork":false,"pushed_at":"2018-06-07T12:12:18.000Z","size":7794,"stargazers_count":18,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T21:42:36.820Z","etag":null,"topics":["computer-vision","curvature","edge-detection","extract-leaf-veins","leaf","region-growth","veins"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZhengPeng7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-05-11T15:18:03.000Z","updated_at":"2025-01-06T08:12:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec062a87-02e7-4d8b-bec3-8a6ba4b2838b","html_url":"https://github.com/ZhengPeng7/LeafVeinExtraction","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhengPeng7%2FLeafVeinExtraction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhengPeng7%2FLeafVeinExtraction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhengPeng7%2FLeafVeinExtraction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhengPeng7%2FLeafVeinExtraction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZhengPeng7","download_url":"https://codeload.github.com/ZhengPeng7/LeafVeinExtraction/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250527181,"owners_count":21445319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","curvature","edge-detection","extract-leaf-veins","leaf","region-growth","veins"],"created_at":"2024-11-10T10:03:31.412Z","updated_at":"2025-04-23T22:32:08.473Z","avatar_url":"https://github.com/ZhengPeng7.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LeafVeinExtraction\r\n\u003e  To extract leaf veins from scanned leaf groups and save some valuable data, like curvatures.\r\n\u003e\r\n\u003e  Done:\r\n\u003e\r\n\u003e  1. Use K-means to get the **order** of each leaf in current group, then use Radon Transformation to **straighten** the leaf images.\r\n\u003e  2. Use an improved dynamic Canny + Region Growth with two direction to **extract leaf vein** from the scanned leaf groups.\r\n\u003e  3. Use DFT(Discrete Fourier Transformation) to evaluate the **curvatures** of the discrete vein points.\r\n\u003e  4. Use curve-fitting to calculate the **angles** between the main-vein and sub-veins.\r\n\u003e\r\n\u003e  Author: Peng Zheng.\r\n\r\n\u003e  Project duration: 6/2017~12/2017, while some data formatting jobs still need to be done.\r\n\r\n#### Required_packages:\r\n\r\n+ numpy\r\n+ scipy\r\n+ opencv-python\r\n+ scikit-image\r\n+ scikit-learn\r\n+ matplotlib\r\n+ xlsxwriter\r\n\r\n## Essential methods:\r\n\r\n1. Preprocessing:\r\n   1. Radon transformation.\r\n   2. FloodFill.\r\n   3. K-means\r\n2. Extraction:\r\n   1. Improved Canny.\r\n   2. Region growth.\r\n3. Data formatting:\r\n   1. Discrete Fourier Transformation.\r\n   2. Skeletonization.\r\n   3. Curve fitting.\r\n\r\n### Usage:\r\n\r\n1. Put the scanned leaf group image in the \"split_before\" folder.\r\n2. `python main.py`.\r\n\r\n### Result:\r\n\r\n![cannied_edges](./images/Cannied_Edges.jpg)\r\n\r\n![veins](./images/Veins.jpg)\r\n\r\n![main_veins](./images/Main_Veins.jpg)\r\n\r\n![color_veins_with_angles](./images/Colored_Veins.jpg)\r\n\r\n![find_tops_bottoms](./images/Leaves_with_tops_and_bottoms.jpg)\r\n\r\n## TODO:\r\n\r\n- Use superpixel to adapt canny theshold locally.\r\n\r\n- Upgrade Region Growth with Kalman Filter.\r\n\r\n\u003e If you've ever met any confusion or bug in related algorithms or code, please be not mean about your issue:)\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhengpeng7%2Fleafveinextraction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhengpeng7%2Fleafveinextraction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhengpeng7%2Fleafveinextraction/lists"}