Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, February 1, 2007 12:27:19 AM(UTC)
newmiadpe

Groups: Registered
Posts: 13


Hi all!

I'm developing a software and I need to do the following...

I need to reproduce an AVI video. After this, I need to detect motion in a particular zone of it and, when I detect it, I need to save frame by frame to BMP... And finally, I need to do the same but with a capture card instead of an AVI video...

Could anybody help me? what functions I need to look?? Any examples???

Thanks a lot!!!!

Miguel Angel.

 

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Friday, February 2, 2007 12:12:04 PM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


To play an AVI file, you will need to use the ltmmPlayCtrl.  You can set the file to be played with the SourceFile Property.  There is already a demo in your Examples\ltmm\[interface]\ directory that shows how to do this along with many other things with the Play Control.

To do motion detection, you will need to implement the LEAD Motion Detection Filter.  There should be some sample code in the Filters Help file.  You can use the callback's information to make a decision as to when to save a frame based on motion changes.

You can save a frame by using the SaveStillBitmap method of the play control or the capture control.

To capture with a card, use the ltmmCaptureCtrl rather than the PlayCtrl and set it's selected video device to the capture card you wish to use.  There is also a sample project for the capture control that ships with the toolkit.
 
#3 Posted : Sunday, February 11, 2007 2:06:47 AM(UTC)
newmiadpe

Groups: Registered
Posts: 13


Hi Greg!

Thanks for your reply!

I'm now testing a VB demo that I wrote with an AVI --> Motion detection functionality. I've now two doubts...


1) I want to indicate a zone to the motion detect, so I call the ltmmPlay.ShowDialog ltmmCapture_Dlg_SelVideoProcessor, hWnd
that shows me the dialog box to indicate a delimitated zone for the motion detect. Can't I indicate the zone without call this dialog box??


2) When I reproduce the AVI video frame by frame (with a button click),
the lEvent of the ILMVMtnDetUserCallback_CallbackProc don't change it,
so I can't know if there is motion or not... Is not possible to know if there is motion between two consecutive frames??

Thanks all!!!

Miguel Angel.
 
#4 Posted : Tuesday, February 13, 2007 9:06:19 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


1.  Yes, you can add and edit a filter's properties without showing its dialog.  Basically, you need to loop through the list of available processors to find the index of the one you actually want to add.  Once you have done this, you can set a global property to the instance of the filter that is currently in use by your application by using something like this:

Set lmvMtnDetFilter = ltmmPlayCtrl1.GetSubObject(ltmmPlay_Object_SelVideoProcessor)

After you have done this, you can access any of the properties of the Motion detection Filter by using the lmvMtnDetFilter object.

2. The lEvent property of the callback should have a value of 0-3 depending on the state.  Most likely, your sensitivity is either too high or too low to notice any changes.

I've attached a sample VB 6 project that shows you  how to programmatically add and edit the Motion Detection Filter 2.0.  This project will allow you to change both the region in use and the sensitivity.
File Attachment(s):
 
#5 Posted : Tuesday, February 13, 2007 9:54:34 PM(UTC)
newmiadpe

Groups: Registered
Posts: 13


Wow! thanks a lot Greg!!!! As soon as I can I'll test it!

Miguel Angel.

 
#6 Posted : Sunday, February 25, 2007 12:18:23 AM(UTC)
newmiadpe

Groups: Registered
Posts: 13


Hi again Greg!!!

I've a doubt... when I tested your program a dialog box like the attachent file appears me... I bought the Multimedia Leadtools Kit... I've to buy another thing??

Thanks!!!

Miguel Angel.

Innomedia Seguridad Digital S.L.


majc@innomediaseguridad.com
newmiadpe attached the following image(s):
MotionLEAD.JPG
 
#7 Posted : Monday, February 26, 2007 11:39:07 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


That is correct.  The LEADTOOLS Multimedia SDK does not come with all of the DirectShow filters, you have to purchase most of them separately.  Take a look at the LTMM product comparison chart to see what comes with your toolkit:

http://leadtools.com/SDK/Multimedia/pcmpchtMM.htm
 
#8 Posted : Tuesday, February 27, 2007 12:56:06 AM(UTC)
newmiadpe

Groups: Registered
Posts: 13


thanks Greg! I'm going to take a look... :-)
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.092 seconds.