1. The image capture procedure is extensively covered in the article already. Either an API call to platypush will work:
curl -XPOST -H 'Content-Type: application/json' -d '
{
"type":"request",
"action":"camera.ir.mlx90640.capture",
"args": {
"output_file":"~/snap.png",
"scale_factor":20
}
}' http://localhost:8008/execute

Or a cronjob to take pictures at regular intervals:

cron.ThermalCameraSnapshotCron:
cron_expression: '* * * * *'
actions:
-
action: camera.ir.mlx90640.capture
args:
output_file: "${__import__(’datetime’).datetime.now().strftime(’/img/folder/%Y-%m-%d_%H-%M-%S.jpg’)}"
grayscale: true

2. The OpenCV maintainers for RPi have really screwed it up recently. Both the current versions on pip and apt are either broken or don’t come with extras support (which is needed to make predictions on ML models). Take a look here at an alternative way to install OpenCV from sources, until the maintainers learn again how software packaging is supposed to be done: https://www.pyimagesearch.com/2019/09/16/install-opencv-4-on-raspberry-pi-4-and-raspbian-buster/

3. It is possible to take images as frequently as you wish with the platypush cronjob I’ve shown above. Again, the article explains everything.

Written by

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store