Infrared diodes tracking class.
Namespace:
MotionTrackingAssembly: motiontracking (in motiontracking.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Class Camera _ Implements IDisposable |
C# |
---|
public class Camera : IDisposable |
Visual C++ |
---|
public ref class Camera : IDisposable |
JavaScript |
---|
MotionTracking.Camera = function(); Type.createClass( 'MotionTracking.Camera', null, IDisposable); |
Remarks
To use the Camera class, OpenCV1.1 pre and
MSVCRT 8.0 SP1
need to be installed.
To enhance the infrared detection, disable the auto-mode of the Exposure function of the camera and reduce the exposure time
of the camera. (5% is usually a good value)
A tool like VidCap (VIDCAP32.EXE) can be used to change the settings of the webcamera.
Examples
This example shows how to suscribe to CameraFingerChanged event to retrieve the position of the fingers diodes.
![]() | |
---|---|
private Camera fingersTracking; public void InitializeCamera() { //Camera initialization //Do not forget to disable the automatic mode of the exposure option of the webcam with a tool like VidCap (Vidcap32.exe) fingersTracking = new Camera(ResolutionWidth._640, ResolutionHeight._480, ResolutionWidth._1024, ResolutionHeight._768); fingersTracking.Connect(); fingersTracking.CameraFingerChanged += new Camera.CameraFingerChangedHandler(OnFingersPositionUpdated) fingersTracking.TrackInfraredDiodes(); } private void OnFingersPositionUpdated(object sender, OnCameraFingerChangedEventArgs e) { } |