Closed roymacdonald closed 6 years ago
this looks promising but all those memcpy
s make me nervous. if you can do this with opencv's copy (or ofxCv::copy which wraps it) that would be better.
there's also a lot of room for optimization, but maybe that's a separate PR ;) e.g., see https://sites.google.com/site/rameyarnaud/research/c/voronoi
yes, I don't like all those memcpy too! This is like the straightforwards implementation but certainly there's a lot of room for optimizing. Isn't ofxCv::copy a bit overkill for this situation? which, I'm not sure but I guess, might slow down the algorithm. I'll check the whole thing and look for a good optimization on a few days as right now I cant. Best!
I'm not sure if this is the most efficient way of performing this but it works so far. It is performing several thinning passes until there's nothing more to thin, thus just leaving the skeleton. My guess is that this is the idea instead of just performing a single pass.