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 PiCameraPoint 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: