Difference betwen fir.read_ir and fir.snapshot

Discussion related to "under the hood" OpenMV topics.
bogflap
Posts: 40
Joined: Mon Apr 16, 2018 10:03 am

Difference betwen fir.read_ir and fir.snapshot

Postby bogflap » Tue Oct 02, 2018 8:24 am

I am looking to calculate the difference between consecutive images from and AMG8833 to spot when an above ambient temperature object comes into the AMG8833's field of view.
I have been testing using the AMG8833_overlay.py script to but unfortunately I seem to get some unexpected hot spots displayed.
Hence it looks like I will need to look for frame differences as opposed to detecting absolute temperature changes.
Hence looking at the two methods and wondering which one would be more appropriate for frame differencing?
User avatar
kwagyeman
Posts: 2459
Joined: Sun May 24, 2015 2:10 pm

Re: Difference betwen fir.read_ir and fir.snapshot

Postby kwagyeman » Tue Oct 02, 2018 11:46 am

Use the snapshot method. Then you can just call difference() on the frames returned. The IR images are all very small so you can use the heap without issue.

read_ir() gives you an array of numbers but you have to write the difference code yourself. That said, you do have temperature information then.
Nyamekye,
bogflap
Posts: 40
Joined: Mon Apr 16, 2018 10:03 am

Re: Difference betwen fir.read_ir and fir.snapshot

Postby bogflap » Wed Oct 03, 2018 5:59 am

So does this mean that the snapshot function does colorisation (translates the temperature values into a rainbow spectrum) and the read_ir does not?
User avatar
kwagyeman
Posts: 2459
Joined: Sun May 24, 2015 2:10 pm

Re: Difference betwen fir.read_ir and fir.snapshot

Postby kwagyeman » Wed Oct 03, 2018 12:04 pm

Yeah, read_ir just gives you an array of floats. Then draw_ir draws the array of floats on the image. snapshot() combines the two operations on a new image buffer and returns that to you.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests