Documentation ¶
Index ¶
- Constants
- func AvailableDevices() uint
- type Capture
- type Device
- func (d *Device) Close()
- func (d *Device) GetHandle() C.k4a_device_t
- func (d *Device) Open() error
- func (d *Device) SerialNumber() (string, error)
- func (d *Device) Start() error
- func (d *Device) Stop()
- func (d *Device) UpdateConfig(config DeviceConfig) error
- func (d *Device) Versions() (DeviceVersions, error)
- type DeviceConfig
- type DeviceVersions
- type Image
- type ImageType
Constants ¶
const ( // ColorImage ... ColorImage = iota // DepthImage ... DepthImage // DepthTransformed is the depth image mapped on the RGB image DepthTransformed )
const (
// Default is the default ID for one connected Kinect
Default = 0
)
Variables ¶
This section is empty.
Functions ¶
func AvailableDevices ¶
func AvailableDevices() uint
AvailableDevices returns the number of devices attached to the computer
Types ¶
type Capture ¶
type Capture struct {
// contains filtered or unexported fields
}
Capture encapsulates a Kinect capture
func (*Capture) ColorImage ¶
ColorImage converts and returns the RGBA data into a Go image. If no image could be found, nil is returned
func (*Capture) DepthImage ¶
DepthImage converts and returns the depth value as a gray16 image. If no image could be found, nil is returned
func (*Capture) DepthTransformed ¶
DepthTransformed converts and returns the transformed depth value as a gray16 image. If no image could be found, nil is returned
func (*Capture) SingleShot ¶
SingleShot makes one capture shot and stores the data. It also releases the capture data.
type Device ¶
type Device struct { ID uint32 // device ID Fps uint32 // actual FPS Capturing bool // indicates if the device is in capturing mode Calibration C.k4a_calibration_t // stores the calibration // contains filtered or unexported fields }
Device represents one Kinect DK device
func (*Device) GetHandle ¶
func (d *Device) GetHandle() C.k4a_device_t
GetHandle returns the native handle
func (*Device) Open ¶
Open opens the device and establishes the connection. Please make sure to close the device after usage!
func (*Device) SerialNumber ¶
SerialNumber returns the serial number of the device
func (*Device) UpdateConfig ¶
func (d *Device) UpdateConfig(config DeviceConfig) error
UpdateConfig sets the configuration for the Kinect sensor and reads the new calibration data
func (*Device) Versions ¶
func (d *Device) Versions() (DeviceVersions, error)
Versions returns the stored sensor versions
type DeviceConfig ¶
type DeviceConfig struct { Fps int DepthMode int ColorFormat int ColorResolution int SyncDepthAndRgb bool }
DeviceConfig configures the device parameters
type DeviceVersions ¶
DeviceVersions gives information about device sensor versions
func (DeviceVersions) String ¶
func (v DeviceVersions) String() string