more Raspberry Pi 4 FLIR test

More Raspberry Pi 4 FLIR test

experimented a bit more with that pimoroni

formatting link
module and wrote a GUI that draws temperature related colors and also shows temperature per 'pixel' (24 x 32).

formatting link
this is with the pimoroni MLX90640 FLIR module, using input from their demo code

/root/compile/pantel/mlx90640_FLIR/pimoroni/mlx90640-library-master/examples/step | ./flir_test 0 20 40 0 0 300 1 20 30 the argument numbers allow you to select color range and colors.

# ./flir_test Usage: flir_test red_mode red_start red_end green_mode green_start green_end blue_mode blue_start blue_end mode 0 is normal, warmest most color mode 1 is inverse, coldest most color use all integers Example: /root/compile/pantel/mlx90640_FLIR/pimoroni/mlx90640-library-master/examples/step | flir_test 0 20 40 0 0 300 1 20 30

work in progress,

Impressive how much power the Pi4 has, code quite a bit of maaaz per frame and all that in codesize less than 29 kB: -rwxr-xr-x 1 root root 28536 Feb 4 10:59 flir_test Have not used a peesee in ages, last time was to align my satellite dish when I moved here.

Anyways, this is nice too:

formatting link
sort of a target, more maaaz.

Ask for the code here but probably better ones exist.

Reply to
Jan Panteltje
Loading thread data ...

<snip>

Certainly an impressive display for a 24 x 32 sensor :-)

Reply to
Clive Arthur

On a sunny day (Fri, 4 Feb 2022 11:28:31 +0000) it happened Clive Arthur snipped-for-privacy@nowaytoday.co.uk> wrote in <stj2l0$69r$ snipped-for-privacy@dont-email.me:

I think what they do is using a normal camera together with the FLIR sensor. I like the averaging between pixels, very smooth. I did see that averaging code somewhere, wikipedia?

If you put the normal camera and FLIR sensor on the same PCB next to each other and if those have the same viewing angle (depends on the lens of the normal camera) then this should be no problem, just superimpose.

Reply to
Jan Panteltje

It is the 'blur' funcion (using 'xv' viewer, is open source):

formatting link
now use this as color for a normal BW camera looking at the same area.

But the 'blur' algorithm takes many seconds to complete for a frame like this.....

Challenge for mathematicians :-)

Reply to
Jan Panteltje

Solved, blur runs like a flash in no time if I do the color processing for a 4x3 pixel box and then later enlarge (xv used 3 x double size here), just a bit more noisy:

formatting link

Reply to
Jan Panteltje

Jan Panteltje snipped-for-privacy@yahoo.com wrote in news:stivij$6f1$ snipped-for-privacy@dont-email.me:

FLIR is a brand name not a device type, you stupid twerp.

And the actual FLIR product is an order of magnitude higher resolution, better rendered, and easily offloaded for examination after the fact.

Even their cheap stuff is better and only a few bucks more.

formatting link
Reply to
DecadentLinuxUserNumeroUno

fredag den 4. februar 2022 kl. 21.03.56 UTC+1 skrev snipped-for-privacy@decadence.org:

formatting link

Reply to
Lasse Langwadt Christensen

Lasse Langwadt Christensen snipped-for-privacy@fonz.dk wrote in news: snipped-for-privacy@googlegroups.com:

A military device system. NOT some punks camere eye.

Nope, not ever.

Reply to
DecadentLinuxUserNumeroUno

So was/is Xerox.

Reply to
John S

John S snipped-for-privacy@invalid.org wrote in news:stppo2$n4v$ snipped-for-privacy@dont-email.me:

But you go out and buy a copier NOT a XEROX machine. And IF you do buy a XEROX machine, it usually IS a Xerox brand machine.

It is an IR camera, NOT a "Forward Looking Infra Red" missile launch threat recognition system. It is not even a FLIR device.

At best it is "An IR Imager" because even that "transducer" has to be processed and displayed by yet more circuitry.

They are tissues, NOT "Kleenexes"

Reply to
DecadentLinuxUserNumeroUno

On a sunny day (Fri, 04 Feb 2022 10:34:09 GMT) it happened Jan Panteltje snipped-for-privacy@yahoo.com wrote in <stivij$6f1$ snipped-for-privacy@dont-email.me:

I added some more code, and now you can specify a window in the FLIR output screen where to look for temperatures > or < some limit. and that will call a script named 'flir_alarm_script' that you can then write to do anything in case of alarm. Also added yuv output to stdout that you can read with mplayer or convert on the fly to any video format with ffmpeg. New color scheme, and an optional color range bar on the left.

New name: xflir

formatting link
More command line options come to mind.

It is still based on input required from the pimoroni/mlx90640-library-master/examples/step program.

# xflir -h Usage: mlx90640-library-master/examples/step | xflir [options] options are:

-a show temperature in each pixel, default off

-b int brightness in percent range 0-100, default 100

-e string alarm_script, will be executed upon alarm condition

-f float start_temperature, default 20.0

-h help, this help

-j int detection_window_x_start, default 0

-k int detection_window_x_end, default 23

-l int detection_window_y_start,default 0

-m int detection_window_y_end, default 31

-n detection level negative going, so alarm if temperature drops below setpoint set with -o, default positive

-o float detection_window_threshold, default 30.0

-p set alarm active flag, default off

-s int saturation in percent range 0-100 default 100

-t float end_temperature, default 45.0

-v int verbose level, default off

-x show temperature bar with temperatures on the left, default off

-y yuv format output to stdout

-z temperature text foreground white Examples: show colors between 20 and 40 degrees C xflir -f 20 -t 40 show temperature from 20 C to 33 C in each pixel mlx90640-library-master/examples/step | xflir -f 20.0 -t 33.0 -a alarm detection on alarm windows specified and yuv format output to file mlx90640-library-master/examples/step | xflir -f 20.0 -t 33.0 -j 10 -k 20 -l 20 -m 31 -o 29.0 -e flir_alarm_script -x -y -p 1>file.yuv mlx90640-library-master/examples/step | xflir -f 20.0 -t 33.0 -j 10 -k 20 -l 20 -m 31 -x -y | ffmpeg -i - -vcodec libx264 -y file.avi

By now should make a decent link on the website..., thing is still less than 25 kByte in size Raspberry P4 only, will not compile on X86 without changes. My code is GPL licensed

Example of flir_alarm_script: #!/bin/bash echo "FLIR ALARM" aplay -D hw:1,0 warn.wav mpg123 -a hw:1,0 far_infrared_alarm.mp3 echo "FLIR ALARM" | netcat -q 0 192.168.178.69 1112 exit 0

Note the use of 'netcat', the soluion to all networking ;-)

On the receiving site, (any where in the world) run: while [ 1 ] ; do netcat -l -p 1112 ; sleep 1 ; done Of course that can be a script doing anything too.

Now next is to mount it on the space laser and look for F35s

formatting link

Reply to
Jan Panteltje

Picture using alarm window:

formatting link

Reply to
Jan Panteltje

Jan Panteltje snipped-for-privacy@yahoo.com wrote in news:su0gmc$c12$1 @dont-email.me:

It is NOT a FLIR, it is an IR.

Reply to
DecadentLinuxUserNumeroUno

xflir-0.2 released Complete rewrite of xflir now stand alone code, also compiles on other Linux systems with gcc.

formatting link
Tested on Raspberry Pi4

Reply to
Jan Panteltje

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.