Video tutorial on Motion recognition- Tripwire

This video present what is Tripwire used for and how can you recognize motion with tripwire.. In the video you will see how you can download the Ozeki Camera SDK from the official website. Then how you can integrate the SDK in a Visual Studio solution as a reference.

You can follow the video tutorial series, by starting with the first of them:

 
Download Video: Tripwire_tutorial_3.mp4

DISCLAIMER: Please note that the following features will only work if your IP camera supports the given functionality. So please check the user manual of your IP camera to make sure it supports the feature that you wish to implement in C#.

 

Transcript

Hello and welcome to the Ozeki Camera SDK tutorial video series on Computer Vision.

This is the third video in this series and it is about motion recognition. More closely it is about tripwires.

In the video you will see a step-by-step tutorial on how does a tripwire application works.

I hope you will like this video.

First let's see what is tripwire used for.

  • Tripwire is a passive triggering mechanism
  • The tripwire function can be an effective help if you wish obtain the security of your own business or even home.
  • The event will trigger in the case of any changes detected by the tripwire application.
  • For example, if you use belts in your business you can detect the changes in connection with the items placed on the belts.
  • Also the tripwire application can be an effective help in people counting.

Now let's talk about the Ozeki Camera SDK a bit.

This Ozeki Camera SDK has some great advantages.

It can be used easily, it is multifunctional since it is an all purpose tool. Plus it is an ONVIF compliant software.

Whether you are a beginner or an experienced C# developer you will be able to implement the solutions shown in this video.

There are some necessary tools you will need to get before you start building your application

These are the followings:

  • A Microsoft PC
  • .NET Framework
  • Visual studio
  • Some kind of camera
  • And the Ozeki Camera SDK

If you have these requirements you will be able to implement great computer vision solutions.

First we need to download the Ozeki Camera SDK from the www.camera-sdk.com website. On the homepage you click on the "download menu" then you click on the link and fill in the form with your name and e-mail address.

Once the download is ready we install the software. The installation is pretty simple. You just need to click on the next button then install. The installation will take a couple of minutes though. When the installation is done you click on the finish button and here we can see the Ozeki Camera SDK software product running on our computer.

Now you need to open the Visual Studio. After opening the Visual Studio project you have to add the OzekiSDK.dll to the references. You can do it in the Solution explorer, click on the References, Right Click, Add references. Here you can select the OzekiSDK.dll.

On the how to implement tripwire in C# webpage we can see where to access the Tripwire example. now We open our example program in the example folder.

First let's start with the using directives. We have to add some namespaces from the Ozeki SDK to use its components such as WebCamera or the Tripwire.

In case of the program we check the stream of a web camera to see if something passes the given line. In this case an event is triggered. For this we need a WebCamera instance, a Tripwire instance and a MediaConnector instance which will be used for connecting the image of the web camera to the tripwire and to the UserControll on the GUI which will display the picture.

With the Point 1 and Point 2 you can create a straight line, this is where you determine where the line will be. You can also examine here if something passes the line.

This is a constructor part. This constructor runs first when you start the program. It sets the necessary variables into default state, it initialize them.

This event handler will be triggered when you click on the connect button.

First the event queries the default web camera from the computer. Then the image coming from the camera is forwarded to the tripwire component which will forward the processed image to an image provider that will display the image to the WinForms GUI. Finally we start the camera and the UserControl on the GUI to display the image.

This method is the event handler of the Start button. After the method has been called, the application will set the properties of the tripwire component and start it with the Start() method.

Here are the properties like the color of the line or the color of the motion highlight.

Subscribing to the TripwireMotionEnteredToLine event we will be notified when an object entered to the given line.

Subscribing to the TripwireMotionLeaveFromLine event we will be notified when an object left the given line.

This event will be triggered when a motion passes the line.

In case of this event the motion cannot be sensed any longer on the line.

This method will be called when the motion can be sensed on the line.

These events are necessary when you determine the line. You can move these lines and when a motion passes the line the tripwire will notify you.

I connect a USB camera to my PC.

Then I start the application. I click on the connect to web camera button. Then I click on the start button. And now we can see the red line. When there is motion on the image it is detected and it is marked by blue color. And now I stop the application.

As you can see this Camera SDK is an all purpose tool which is easy to use and it is an ONVIF compliant software.

If this tutorial video attracted your attention then go and check out our website at www.camera-sdk.com. Here you can find many examples and free source codes regarding Computer Vision technology. Also Here you can download the trial version of the software. Plus you can follow our tutorial videos too.

If you have any questions then send us an email to the info@camera-sdk.com email address.

In the next video you will see a step-by-step tutorial on object detection.

I hope you liked this video. See you next time!

More information