Lets All Burn !!! Fire Effect

What would happen if I took a fire effect and used the outlines of the camera feed to become an emitter? Something pretty awesome, that’s what. I spent most of the time trying to remove the noise from the edge detection. Sadly, I ended up introducing the noise again and actually enhanced it. The lines detected were too crisp for the emitter to fully work. Below is the effect. Have fun playing with it!

The code is still very dirty, as I was fiddling a lot to get things looking nice. I tried darkening the video feed, enhancing the emitter settings etc. So I will not be publishing the source just yet. I really need to clean things up a bit.

The edge detection is the basic convolution filter with some minor modifications. I draw the detected lines to the emitter and then make the black, created by the filter, transparent. This allows me to overlay the fire over the video without hiding the detail. Perlin noise is used to make the fire and the fire is scrolled upwards by three pixels each frame. Here are some other images taken from our office burning :-)