webcamasm
- From: Frank Kotler <fbkotler@xxxxxxxxxxx>
- Date: Sun, 24 Jun 2007 07:01:48 GMT
I thought we'd get this out of Betov's Twelve Lessons thread...
John was saying...
> I have seen C++ programmers struggle with the documentation! One thing
> I have always wanted to do was access webcam data in real time. Have a
> look at the efforts by C++ and C# programmers to see what a convoluted
> dogs breakfast that is. And even they don't explain how they did what
> they manage to do and some complain how hard it all was.
But, but, but... I read in the glossy brochure that it was *easy* with HLLs! :)
The last time you and I discussed this webcam issue, I promised to borrow a camera from a roommate and see what I could figure out. What I remember fooling with, some time ago, plugged into the parallel port. I couldn't get as far as making the led blink with that one (from dos). What he came up with was usb connected. No usb ports in my old K6. :( I don't remember if I ever posted the end of that story, or just left you hanging... (I've got Adult Attention Deficit Hypo-activity Disorder, I think :)
However, that machine died, and this one *does* have usb! :) So I reacquired the camera. It is a "3Com Homeconnect" - apparently the same as "Vicam", which the old one was. First time I plugged anything into the usb port! (I *knew* there was something besides "booting from usb" that I wanted to try!)
So, armed with a hint from the webcam "howto", I looked in the output of "dmesg" for any mention of it. Sure enough, the camera was identified (as "Vicam") and is on /dev/video0. Okay... opening and reading that file turns the led on (That was easy!!!), and gives me "some bytes"!
Turning these bytes into an image isn't going quite as well. I'm closing in on it - I'm seeing 320*240*24, apparently. But not what I'd call "success" yet. I don't feel too bad about it - "xcam" and "xawtv" don't give a great image, either (better'n I've got!). "xawtv" complains that my X server doesn't have DGA support(???). I may need to upgrade software... or even RTFM! :)
But this won't help you. You do it entirely differently in Windows. According to that "fasmcam" demo, you use "avicap" - I suppose that's "avicap32.dll"? Do I understand you're getting images in a dialog-box? (and you're *complaining*???) If you want to post that program here and "rip it to shreds"... I don't know Windows, but those who do can probably help you get it to do something different - image in its own window, or whatever...
That's *if* you want to persue it in asm. To be honest, it isn't going to make your cam run any faster. In terms of manipulating the data between acquiring it from the camera and displaying it (or whatever), there *may* be some place where asm could make a difference - I suppose that's what those mmx instructions are good for(?). Mostly, I think a Basic app is going to work as well. Some of us think asm is "fun"...
Best,
Frank
.
- Follow-Ups:
- Re: webcamasm
- From: JGCASEY
- Re: webcamasm
- Prev by Date: Re: again findfirstfile problem:/
- Next by Date: Re: Rene can't handle AoA's Success
- Previous by thread: RosAsm install does not work.
- Next by thread: Re: webcamasm
- Index(es):
Relevant Pages
|