it is a 64 bit and 32 bit Image Thumbnail SDK for Windows Developers who need to display image thumbnail browser in C#, C++ , VB.NET , VB6, Delphi, MS Access, VFP.
Video Editor SDK that allows users Drag & Drop to arrange clip orders, edit movies, apply effects & transitions with C , C#, VB.net , VB, Delphi, VFP, MS Access.
Platform : Windows 10, Windows 8, Vista, Windows 7, XP
For Windows Developers who need to view IP Camera, add video capture with overlay text, image, chroma key effect, face detection, motion detection with C++ , C#, VB.NET , VB, Delphi, Vfp, Ms Access, Labview.
Step 1: To install the VideoCap Pro ActiveX Control, begin by launching the setup file (http://www.viscomsoft.com/demo/videocapprosetup.exe). Select the desired installation folder for the VideoCap Pro ActiveX and continue with the installation on your development computer.
Step 2: Create New Visual Basic Project, select Windows Application.
Step 3: The next step is to install VideoCap Pro ActiveX in ToolBox. Select Toolbox, select Components item, right click mouse button, select Choose Items...
Step 4: Select COM Components tab, select VideoCap Pro Control , click OK.Step 5: Now you will see the VideoCap Pro ActiveX's icon on toolbox, drag it to form.
Step 6: Create the UI like the following screen. 3 combo box, one button , one listbox and 5 label control.
Step 7: In form load event, add the following code
For i = 1 To 100
cbosen.Items.Add(i.ToString())
Next
cbosen.SelectedIndex = 50
For i = 0 To AxVideoCap1.GetDeviceCount - 1
cbovideodevice.Items.Add(AxVideoCap1.GetDeviceName(i))
If cbovideodevice.Items.Count > 0 Then
cbovideodevice.SelectedIndex = 0
End If
For i = 0 To AxVideoCap1.GetVideoFormatCount - 1
cbovideoformat.Items.Add(AxVideoCap1.GetVideoFormatName(i))
If cbovideoformat.Items.Count > 0 Then
cbovideoformat.SelectedIndex = 0
End IfStep 8: In Start button click event , add the following code
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
AxVideoCap1.Device = cbovideodevice.SelectedIndex
AxVideoCap1.VideoFormat = cbovideoformat.SelectedIndex
AxVideoCap1.EffectType = VIDEOCAPLib.MYVIDEOCAPEFFECTTYPE.MOTIONDETECTION
AxVideoCap1.EffectMotionSensitivity = 50
AxVideoCap1.Start()
End SubStep 9: declare public iCount integer variable
Public Class Form1
Dim iCount As Integer
Step 10: Select VideoCap Pro ActiveX on form, In Properties window, select Events, add MotionDetected event hander. In this handler add the following code.
Private Sub AxVideoCap1_MotionDetected(sender As System.Object, e As AxVIDEOCAPLib._DVideoCapEvents_MotionDetectedEvent) Handles AxVideoCap1.MotionDetected
ListBox1.Items.Add("Motion Detected at " e.iLeft.ToString " " e.iTop.ToString() " " e.iwidth.ToString() " " e.iheight.ToString() " Sensitivity " e.iSensitivity.ToString)
If ListBox1.Items.Count > 0 Then
lbleventcount.Text = ListBox1.Items.Count
ListBox1.SelectedIndex = ListBox1.Items.Count - 1
iCount = iCount 1
End Sub
Step 11: Run the project, click the Start button, left click the mouse on preview video window, you may adjust the selection rectangle on your object.In list box, you will see the selection rectangle size.
In this sample, the selection rectangle position is 352, 243, 155, 176
Step 13: Now we want to snapshot the images when someone want to get the bear. so you need declare public dir string variablePublic Class Form1
Dim dir As String Step 14: In form load event, update the following code, we will create Motion Detection Sample folder and stored the image in this folder.
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
dir = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
dir = System.IO.Path.Combine(dir, "Motion Detection Sample")
If Not System.IO.Directory.Exists(dir) Then
System.IO.Directory.CreateDirectory(dir)
iCount = 0
End SubStep 15: update the code in MotionDetected event hander. When motion detected, it will save to JPG file.
Dim strSnapshotFileName As String
strSnapshotFileName = dir "\" DateTime.Now.ToString("yyyy-MM-dd-HH-mm-0ss") ".jpg"
AxVideoCap1.SnapShotJPEG(strSnapshotFileName, 99)
End SubDownload the source code of the Motion Detection Sample
info@viscomsoft.com (General information)
sales@viscomsoft.com (Sales)
support@viscomsoft.com (Support)
Copyright © 2009-2022 Viscom Softwares. All rights reserved.