3 ms·
Comparing images in pure Ruby (and how Github's image diff works)
- jkreeftmeijer 15y agoJust looking for the code? Here you go: https://gist.github.com/923894 https://gist.github.com/923894 https://gist.github.com/925244 https://gist.github.com/925244 https://gist.github.com/924996 https://gist.github.com/924996
- sgrove 15y agoVery enjoyable. Image manipulation/detection/recognition is a field that actually starts out pretty simple (I was surprised, I assumed it would be fiendishly math-heavy), but scales well into the dissertation-level. The article is a pretty cool highlight of some low-hanging fruit. I'd like to see something using a n-neighbor-aware technique instead of pixel-by-pixel to detect shifting/scaling/rotation in a direction in addition to color change, but I'm sure those are much longer articles.
- jkreeftmeijer 15y agoYou're right, I wanted to keep this one short and simple. I have been thinking about writing an article about calculating image similarity, instead of just finding differences between two versions. Stay tuned! :)