lepton

package
v2.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 27, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package lepton drivers a FLIR Lepton.

References

Official FLIR reference:

http://www.flir.com/cvs/cores/view/?id=51878

Product page:

http://www.flir.com/cores/content/?id=66257

Datasheet:

http://www.flir.com/uploadedFiles/OEM/Products/LWIR-Cameras/Lepton/Lepton%20Engineering%20Datasheet%20-%20with%20Radiometry.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 deprecated

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

New returns an initialized connection to the FLIR Lepton.

The CS line is manually managed by using mode spi.NoCS when calling Connect(). In this case pass nil for the cs parameter. Some spidev drivers refuse spi.NoCS, they do not implement proper support to not trigger the CS line so a manual CS (really, any GPIO pin) must be used instead.

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.

Deprecated: Argument cs will be removed in v3.

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) ReadImg deprecated

func (d *Dev) ReadImg() (*Frame, error)

ReadImg reads an image.

Deprecated: Use NextFrame() instead.

func (*Dev) String

func (d *Dev) String() string

type Frame

type Frame struct {
	*image.Gray16
	Metadata Metadata // Metadata that is sent along the pixels.
}

Frame is a FLIR Lepton frame, containing 14 bits resolution intensity stored as image.Gray16.

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           devices.Celsius // Temperature inside the camera.
	TempHousing    devices.Celsius // Camera housing temperature.
	RawTemp        uint16          //
	RawTempHousing uint16          //
	FFCSince       time.Duration   // Time since last internal calibration.
	FFCTemp        devices.Celsius // Temperature at last internal calibration.
	FFCTempHousing devices.Celsius //
	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. This protocol controls and queries the camera but is not used to read the images.
Package cci declares the Camera Command Interface to interact with a FLIR Lepton over I²C. This protocol controls and queries the camera but is not used to read the images.
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