Dim mVideoCapture as OCVVideoCapture
' VideoCapture allows several initialization options, depending on what we want to open
mVideoCapture.Initialize2( 0 ) '<-- Select webCam. Usually, 0 will be you laptop's integrated cam. If you have other USB-connected UVC cams, their index can be 1, 2,...
mVideoCapture.Initialize1( myVideoPath ) '<-- open a saved video.
mVideoCapture.Initialize1( myStreamingURL ) '<-- myStreamingURL can be any IPCam public IP address, or a movie's streaming URL, ..
' In order to know if it has been able to open the stream...
if Not(mVideoCapture.isOpened) Then
Log("Could not open VideoCapture")
return
End if
' Now we want to acquire frames to do "something" with them. Take into acocunt that the speed at which frames are delivered will depend on their source and nature.
Dim vcMat as OCVMat
If mVideoCapture.read(vcMat) Then
Dim vc2 as OCVMat
mCore.bitwise_not1( vcMat, vcMat2)
Imageview1.SetImage( Utils.MatToBitmap(vcMat2) )
End if
mVideoCapture.release ' When we are done, just release the resources