Skip to main content

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=hHides (h = 1) or shows (h = 0, default) the window.
/HOST=hcSpecEmbeds 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=kSpecifies window behavior when the user attempts to close it.
k =0:Normal with dialog (default).
k =1:Kills with no dialog.
k =2:Disables killing.
k =3:Hides the window.
/N=nameRequests 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=nSelects 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:
1.When all values are less than 1, coordinates are assumed to be fractional relative to the host frame size.
2.When any value is greater than 1, coordinates are taken to be fixed locations measured in points, or control panel units for control panel hosts, relative to the top left corner of the host frame.
/ZSuppress 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=hwNameSelects 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_flag0 if the operation succeeded or a non-zero error code.
S_nameThe name of the new camera window.

See Also

GetCamera, ModifyCamera, MMI - Overview