v2026.5.3
All Bundles
Bundle OpenCV computer vision library. Image supports loading, saving, resizing, color conversion, blurring, edge detection, cropping, and drawing. VideoCapture reads from files or camera streams. Compile with -lib opencv.

VideoCapture

OpenCV VideoCapture

Operations

Open #

Open video file or a capturing device or a IP video stream

method : public : Open(id:Int) ~ Bool

Parameters

NameTypeDescription
idIntdevice ID

Return

TypeDescription
Booltrue if open, false otherwise

Example

cap := VideoCapture->New(0);
if(cap->Open(0)) {
  frame := cap->Read();
  frame->Save("frame.jpg");
  cap->Release();
};

Open #

Open video file or a capturing device or a IP video stream

method : public : Open(id:Int, pref:Api) ~ Bool

Parameters

NameTypeDescription
idIntdevice ID
prefApiApi prefernce

Return

TypeDescription
Booltrue if open, false otherwise

Open #

Open video file or a capturing device or a IP video stream

method : public : Open(name:String) ~ Bool

Parameters

NameTypeDescription
nameStringdevice name

Return

TypeDescription
Booltrue if open, false otherwise

Example

cap := VideoCapture->New("video.mp4");
if(cap->Open("video.mp4")) {
  frame := cap->Read();
  frame->Show("First Frame");
  cap->Release();
};