watershed-segmentation | Implementation of Watershed segmentation in Python | Machine Learning library
kandi X-RAY | watershed-segmentation Summary
kandi X-RAY | watershed-segmentation Summary
Implementation of Watershed segmentation in Python
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Performs watershed segmentation on an image
- Calculate the neighbourhood of a given region
watershed-segmentation Key Features
watershed-segmentation Examples and Code Snippets
Community Discussions
Trending Discussions on watershed-segmentation
QUESTION
I'm using the function regionprops to detect the number of trees on a image taked by drone.
First I removed the ground using Blue NDVI:
Then I used the function regionprops to detect the number of trees on image:
But there are a problem on region 15, because all trees on that region are connected and it detects as one tree. I tried to separate the trees on that region using Watershed Segmentation, but its not working:
Am I doing this the wrong way? Is there a better method to separate the trees?
If anyone can help me with this problem I will appreciate. Here is the region 15 without the ground:
...ANSWER
Answered 2017-Mar-01 at 09:10You could try out a marker-based watershed. Vanilla watershed transforms never work out of the box in my experience. One way to perform one would be to first create a distance map of the segmented area by using imdist(). Then you could suppress local maxima by calling imhmax(). Then calling watershed() will usually perform noticeably better.
Here's a sample script on how to do it:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install watershed-segmentation
You can use watershed-segmentation like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page