NewCamera
NewCamera [/HIDE=h /HOST=hcSpec /K=k /S=sequence /N=winName /W=(left,top,right,bottom ) ] [hardwareName=hwName]
The NewCamera operation creates a new camera window to display live video from supported hardware cameras.
NewCamera was added in Igor Pro 7.00, and deprecated in Igor Pro 10.00.
Use MMI_NewCamera instead.
Flags
| /HIDE=h | Hides (h = 1) or shows (h = 0, default) the window. | ||||||||
| /HOST=hcSpec | Embeds the new camera window in the host window or subwindow specified by hcSpec. The host window or subwindow must be a control panel or a graph. | ||||||||
| When identifying a subwindow with hcSpec, see Subwindow Syntax for details on forming the window hierarchy. | |||||||||
| /K=k | Specifies window behavior when the user attempts to close it. | ||||||||
| |||||||||
| /N=name | Requests that the created camera window have the specified name, if it is not in use. If it is in use, then name0, name1, etc. are tried until an unused window name is found. | ||||||||
| If you omit /N, NewCamera uses a name like Camera0. | |||||||||
| NewCamera sets S_name to the chosen name. | |||||||||
| /S=n | Selects camera n from the sequence of available cameras on the current machine. n is zero-based. See also the GetCamera availableCameras keyword. | ||||||||
| /W=(left,top,right,bottom) | |||||||||
| Sets the window location. Coordinates are in points for top-level windows. | |||||||||
| When used with the /HOST flag, the specified location coordinates can have one of two possible meanings: | |||||||||
| |||||||||
| /Z | Suppress errors. If present, NewCamera sets V_Flag to 0 if the operation succeeded or to a non-zero error code. In the event of an error, it creates the window as if the operation succeeded but with a small missing camera indicator. | ||||||||
Keywords
| hardwareName=hwName | Selects the hardware camera using the full camera name. hwName is the camera's description. See also the GetCamera availableCameras keyword. | |
Details
If you have a single camera connected to your computer you can display live video by simply executing NewCamera without any flags or keywords.
You can control a camera window like other Igor target windows, using MoveWindow, SetWindow, etc.
If you have more than one camera connected to your computer you can specify the camera using its hardware name via the hardwareName keyword or using its zero-based sequence number using the /S flag.
Igor saves camera windows saved with the experiment and opens them live mode if you have a matching camera connected to the computer on which you open the experiment. If you do not have a matching camera, Igor still displays the camera window with a missing camera indicator.
Camera settings are not saved with the experiment.
Output Variables
NewCamera sets the following output variables:
| V_flag | 0 if the operation succeeded or a non-zero error code. | |
| S_name | The name of the new camera window. | |
See Also
GetCamera, ModifyCamera, MMI - Overview