0
我已經從網上覆制了一個攝像頭圖像捕捉教程。它工作正常。當我按下表格上的一個按鈕時,我想要觀看一個變化的場景並將拍攝的圖像保存到磁盤。檢測到按鈕按下,但我無法保存圖像。這是主要的代碼。我嘗試了兩種保存方法,但都不起作用。我錯過了什麼?emgu cv將圖像保存到vb文件
Sub ProcessFrameAndUpdateGUI(sender As Object, arg As EventArgs)
imgOriginal = capWebcam.QueryFrame() 'get the next frame from the webcam
If (imgOriginal Is Nothing) Then 'if we didn't get a frame
Return
End If
If btnStackPressed = True Then 'is button pressed?
btnStackPressed = False 'clear the button
imgOriginal = capWebcam.QueryFrame() 'get the next frame from the webcam
End If
ibOriginal.Image = imgOriginal 'display the current image in the imagebox
cvSaveImage("C:\imagesaved.bmp", imgOriginal) 'save current image as bmp
imgOriginal.Save("C:/MyPic.jpg") 'save current image as jpg
End Sub