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.
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.
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:
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.
-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
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.