Re:Show HN: Real-Time Video Chroma Key with Delta-E Formula
by zschuessler on Sunday April 26, 2015 @05:05PM
(#9443266)
Author here.
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:
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! :-)
Re:Show HN: Real-Time Video Chroma Key with Delta-E Formula
by liabru on Sunday April 26, 2015 @07:03PM
(#9443648)
Nice work!
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.
Re:Show HN: Real-Time Video Chroma Key with Delta-E Formula
by ChicagoBoy11 on Sunday April 26, 2015 @08:04PM
(#9443798)
Great work implementing this - just the fact that I now know that his kind of realtime image processing is possible in the browser certainly provides lots of fuel for project ideas. Summer hasn't even started but it already got better. Thanks a ton!
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!