kylemcdonald / ofxCv

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

Wrapped polygon methods, faster copy and new skeletonization algorithm #256

Closed valillon closed 5 years ago

valillon commented 5 years ago

Hi @kylemcdonald ,

Recently using your addon, I come across with some needs and finally ended up implementing them.
Major changes in this request:

ofxcv_thin zhang_suen
roymacdonald commented 5 years ago

Hi @valillon, I found this same odd behavior some time ago, made some fixes but ended up agreeing with @kylemcdonald that it was not a good fix. look here https://github.com/kylemcdonald/ofxCv/issues/183 and it's related PR https://github.com/kylemcdonald/ofxCv/pull/184 What's currently implemented is not doing the skeletonization properly It is not doing all the iterations it needs, so that's probably the reason for such a big difference in the processing times. I'll try out your pr and let you know. cheers

valillon commented 5 years ago

Hi Roy!,

Actually Kyle already mentioned the same Zhang-Suen algorithm in this comment. Thanks for testing.

roymacdonald commented 5 years ago

Hey @valillon much better then! I will test soon and let you know. best!

valillon commented 5 years ago

Hi again! I just did some simple optimizations to the Nash's skeletonize code in my local branch here. It depends much on the complexity of the binary image, but at least for the images in example-coherent-lines it performs about x2 faster.

kylemcdonald commented 5 years ago

thank you! this generally looks good. thanks for checking @roymacdonald since i know you've thought about this before.