similie
similie copied to clipboard
Changed interface, using functions from pHash (CImg instead of opencv)
Hi Bharanee,
I've started by changing interface to easily cache fingerprints. Then added rotated fingerprints (so images rotated in whatever way can still be found similar). Then I've realized that opencv fingerprint implementation gives too many false positives — completely different images with 0 or very small distance. So I've grabbed two functions from pHash library, fixed them (there was a bug with RGBA and problem caused by using nearest neighbor when resampling) and adapted to also create rotated fingerprints when needed. Hope I did right thing with license.
Cheers, Ivan
Whoa, nice. Thanks :+1:
I'll go through it in the next few days. Not in favour of rspec over minitest/spec. I'd rather go back to the original minitest/spec unless there is a very good reason.
No problem with API changes though if they're necessary.
I never used minitest/spec before and did not find fast enough how to stub method. So I just switched to rspec as I know it well and it was faster for me, no other reason. It should be simple to switch back if you know minitest/spec well.
Yeah I understand.
- minitest/stub can do pretty much whatever you want.
- I'd normally keep stubs to a bare minimum and not recommend it as it ends up becoming a maintenance nightmare.
Gentle hint, when submitting pull requests it is best to keep the change set to what's essential. It makes the job of the person merging easier. I do understand if you have a larger set of requirements, it's alright to make such changes. Just run it past the author so both parties don't end up having surprises.
Also I'd keep the license as MIT. I'll review, make changes and merge this in the next few days. Thanks again!
I used stubs only to test caching, so to check calls to fingerprinting.
There are lots of commits to follow intention. If it will be better I can squash some and probably throw out few.
Your project is under MIT license but .c
file is under CC BY-SA. But inclusion of functions from pHash which is under GPL even after changing them forces to switch license to GPL.
Sorry, I haven't forgotten this. Been very busy at work, will get to it this weekend.