OpenCV中findcounter函数所用的算法来源于论文Topological structural analysis of digitized binary images by border following。
百度文库中可以下载https://wenku.baidu.com/view/6cb52ede360cba1aa811dad5.html。
算法主要流程:
参考:https://blog.csdn.net/zuange2417/article/details/80461663;
https://blog.csdn.net/helei001/article/details/23602449。感谢作者。