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

SF feature request #77 - more efficient single pass algorithm for ccNcompt #326

Open
mohawk2 opened this issue Jul 30, 2021 · 0 comments
Open

Comments

@mohawk2
Copy link
Member

mohawk2 commented Jul 30, 2021

https://sourceforge.net/p/pdl/feature-requests/77/

ccNcompt currently uses a 2-pass algorithm, but there is a more efficient single pass algorithm described in "A linear-time component-labeling algorithm using contour tracing technique" (2004):
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.95.6330

And here is an implementation in C: http://www.codeproject.com/Tips/407172/Connected-Component-Labeling-and-Vectorization

There's also pseudocode in the wikipedia article: https://en.wikipedia.org/wiki/Connected-component_labeling#Pseudocode_for_the_one-component-at-a-time_algorithm

Karl adds:

That's fine to add a new one pass algorithm but please give it a new function name! (The old one has stood the test of time.)

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

1 participant