Open a camera.
n = camopen(i) n = camopen(i,[width, height])
The i'th camera.
Desired camera resolution.
A number, the opened video file/camera index.
camopen open a camera, but it does not read frames from the camera. Please use im=camread(n) to get a frame from the n'th opened video file. Remember to close the opened camera using camclose(n) or camcloseall() . Video support for IPCV is only available when IPCV is compiled with OpenCV which support video I/O.
n = camopen(0); sleep(200); im = camread(n); //get a frame imshow(im); camcloseall(); | ![]() | ![]() |