Get camera object for the SRV-1 Blackfin robot/camera.
Namespace:
AForge.Robotics.SurveyorAssembly: AForge.Robotics.Surveyor (in AForge.Robotics.Surveyor.dll) Version: 2.2.4.0 (2.2.4.0)
Syntax
| C# |
|---|
public SRV1Camera GetCamera() |
Return Value
Returns SRV1Camera object, which is connected to SRV1 Blackfin camera. Use Start()()() method to start the camera and start receiving video frames it.
Remarks
The method provides an instance of SRV1Camera, which can be used for receiving continuous video frames from the SRV-1 Blackfin camera. In the case if only one image is required, the GetImage()()() method can be used.
Sample usage:
// get SRV-1 camera SRV1Camera camera = srv.GetCamera( ); // set NewFrame event handler camera.NewFrame += new NewFrameEventHandler( video_NewFrame ); // start the video source camera.Start( ); // ... private void video_NewFrame( object sender, NewFrameEventArgs eventArgs ) { // get new frame Bitmap bitmap = eventArgs.Frame; // process the frame }
Exceptions
| Exception | Condition |
|---|---|
| AForge..::.NotConnectedException | Not connected to SRV-1. Connect to SRV-1 robot/camera before using this method. |