camera.ir.mlx90640
Platypush documentation
camera.ir.mlx90640
- class platypush.plugins.camera.ir.mlx90640.CameraIrMlx90640Plugin(rawrgb_path: Optional[str] = None, resolution: Tuple[int, int] = (32, 24), warmup_frames: Optional[int] = 5, **kwargs)[source]
Bases:
CameraPlugin
Plugin to interact with a ML90640 infrared thermal camera.
In order to use this plugin you’ll need to download and compile the mlx90640 C++ bindings and examples for the device. Instructions on Raspbian:
# Install the dependencies $ [sudo] apt-get install libi2c-dev $ cd $PLATYPUSH_SRC_DIR $ git submodule init $ git submodule update $ cd platypush/plugins/camera/ir/mlx90640/lib $ make clean $ make bcm2835 $ make examples/rawrgb I2C_MODE=LINUX
Requires:
mlx90640-library installation (see instructions above)
PIL image library (
pip install Pillow
)
- __init__(rawrgb_path: Optional[str] = None, resolution: Tuple[int, int] = (32, 24), warmup_frames: Optional[int] = 5, **kwargs)[source]
- Parameters:
rawrgb_path – Specify it if the rawrgb executable compiled from https://github.com/pimoroni/mlx90640-library is in another folder than <directory of this file>/lib/examples.
resolution – Device resolution (default: 32x24).
warmup_frames – Number of frames to be skipped on sensor initialization/warmup (default: 2).
kwargs – Extra parameters to be passed to
platypush.plugins.camera.CameraPlugin
.
- capture_frame(device: Camera, *args, **kwargs)[source]
Capture a frame from a device using the plugin-specific logic - to be implemented by the derived classes.
- Parameters:
device – An initialized
platypush.plugins.camera.Camera
object.
- prepare_device(device: Camera)[source]
Prepare a device using the plugin-specific logic - to be implemented by the derived classes.
- Parameters:
device – An initialized
platypush.plugins.camera.Camera
object.