0
私はラップトップでカメラを使用するためにAForge.Videoを使用しています。 しかし、カメラでキャプチャしたビデオが中央にないのはなぜですか?以下はAForge.Video - カメラが中心にない
私のコードです:
Dim videoDevices As FilterInfoCollection
Dim videoSource As VideoCaptureDevice
videoDevices = New FilterInfoCollection(FilterCategory.VideoInputDevice)
videoSource = New VideoCaptureDevice(videoDevices(0).MonikerString)
AddHandler videoSource.NewFrame, AddressOf Me.video_NewFrame
Sub video_NewFrame(sender As Object,
eventArgs As NewFrameEventArgs)
Dim bitmap As Bitmap
Try
bitmap = eventArgs.Frame
If Not bitmap Is Nothing Then
PictureBox1.Image = DirectCast(bitmap.Clone(), Bitmap)
PictureBox1.Refresh()
End If
Catch
End Try
End Sub
ありがとう!