I'm trying to save my video using savefiledialog but i have no idea how to modify the code -> Dim destination As
Can anyone please help me out? :(
------------------------------------------------------------
String = "C:\Users\Emily \Desktop\Video. mpg" into savefiledialog method where the user can choose to save in any folder and name the video to any name they want.Can anyone please help me out? :(
------------------------------------------------------------
Code:
Imports Emgu.CV
Imports Emgu.Util
Imports Emgu.CV.Structure
Imports System.IO
Imports System.IO.Ports
Public Class Form2
Dim Capturez As Capture = New Capture(0)
Dim Videoz As VideoWriter
Dim imagez As Image(Of Bgr, Byte)
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
Dim destination As String = "C:\Users\Emily\Desktop\Video.mpg"
Dim compression As Integer = CvInvoke.CV_FOURCC("D", "I", "V", "X")
Dim fps As Integer = 9.5
Dim width As Integer = 640
Dim height As Integer = 480
Dim color As Boolean = True
Videoz = New VideoWriter(destination, compression, fps, width, height, color)
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
imagez = Capturez.QueryFrame().Flip(Emgu.CV.CvEnum.FLIP.HORIZONTAL)
PictureBox1.Image = imagez.ToBitmap()
End Sub
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
Videoz.WriteFrame(imagez)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Timer1.Start()
Timer2.Start()
End Sub
Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
Timer2.Stop()
End Sub
End Class