|
hi guys...
I design my GUI using vb...
when clicked, it calls Matlab and do getsnapshot
but the command "getsnapshot" works quite slow
it takes near 5 seconds to execute
when I do this in Matlab, it only takes less than 1 second
so is there anything I can do to improve the speed ??
many thanks
below is part of my VB code ...
Dim MatLab As Object
MatLab = CreateObject("Matlab.Application")
Dim h As Object
h = GetObject(, "matlab.application")
h.Execute("vid1 = videoinput('winvideo',2)")
h.Execute("set(vid1, 'ReturnedColorspace', 'RGB')")
Dim dteStart As DateTime = Now
h.Execute("img=getsnapshot(vid1)")
Dim TS As TimeSpan = Now.Subtract(dteStart)
MsgBox("completed?" & TS.TotalSeconds)
|