lepton

package
v3.3.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package lepton drives a FLIR Lepton Infra Red (IR) camera.

More details

See https://periph.io/device/lepton/ for more details about the device.

Datasheet

https://www.flir.com/globalassets/imported-assets/document/lepton-engineering-datasheet---with-radiometry.pdf

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dev

type Dev struct {
	*cci.Dev
	// contains filtered or unexported fields
}

Dev controls a FLIR Lepton.

It assumes a specific breakout board. Sadly the breakout board doesn't expose the PWR_DWN_L and RESET_L lines so it is impossible to shut down the Lepton.

func New

func New(p spi.Port, i i2c.Bus) (*Dev, error)

New returns an initialized connection to the FLIR Lepton.

Maximum SPI speed is 20Mhz. Minimum usable rate is ~2.2Mhz to sustain a 9hz framerate at 80x60.

Maximum I²C speed is 1Mhz.

MOSI is not used and should be grounded.

func (*Dev) Bounds

func (d *Dev) Bounds() image.Rectangle

Bounds returns the device frame size.

func (*Dev) Halt

func (d *Dev) Halt() error

Halt implements conn.Resource.

func (*Dev) NextFrame

func (d *Dev) NextFrame(f *Frame) error

NextFrame blocks and returns the next frame from the camera.

It is ok to call other functions concurrently to send commands to the camera.

func (*Dev) String

func (d *Dev) String() string

type Frame

type Frame struct {
	*image14bit.Gray14
	Metadata Metadata // Metadata that is sent along the pixels.
}

Frame is a FLIR Lepton frame, containing 14 bits resolution intensity stored as image14bit.Gray14.

Values centered around 8192 accorging to camera body temperature. Effective range is 14 bits, so [0, 16383].

Each 1 increment is approximatively 0.025K.

type Metadata

type Metadata struct {
	SinceStartup   time.Duration      //
	FrameCount     uint32             // Number of frames since the start of the camera, in 27fps (not 9fps).
	AvgValue       uint16             // Average value of the buffer.
	Temp           physic.Temperature // Temperature inside the camera.
	TempHousing    physic.Temperature // Camera housing temperature.
	RawTemp        uint16             //
	RawTempHousing uint16             //
	FFCSince       time.Duration      // Time since last internal calibration.
	FFCTemp        physic.Temperature // Temperature at last internal calibration.
	FFCTempHousing physic.Temperature //
	FFCState       cci.FFCState       // Current calibration state.
	FFCDesired     bool               // Asserted at start-up, after period (default 3m) or after temperature change (default 3K). Indicates that a calibration should be triggered as soon as possible.
	Overtemp       bool               // true 10s before self-shutdown.
}

Metadata is constructed from telemetry data, which is sent with each frame.

Directories

Path Synopsis
Package cci declares the Camera Command Interface to interact with a FLIR Lepton over I²C.
Package cci declares the Camera Command Interface to interact with a FLIR Lepton over I²C.
Package image14bit implements 14-bit per pixel images.
Package image14bit implements 14-bit per pixel images.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL