| image = | cleanSkeleton2dImg (inBinImg) |
Clean the input skeleton image to keep only the longest branch.
This algorithm remove all secondary branches of a skeleton in order to keep only the longest branch.
Here is an example of result of cleaned skeleton :
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho
Code Example
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
outImg = advmorpho.cleanSkeleton2dImg(inImg)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLAdvancedMorphology/Processor/CleanSkeleton2dImg/CleanSkeleton2dImg.h>
Code Example
ImagePtr pOutImg = cleanSkeleton2dImg(pInSkelImg);