-
Hi! I try to use the CenterlineExtraction class, but I can't make it work. Can you help me with that? My current code is:
However it results in a mesh containing 0 vertices. What am I doing wrong? Thank you for the help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi Unfortunately CenterlineExtraction is for 3D only as stated here: https://fast.eriksmistad.no/classfast_1_1CenterlineExtraction.html You can try the skeletonization instead: https://fast.eriksmistad.no/classfast_1_1Skeletonization.html Here is a working example: import fast
fast.downloadTestDataIfNotExists()
importer = fast.ImageFileImporter.create(fast.Config.getTestDataPath() + 'retina.png')
segment = fast.BinaryThresholding.create(100).connect(importer)
skeletonize = fast.Skeletonization.create().connect(segment)
renderer = fast.SegmentationRenderer.create().connect(skeletonize)
fast.SimpleWindow2D.create().connect(renderer).run() |
Beta Was this translation helpful? Give feedback.
It seems the algorithm encounters an error with speed = 0 (some edge case maybe?).
I removed the check, and then it produces an output after a while: