Skip to content

MotionDetector_UseThisReferenceSample

method

Delphi
function MotionDetector_UseThisReferenceSample (Bitmap_: LongInt; BMPFile: string; JPEGFile: string): Boolean;
C++Builder
bool __fastcall MotionDetector_UseThisReferenceSample(Vcl::Graphics::TBitmap* Bitmap, System::UnicodeString BMPFile, System::UnicodeString JPEGFile);
C#
public bool MotionDetector_UseThisReferenceSample(IntPtr Bitmap_, string BMPFile, string JPEGFile);
VB.NET
Public Function MotionDetector_UseThisReferenceSample(Bitmap_ As IntPtr, BMPFile As String, JPEGFile As String) As Boolean
C++/Qt
BOOL MotionDetector_UseThisReferenceSample (HBITMAP Bitmap_, wchar_t *BMPFile, wchar_t *JPEGFile);

Lets you specify a video frame that will be used as reference for motion detection, instead of the previous frame.

The frame can be passed in 3 ways, by using one of the 3 parameters:

  1. Bitmap: as a pointer to a TBitmap (or a bitmap handle in the OCX versions), e.g.:

VideoGrabber.MotionDetector_UseThisReferenceSample (MyTBitmapReference, "", '"");

  1. BMPFile: as a path to a BMP image, e.g.:

VideoGrabber.MotionDetector_UseThisReferenceSample (nil, "MyBitmapReference.bmp", "");

  1. JPEGFile: as a path to a JPEG file, e.g.:

VideoGrabber.MotionDetector_UseThisReferenceSample (nil, "", "MyBitmapReference.jpg");

To deactivate the feature and reuse the last frame as reference, pass empty parameters, e.g.:

VideoGrabber.MotionDetector_UseThisReferenceSample (nil, "", '"");