Subject
- Posted on
mavis webcam code
- 09-07-2006
September 7, 2006, 7:52 pm
Hi,
Has anyone being using the Mavis code,
http://robinhewitt.com/mavis/index.html
with respect to the Leaf robot project,
http://members.cox.net/rbirac/
?
I was interested in using it and wondered
if any other hobby robotists have already
done so and in particular what language
they used with the dll?
My problem as a Basic and c programmer is
deciding what c++ compiler to use and where
to find suitable tutorials on win32 using
that compiler.
I have *played* with vc5 but the teach
yourself vc5 in 21 days didn't really help.
It is also incompatible with the vc6
examples I find on the net.
The latest free vc++.net 2005 express I find
in incompatatible with everything before it
including vc++.net 2003. There is a conversion
program but it always seems to fail. I haven't
found a tutorial for vc 2005.net
I have downloaded Dev-cpp but again there is
a lack of compiler specific tutorials for
that product as well.
I was able to run the CImage demos with it
and they are rather good. The vc.net 2003 demo
failed because I have vc.net 2005.
http://cimg.sourceforge.net/
However they forgot to add a GrabImage() from
a webcam method :)
--
John
Re: mavis webcam code
is using it. She also wrote a multi-part article for SERVO magazine
you'll want to find as well.
She wrote the DLL in C++, but you can use any programming language that
can interface to a standard Win32 flat DLL. That's the benefit of a
Windows DLL; it doesn't matter what language the person used to code it.
You do not need C, unless that's the language of choice for you. VB6 or
VB5 could just as easily use those DLLs.
-- Gordon
JGCASEY wrote:
Re: mavis webcam code
Yes I have just sent Robin an email for suggestions but
don't know what sort of reply she has time to give.
Deciding on a language has always been something of problem
for me. I really only know standard Basic and C. Recently I
have been playing with c#.net 2005. In true M$ tradition
it is incompatible with everything before it including the
c#.net 2003 sources I found on the net!! And that includes
the source code for the WiMo robot project you made reference
to in a recent post, subject RobotRealm. I have rejected the
RobotRealm software at this stage. I don't really like its
proprietary rights. Ideal software I think would be C++ with
Linux/Windows compatible libraries for things like webcams.
Java comes close but I didn't like that language much, too
stuck with the old way of programming I guess.
I did play around with a webcam and vb5 many moons ago.
My interest in all this tends to wax and wane, mainly wane :)
Did a bit of image segmentation based on color but the grabs
were too slow for a real time vision system.
The problem is getting a programming language that is fast
enough and has the tutorials to explain, by stepping through
examples, how to do things like using a dll for hobby
programmers like me with limited spare time.
The problem is spending the least amount of time learning
what I don't need to know in order to work out what I do
need to know.
The leaf project is closer to what I would like to end up
building but with a robust body so that if I ever reached
old age I would have something to tend my needs :)
--
John
Re: mavis webcam code
I doubt this. While there are some modifications to the framework, there
are no synantical changes, so if your free version of 2005 doesn't open
a 2003 project it's probably because it's the free version. MS has to
make money somehow, and while they are giving away the 2005 Express
versions of their compilers, the full feature set of the IDE is reserved
for people who fork out the cash. This is a sad part of life.
My experience is that all my .NET 2003 projects open and run without
with virtually no hiccups in 2005 (some minor changes because if
anything MS got stricter with some coding styles), and I have some
extremely complex apps with tens of thousands of lines of code.
I know you've said this before but frankly, what else can you expect.
Your experience is with old, outdated software for which you'll be lucky
to find examples for.
But as I said, any Windows programming platform that can call a standard
DLL can interface to the Mavis library. A Microsoft Word macro could
even do this.
-- Gordon
Re: mavis webcam code
You can ask the Leaf group; their home page
is at http://www.leafproject.org/
Robin uses C++.
The non-visual Microsoft compiler is free
for for download. Unfortunately I have no
idea how to use it.
--
D. Jay Newman ! Author of:
jay@sprucegrove.com ! _Linux Robotics: Programming Smarter Robots_
http://enerd.ws/robots/ ! "Heros aren't born, they're cornered."
Re: mavis webcam code
I assume you are a Java man? I did begin to learn
Java a few years back so I guess I know 90% of the
basics of Java programming. I didn't think Java
would be fast enough for vision?
I did think about returning to Java after visiting
the generation5 site which seems to have died:
http://www.generation5.org/jdk/
It also had interesting articles on vision problem
by Bob Mottram.
http://www.generation5.org/content/2005/gpv.asp
Perhaps I should start revising my knowledge on
java and finish learning what I started. Have you
used the Java Media Framework API?
http://java.sun.com/products/java-media/jmf/index.jsp
--
John
Re: mavis webcam code
It depends on the platform. Java can be fast enough
for some types of vision. I've been thinking of
rewriting MAVIS in Java just so I can understand
it.
There code is still fairly good.
I've used it a bit. Unfortunately I don't remember
enough about it right at the moment because I've
been away at other projects.
--
D. Jay Newman ! Author of:
jay@sprucegrove.com ! _Linux Robotics: Programming Smarter Robots_
http://enerd.ws/robots/ ! "Heros aren't born, they're cornered."
Re: mavis webcam code
Can you rewrite framecap as that is the heart of the code.
Framecap is written in vc++ and has to be running "as a server"
to be used as a dll in other code. I compiled the fgDllUser
source code with the Dev-cpp IDE and it worked but I
don't understand why framecap has to be running first.
--
JC
--
JC
Re: mavis webcam code
Framecap is merely something that captures images for MAVIS
to deal with. MAVIS doesn't deal directly with the cameras.
This is purely my understanding. I have yet to mess with
the code more than trivially.
--
D. Jay Newman ! Author of:
jay@sprucegrove.com ! _Linux Robotics: Programming Smarter Robots_
http://enerd.ws/robots/ ! "Heros aren't born, they're cornered."
Re: mavis webcam code
Yes I understand it now. The fgClient.dll is just an interface to
framcap
which has to be running before you start your own program running.
Seems silly to me. An ideal situation would be to do what I did with
my old DOS cam. Just put all the capture stuff etc in a header file
so you can use image = GrabImage().
--
JC
Re: mavis webcam code
There are 3 main advantages to having Framecap running as a separate server:
1) you could actually have multple programs running simultaneously that
would grab images from the server.
2) Since it's a separate program, you could muck around with other code
all you want without screwing up the Framecap code - thus being
assured that it is working by checking it with another program that
uses the dll --- a big advantage during debugging !
3) By having access to Framecap being through a DLL, you only need to
link in a smaller portion of code to get your images, thus keeping
your final executable smaller than if you linked the entire code in with
each program you wrote. This is really only an advantage if you have
several different programs that you want to do frame capture in.
Otherwise, it makes just as much sense, as you noted, to just
link it via a header file.
Hope that helps a little bit !
JCDeen
Re: mavis webcam code
Robin Hewitt the author of mavis was kind enough
to explain her reasoning behind the software and
I don't think she would mind me duplicating it.
===
One reason for writing framecap as a server
application was to view live video feed without
having to write a custom application to do that.
Another reason was to provide an interface for
accessing the camera driver through an OLE
interface without having to stop and restart the
video feed. A third reason was to provide support
for distributed processing. Computer vision is
computationally demanding, and it's common to
process data from a single source on multiple
machines.
===
I may still use it with gcc or vc++.net once I get
the tutorials to get me up to speed.
I have a renewed interest in the subject, an interest
that waxes and wanes continually, mostly wanes :) as
someone has shown me another take on visual processing.
--
JC
Site Timeline
- » BVAI 2007 Call for Papers
- — Next thread in » General Robotics Forum
-

- » Buy Robot car?
- — Previous thread in » General Robotics Forum
-

- » evoMUSART 2013: First CFP (with correct dates)
- — Newest thread in » General Robotics Forum
-

- » OT: Spacex Dragon docking with ISS
- — The site's Newest Thread. Posted in » General Metalworking
-








