Watershed using c# or c++

时光总嘲笑我的痴心妄想 提交于 2019-12-23 20:56:27

问题


I am trying to convert the Matlab function watershed into C# or C++.

I tried to use this code but CvFindContours returns NULL with this image.

I also tried to use this implementation but I had issues with FilterGrayToGray.

Does anyone knows how I can solve my problems or how I can calculate watershed on my image? Can someone explain me more precisely meyers flood algorithm for watershed?


回答1:


Have you looked at the watershed algorithm provided by OpenCV? Also, here is an example of how to use watershed with OpenCV. Hope that is helpful to you!




回答2:


Although I think the solution given (OpenCV like) is good, you could also search for a different implementation of watershed. Search for Luc Vincent and Pierre Soille "Watersheds in Digital spaces: an efficient algorithm based on immersion simulations".



来源:https://stackoverflow.com/questions/8189891/watershed-using-c-sharp-or-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!