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) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| id | Int | device ID |
Return
| Type | Description |
|---|---|
| Bool | true 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) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| id | Int | device ID |
| pref | Api | Api prefernce |
Return
| Type | Description |
|---|---|
| Bool | true if open, false otherwise |
Open #
Open video file or a capturing device or a IP video stream
method : public : Open(name:String) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| name | String | device name |
Return
| Type | Description |
|---|---|
| Bool | true if open, false otherwise |
Example
cap := VideoCapture->New("video.mp4");
if(cap->Open("video.mp4")) {
frame := cap->Read();
frame->Show("First Frame");
cap->Release();
};