RobotCore
Robot Core Documentation
Classes | Public Member Functions | List of all members
robotCore.PiCamera Class Reference

The PiCamera class handles communication with the Raspberry Pi Camera. More...

Inheritance diagram for robotCore.PiCamera:
robotCore.Network.NetworkReceiver

Classes

class  PiCameraPoint
 The PiCamerPoint specifies an (x,y) position. More...
 
class  PiCameraRect
 The PiCameraRect specifies an rectangular region. More...
 
class  PiCameraRegion
 The PiCameraRegion specifies a single detected region. More...
 
class  PiCameraRegions
 The PiCameraRegions specifies list of detected regions. More...
 
class  PiCameraStats
 The PiCameraStats class collects the current camera performance statistics. More...
 

Public Member Functions

boolean IsConnected ()
 
void DumpFrames (int count)
 
void StartLogging (String path)
 
void EndLogging ()
 
void SetLight (int value)
 
void SetProfile (int profile)
 
void StartPiLog ()
 
void EndPiLog ()
 
void Connect (String host, int port)
 
PiCameraStats GetStats ()
 
void ClearStats ()
 
PiCameraRegions GetRegions ()
 
- Public Member Functions inherited from robotCore.Network.NetworkReceiver
void ProcessData (String command)
 
void Connected ()
 
void Disconnected ()
 

Detailed Description

The PiCamera class handles communication with the Raspberry Pi Camera.

Author
John Gaby
   This class allows you to connect to the Data server of the Raspberry
   Pi and receive information about the image frames processed by the
   camera.

   It also implements a time sync protocol to synchronize the clocks and
   performs keep-alive functions that detect a disconnect.

Member Function Documentation

◆ ClearStats()

void robotCore.PiCamera.ClearStats ( )

Clears the camera performance stats

◆ Connect()

void robotCore.PiCamera.Connect ( String  host,
int  port 
)

Connects to the Raspberry Pi Data server

Parameters
host- Specifies IP for the host
port- Specifies the port (default is 5800)

◆ DumpFrames()

void robotCore.PiCamera.DumpFrames ( int  count)

Instructs the Raspberry Pi to dump the last N frame to disk. This can be useful in debugging to obtain a record of what the camera saw.

Parameters
count- Count of frames to dump (max 120)

◆ EndLogging()

void robotCore.PiCamera.EndLogging ( )

Ends logging and closes the log file

◆ EndPiLog()

void robotCore.PiCamera.EndPiLog ( )

Ends the Raspberry Pi logging

◆ GetRegions()

PiCameraRegions robotCore.PiCamera.GetRegions ( )

Returns the latest set of camera regions. Note that the data is received from the camera in a separate thread so calling this twice in a row can generate a different result. Once you retrieve and instance of PiCameraRegions however, you can be assured that it will NOT be modified when a new frame is received.

◆ GetStats()

PiCameraStats robotCore.PiCamera.GetStats ( )

Returns the current camera performance stats

◆ IsConnected()

boolean robotCore.PiCamera.IsConnected ( )

Returns true if connected to the camera

◆ SetLight()

void robotCore.PiCamera.SetLight ( int  value)

if the Raspberry Pi is configured to controll the camera lights using pins 11 and 12, this command will turn the lights on or off

Parameters
value- Bit zero controls pin 11 and bit one controls pin 12

◆ SetProfile()

void robotCore.PiCamera.SetProfile ( int  profile)

Specifies which capture profile should be used.

Parameters
profile- Specifies the profile to use (0-3)

◆ StartLogging()

void robotCore.PiCamera.StartLogging ( String  path)

Starts logging the data received from the Raspberry Pi locally

Parameters
path- Specifies the path for the log file.

◆ StartPiLog()

void robotCore.PiCamera.StartPiLog ( )

Instructs the Raspberry Pi to start logging the camera data on the Pi's disk This can be useful for debugging


The documentation for this class was generated from the following file: