libVision  1.0
A vision library made by FRC team #4529
Classes | Functions
VisionLib.h File Reference

Main library header. More...

#include "CamFeed.h"
#include "TargetDetector.h"

Go to the source code of this file.

Classes

class  InstanceStore
 Instance of vision system. More...
 

Functions

InstanceStoreinitFeed (const char *feedPath)
 Starts the vision system from a feed path. More...
 
InstanceStoreinitCamera (int camIndex)
 Starts the vision system with a USB camera. More...
 
bool setThreshold (InstanceStore *store, int newThreshold)
 Sets the thresholding cuttoff value. More...
 
LineResult processFrame (InstanceStore *store)
 Process a new frame for vision. More...
 
void closeCamera (InstanceStore *store)
 Close/release the camera and deallocate all used memory. More...
 

Detailed Description

Main library header.

Note
More exports are found in TargetDetector.

Function Documentation

void closeCamera ( InstanceStore store)

Close/release the camera and deallocate all used memory.

Parameters
storePointer to the store returned by initFeed() or initCamera().
InstanceStore* initCamera ( int  camIndex)

Starts the vision system with a USB camera.

Parameters
camIndexIndex of the camera to use.
Returns
InstanceStore for current vision system instance.
Note
See CamFeed::CamFeed(int camIndex) for details on camera indexes.
InstanceStore* initFeed ( const char *  feedPath)

Starts the vision system from a feed path.

Parameters
feedPathURI of feed source.
Returns
InstanceStore for current vision system instance.
Note
See CamFeed::CamFeed(const char * feedPath) for details on URI specification.
LineResult processFrame ( InstanceStore store)

Process a new frame for vision.

Parameters
storePointer to the store returned by initFeed() or initCamera().
Returns
LineResult Output of vision system.
bool setThreshold ( InstanceStore store,
int  newThreshold 
)

Sets the thresholding cuttoff value.

If not run, the value will default to 234.

Parameters
storePointer to the store returned by initFeed() or initCamera().
newThresholdThe new threshold value - takes values 0-255 (inclusive).
Returns
true if operation was successful, false if newThreshold was invalid or if store is null.
Note
Try to have this as close to 255 as possible while still being able to detect the target reliably.
Can be changed multiple times.