Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Re: ILMVMtnDet and detecting region of movement
Started by rkinney at 07-23-2007 17:08. Topic has 1 replies.

Print Search « Previous Thread Next Thread »
  07-23-2007, 17:08
rkinney is not online. Last active: 9/21/2007 4:19:55 PM rkinney

Not Ranked
Joined on 07-23-2007
Posts 7
ILMVMtnDet and detecting region of movement
Reply Quote
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 
  07-25-2007, 13:25
Adnan Ismail is not online. Last active: 3/19/2010 7:13:59 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 2,047
Re: ILMVMtnDet and detecting region of movement
Reply Quote

If you can't find the cause of the problem, please create a new test project (not your full application) that only creates and instance of our filter and tries to change its properties. If this small project shows the same problem, please send it to me in a ZIP or RAR file and I will check it for you.


Adnan Ismail
LEADTOOLS Technical Support

   Report 
Post
LEAD Support Fo... » Developer » Multimedia Filt... » Re: ILMVMtnDet and detecting region of movement

Powered by Community Server, by Telligent Systems