View Full Version : vb.net getting started question
May 24, 2005, 02:41:10
Sorry for the "beginner" question, but I'm comparing a few imaging packages for our development team and would really appreciate a quick pointer so I can see if MV will work for us --
I've spent a fair amount of time searching around the documentation and can't quite figure this out --
I have an mvp file with a blob finder in it that is working
I now want to read in the centerx and centery values into a vb.net application.
I have successfully used the AxMVIntegration tool based on the Player sample to loadconfig and get the video output playing in a window. Now I want to get access to some of the data inside the filters (namely centerx/centery)
First, should I be using the Integration Control or the Smart Control for this?
Second, what's the best place to find some documentation and/or a sample app in VB.net for doing this?
May 24, 2005, 12:07:42
Please use the MV Smart Control. This control is the newer one and contains much more functions. The MontiVision Imaging Filter provides (COM-)interfaces to setup the filter parameter and to get results from a filter. The MV Blob Finder proides the IMVBlobFinder interface. Please look into the online help to get more information about this (and other) interface. At the moment we have no .NET example for the MV Blob Finder filter but there is one for Visual C++ an VB6.0 available (look for "FindObject" example).
May 24, 2005, 12:48:52
Thanks for the quick response Bernd. I'll check the FindObject example in VB.
Is there a vb.net sample for getting results from any filter?
May 24, 2005, 13:07:14
The LiveDraw example shows how to get the interface from a filter and how to use the MV Smart Control.
May 24, 2005, 22:31:36
I played with the sample for a while, but I think I'm still one step short of understanding how to do this. One more question -- are there just a couple lines of code you can share that will let me do this?
I have an mvp file "b.mvp" with a BlobFinder and ObjectTracker in it, successfully putting a "+" on an object in the video stream.
In vb.net my code opens the mvp file and starts it, producing video on my screen:
Dim graph As MVSmartControl.IMVSCFilterGraph
graph = MVSC.GetOcx()
Now how do I get into my BlobFinder or ObjectTracker to get the x,y position from it?
Thanks for any help!
May 25, 2005, 14:25:35
Nevermind, got it. I was missing the imports statements...
August 31, 2005, 23:36:46
Ok, I am in the same position (attempting to gain information from a filter) and I am unsure of what to do. I am also confused about registering certain controls and such, I attempted to use MVSmartControl.GetOcx() but it just tells me that it is not a member of MVSmartControl. Any help would be greatly appreciated. Thanks.
September 1, 2005, 10:23:42
If it doesn't provides the GetOcx() method this object is not an ActivX control. Did you insert the control into the app like described in the online help? Do you use VB.NET or the old VB? In VB the control contains a Object property instead of the GetOcx() method.
To get a filter interface call the GetFilter() method from the IMVSCFilterGraph interface an initialize an interface variable.
Look at this thread (http://www.theimagingsourceforums.com/showthread.php?s=&threadid=317819) for a code sample. OK, is not VB.NET but it shows the way.
September 1, 2005, 15:34:54
Im using both enviroments, it actually doesnt matter to me which one I use. But for the time being lets stick with vb6. My problem is in the following code....
' Get the interface from the text overlay filter
Dim overlay As IMVTextOverlay
Set overlay = graph.GetFilter("MV Text Overlay")
Whenever I attempt to do this it tells me that "user defined type not defined". So is there some sort of file that I have not registered and need to? I have followed the user guide closely.
Thanks for your help!
September 1, 2005, 16:08:15
You have to add a reference to the filter type library. Select the project->references menu in VB and enable the MV Text Overlay Type Library.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.