setVideoCamera
Top  Previous  Next

setVideoCamera ( string Name )

Use this function to select the current video camera by name.

Depending on the video driver, the function performs the following actions:

 
Simulation
Attaches the video stream to the image or video file whose path is specified by the Name parameter.

BitFlow Camera Interface
Selects the camera configuration file as they appear in the Camera list of the Video Source dialog. If the Name parameter is empty, ImageWarp will switch to the default camera file provided by SysReg utility from BitFlow SDK.

FireWire (IEEE-1394)
Selects among multiple FireWire cameras as they appear in the Camera list of the Video Source dialog

Video for Windows (VFW)
No action

DirectShow (WDM)
No action




Parameters
 
 
Name  
 
A string specifying the name of the camera.  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_NOTFOUND  
 
Camera name not found.  
 
 
ERR_FAILED  
 
The flag set if failed.  
 
Examples

This set of statements switches between two FireWire video cameras every 10 seconds:  
 
Do  
setVideoCamera("sony")  
wait (3000)  
setVideoCamera("jvc")  
wait (3000)  
Loop  
 
This set of statements configures BitFlow board to a specific Dalsa camera file:  
 
setVideoCamera("DalsaP2-21-6KE2")  
 
 
 
 
Remark

Name can only contain a prefix to the actual camera name. ImageWarp will check the given name against the camera list of the current video driver and switch to the first camera whose name matches the given prefix. If no match is found, the error will be raised.