07-23-2007, 17:08
|
rkinney
Joined on 07-23-2007
Posts 7
|
ILMVMtnDet and detecting region of movement
|
 
 
|
|
|
Hello All,
Just wrote this into support, but thought I might post this here as well per suggestion of automatically e-mail generation reply.
Using VC++ 6.0 ILMVMtnDet library:
The following sample code illustrates what I am trying to do:
void CTestMotionDetectionDlg::OnSelectregion() { if(m_wndView.updateHotSpot) // don't worry about this... its going through correctly { pVideoDetFilter->put_EnableRegion(VARIANT_FALSE); pVideoDetFilter->StopDetection();
// HotSpot is also getting correct coordinates each time pVideoDetFilter->put_Left(HotSpot.X1); pVideoDetFilter->put_Top(HotSpot.Y1); pVideoDetFilter->put_Right(HotSpot.X1 + HotSpot.Width); pVideoDetFilter->put_Bottom(HotSpot.Y1 + HotSpot.Height);
pVideoDetFilter->put_EnableRegion(VARIANT_TRUE); pVideoDetFilter->StartDetection();
} }
It seems this works properly the first time it is called and I have selected and given HotSpot the coordinates for the first time. Works beautifully... only the area of HotSpot results in my CallBack getting called. However, when I change the coordinates and call OnSelectregion() again, the new coordinates do not work at all... somehow the library is still attached to the original coordinates and will not update. I must shut down the program, start it up, then select my new region.
I have tried every combination of calling the library, stopping detection (even the AutoStart stuff), starting detection, etc... but noting seems to work. Why is this? Am I not properly releasing and then initializing something again?
Hope someone can help.
Rob
|
|
|
|
|
Report
|
|
|
|