kylemcdonald / ofxCv

Alternative approach to interfacing with OpenCv from openFrameworks.
Other
657 stars 276 forks source link

Corrected algorithm of ofxCv::thin() #184

Closed roymacdonald closed 6 years ago

roymacdonald commented 8 years ago

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.

roymacdonald commented 8 years ago

related to https://github.com/kylemcdonald/ofxCv/issues/183

kylemcdonald commented 8 years ago

this looks promising but all those memcpys 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

roymacdonald commented 8 years ago

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!