RobotCore 1.0
WPILib port to raspberry Pi
Loading...
Searching...
No Matches
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  PiCameraStats
 The PiCameraStats class collects the current camera performance statistics. More...
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...

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.

Definition at line 44 of file PiCamera.java.

Constructor & Destructor Documentation

◆ PiCamera()

robotCore.PiCamera.PiCamera ( )

Definition at line 204 of file PiCamera.java.

Member Function Documentation

◆ clearStats()

void robotCore.PiCamera.clearStats ( )

Clears the camera performance stats

Definition at line 467 of file PiCamera.java.

◆ 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)

Definition at line 396 of file PiCamera.java.

◆ 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)

Definition at line 300 of file PiCamera.java.

◆ endLogging()

void robotCore.PiCamera.endLogging ( )

Ends logging and closes the log file

Definition at line 338 of file PiCamera.java.

◆ endPiLog()

void robotCore.PiCamera.endPiLog ( )

Ends the Raspberry Pi logging

Definition at line 386 of file PiCamera.java.

◆ 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.

Definition at line 525 of file PiCamera.java.

◆ getStats()

PiCameraStats robotCore.PiCamera.getStats ( )

Returns the current camera performance stats

Definition at line 456 of file PiCamera.java.

◆ isConnected()

boolean robotCore.PiCamera.isConnected ( )

Returns true if connected to the camera

Definition at line 227 of file PiCamera.java.

◆ 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

Definition at line 353 of file PiCamera.java.

◆ setProfile()

void robotCore.PiCamera.setProfile ( int profile)

Specifies which capture profile should be used.

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

Definition at line 367 of file PiCamera.java.

◆ 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.

Definition at line 313 of file PiCamera.java.

◆ 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

Definition at line 378 of file PiCamera.java.


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