Detect a candle fire using OpenMV H7 and FLIR

Hello, my project is to use OpenMV cam H7 and some of the FLIR lepton to detect a candle fire (approximately 2 or less centimetres high) from at least 2 metre distance. I would like to know if it is possible (I also want the maximum FPS because it would be mounted to a moving object), then which FLIR Lepton to use to get the best results. I also tried doing it without FLIR, after using gamma correction and turning off automatic light correction I get almost good results, but it wasn’t resistant to sun light (which I need it to be), but using grayscale I got 70 FPS witch was pretty great. So I would like to know what is the best way to use. Maybe also use the special sun lens you are offering.
Thank you a lot.

You can definitely use FLIR for this, but note it’s limited to 9FPS.

Thank you! Do you mean FLIR Lepton 3 or 3.5? And do you think it can be done without it and somehow isolate the sun light using polarizing filter you are offering?

Hi, the FLIR Lepton sees heat. As long as the sun isn’t behind the candle it will isolate the sun out. You don’t need the lens polarizer. That’s for visible light. Not thermal.

I’d use the 3.5 if possible, you can set a target temperature rang using it.

But maybe it would be not so good because of FPS, so I am mapping the possibillities. Do you think that without flir, with normal lens and the polarizar it can isolate sun and setect just the candle fire? Because then, it would have a lot more FPS, wouldn’t it?
Btw thank you for your answers :smiley:

The polarizer works great when the light from the sun is reflected off a surface at some angle. It doesn’t work looking right at the sun. You’d need to specify exactly how your system is setup. If you just need to remove reflected light from the sun the polarizer will work. Otherwise it will not.

I don’t need to look right at the sun, I just want to ignore the reflected sunlight going from window which is right above the field with the candles. The sun light is ussually seen as light stripes on the field.

Okay, the polarizer may help them. I can’t really offer any guarantees. It does work magic when it works however.

Can I somehow set the maximum detecting value (I know, you can set the minimum - that is pixel and area treshold) so it can ignore the bright areas with bigger area and detect just the object that has small area…? I hope you understanded it

Hi, use the filter method in Python and filter out blobs returned that pass the maximum value you want to ignore. Find blobs returns a list of values. So, just inspect the pixel/area count per blob returned and ignore blobs that have too large a value.

Thank you, I will try that soon, but for now I want to order that polarizer to my H7 camera. I want to know if I need more than one and how can it be attached to the camera. I also ordered wide angle lens with my camera, but it cannot be put on camera, it always get stuck in one position. I think that the screw thred is badly made so it always get stuck. I don’t know if I need to order new one, or how to deal with this.

Hi, the polarizer goes under the lens mount. Please order a new lens mount. We have a stock of them that didn’t come from the production run. Lens mounts are available on the store.

So the lens mount will also solve the problem with putting on ultra wide lens, I mentioned?

Yes, the standard lens mount you have should work with the ultra wide angle lens. It’s just that we use really cheap lens mounts which aren’t to spec always.

Hello, I now have Flir Lepton 3.5 as you adviced me, which example program should I use or what should I do to track the candle fire? Thank you.

Hi, please see Examples - > FLIR Lepton → Target Temperature Tracking. We have about 8 examples to work with.

I tried that examples, but the temperature of flame is not same in all areas of fire. The best results I got is when I tried to track 40 °C, but it is very close to other objects around. I think the best would be to track not just 40 °C but to compare the temperature of the points that are close together. Is it possible? And if yes then were should I start? If you have better sollution, maybe use neural networking or something else it would be great. Thank you!

Hi, what temperature range are you tracking? The flame is definitely hotter than 40C. Have you tried raising the max temperature range? Please post the code you are running and the IDE frame buffer pic.

I am sending you the camera photos with different temperature ranges. I have to recognize candle up to 3 metres, so I suppose I want camera to see the biggest candle fire as possible. What should I do? Thank you










It looks like you have the basic idea of what to do. What’s the problem? I can’t really help you figure out what temperature range kin and max works the best. That’s something you have to do. But, I think you are on the right path.

If you do everything in grayscale mode you can then use find_blobs() to track the object.