Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inv_dist value for .by_teasar() #42

Open
koenterheegde0507 opened this issue Mar 14, 2024 · 1 comment
Open

inv_dist value for .by_teasar() #42

koenterheegde0507 opened this issue Mar 14, 2024 · 1 comment

Comments

@koenterheegde0507
Copy link

Hey,

I wanted to try the skeletonize.by_teasar() method but I have no clue what value to put for the inv_dist parameter.
I'm currently using a value of 1 and get the following result, which doesn't seem right:

image

It looks exactly like the surface of my mesh. I used the following code:
`mesh = tm.load_mesh(file_path)
fixed = sk.pre.fix_mesh(mesh, remove_disconnected=5, inplace=False)
skel_teasar = sk.skeletonize.by_teasar(fixed,inv_dist=1)

skel_teasar.show()`

@schlegelp
Copy link
Collaborator

schlegelp commented Mar 15, 2024

Teasar on meshes works by walking from the root vertex to the most distant vertex. It then runs a ball along that path and marks all vertices within inv_dist as visited. Then it draws a path to the most distant of the remaining unvisited vertices and so on. So your inv_dist should be about the width of your branches - i.e. there is no one-size-fits-all as it depends on the scale of your mesh. From the screenshot it looks like inv_dist=1 is much too low.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants