Show HN: Real-Time Video Chroma Key with Delta-E Formula
zschuessler.github.io
zschuessler.github.io
Advance apology for mobile users: there is no buffering for this demo. Please bookmark it and return when you're on desktop if you'd like to see the fun. (Sorry!)
If color difference interests you at all, I highly recommend reading the Learn page. It's a fun read:
http://zschuessler.github.io/DeltaE/learn/
In all, I'd estimate I spent 100 hours in learning about color difference, creating this library, and ultimately creating this demo. It was a fun ride with many stories in itself.
This library is released as public domain. Go nuts. If you create anything cool (or boring and useful) let me know - I'll link to your project.
This is my first post to HN, but I'm very receptive to constructive feedback or questions. Fire away! :-)
A little trick you can use here is squared distance which avoids the relatively expensive square root (also do the square in-place rather than pow) so your distance function becomes:
(d - a) * (d - a) + (e - b) * (e - b) + (f - c) * (f - c)
You will need to also square your threshold values.
The Sharma et al. paper is worth reading for some of the implementation/stability pitfalls: http://www.ece.rochester.edu/~gsharma/ciede2000/
I believe I spent a couple days of agonizing troubleshooting to find the bug. Lots of places for it to hide in that wall of math...
Thanks for sharing!