USB/Firewire "Branching" -- Is it Possible?
Shaze asks: "I have been doing a lot of overseas web conferencing lately and have been playing around with my two webcams. I was suddenly intrigued by the idea of being able to 'span' or 'branch' both webcams together to create one device pulling signals from both. I did some quick research on the topic to no avail, however many of my colleagues believe this to be possible. Some even going so far as to say they have seen software or drivers that will turn your webcams into one Twain device. Aside from my own meanderings, I can't seem to find any information on anyone or anything even suggesting this is possible. What do you say Slashdot readers: Is this a new application waiting to be marketed or am I just seeing double?"
What do you hope to acomplish by doing this? Stereovision?
Does it have to be real time?
In short, why?
-- MarkusQ
The one thing that jumps into my mind is depth, but this would only work if a mean was taken between both. What about the areas that are seen differently from the cam, there would need to be some filter work done i guess.
Carpe meam simiam!
What is it you're trying to do? The words "Span" and "Branch" mean about as much to me as.. Saying you want the webcams to "Regulate" and "Press"..
Likewise "One device pulling signals from both" is equally nondescript. I have plugged two USB cameras into one machine before. There is no problem doing this. If you want them to both work at the same time, you'll have to use seperate host controllers or USB 1.1 cameras on a USB 2.0 bus.
Technically, it is possible to read simultaneously from 2 webcams. It is well within the bandwidth bounds of USB 2.0 and IEEE 1394.
However, this would probably require a total software rewrite to enable. I don't imagine drivers would need major revisions, fortunately.
My main question, though, is why? Unless you plan to red/blue shift the objects based on apparent depth and require people to wear stupid glasses, you won't see any interesting effects.
I think we should be more concerned with bringing up the audiovideo quality of videoconferencing.
The catches are:
There are probably computers out there with enough horsepower (stop looking at me like that, you may not borrow the dual G5, my precioussss...) to take 2 typical little video streams from webcams and do something with them in real time.
What something is remains unknown, but for example you could slap the images side-by-side, or you could composite one over the other, or you could compare them for differences, or insert 1 frame of stream 2 into stream 1 every 30 frames for subliminal purposes, or whatever.
What I think the writer is asking is if it is possible to have two cameras and stitch the feeds together so it's twice as wide. Like having two monitors but as inputs rather than outputs. I'd assume that it is quite possible to write a program that would listen to both devices and put the feeds next to eachother but I'm not sure why you'd want to do this.
Yawn.
There are a number of computer vision devices composed of a pair of cameras that are treated as a single device. (They must be treated as such in some applications because the cameras must grab images in lockstep.)
I've never seen something that uses one USB and one Firewire camera, though. To me, it makes just as much sense to use two FireWire cameras or two USB 2.0 cameras since the bandwidth of USB 1.2 is so small. I did some computer vision work as an undergrad with a single Logitech Quickcam Express. The camera grabbed 24 bit 320x244 images at a rather low framerate - something like 10 or 15 fps. This took up 90% of the USB's bandwidth!
If you want to, you might be able to write a driver that allows you to treat the two as a single TWAIN device, but I imagine the possibility of such a task is highly OS-dependent. I haven't taken a good look to check, but it seems like it would be possible to do so under the Video4Linux framework. MacOS and Windows, I have no idea.
At my current job, we use dual FireWire cameras to capture simultaneous images in order to get two concurrent views of moving objects.
Hooking two cameras to a computer is standard practise in computer vision (not what my current employer does, just another example). It's a really good way to get binocular views of a scene for passive stereo systems.
Besides, you don't need goofy red/blue glasses to look at stereo pairs of images. Just cross your eyes, for goodness sakes!
I've seen old Amigas with toaster cards that can do some interesting stuff with combining two video streams in realtime.
Well, that's all well and good, but even though there's one-to-one Internet video conferencing technology good enough that TechWeb thought it was a satellite feed when they saw it last week, it still needs extensions to support one-to-many, many-to-one and many-to-many conferencing.
And even then you'd still have the onerous task of convincing everyone to use iChat AV. After all, it's an Apple product, and everyone knows that Windows users aren't going to want to use an Apple product!
Please DON'T cross your eyes to view stereograms. This is known as "freeviewing" and I can attest from personal experience that it will eventually damage your vision. Long term use of freeviewing is well known to gradually ruin your vision. So DON'T do it, invest in a cheap plastic stereo viewer, that should only cost you a couple of bucks. Otherwise, it will cost you your vision.
The correct softare answer depends on why you want to use two cameras. One solution is to write a "user space driver" that stitches the two image sources into a single picture and creates either a service stream or a virtual device that negotiates the incompatabilities between the cameras. The simplest solution is just to enable your software to use two cameras and two images that are then displayed in two windows or in one data stream or are used to perform stereoscopic vision... or... ah... two angles of the same scene? What do you want to do? Why do you want to do it? What is the application? What software do you already have?
Requirements drive design. I've never seen a situation where design drove requirements. I wouldn't even know how to proceed.
I can imagine an engineer playing around with the idea of an underwater grill just to prove he can do it. Who would use it? Why would you need an underwater grill?
[signature]
If you want stereovision, it's easier to just get a beamsplitting prism rig and attach it to a single camera. These are fairly common in photography shops, here's a good example:
S cr een=PROD&Product_Code=LOR-LICeos&Category_Code=jl- ncam&Product_Count=28
http://www.3dstereo.com/Merchant2/merchant.mvc?
Another approach that would be more universal (i.e. can put any 2 video signals together) would be to preprocess it with conventional analog TV split screen gadgets, the 2 video inputs are merged into one video output. I've seen consumer-grade effects panels that are cheap enough for this task but I'm too lazy to go look it up.
When I read the incredibly badly worded and obviously unedited question.
Yay me!
I have multiple cameras working quite well under QNX, but I wrote that driver. It only uses about 4% of the (1.5GHz) CPU per camera at 640x480 x 15FPS RGB, so it's a modest CPU load. I don't get the image tearing problem Windows does, so the hardware can do the job; it's a Windows problem.
The Linux FireWire driver subsystem has some major problems in the bus reset area and doesn't handle multiple bus masters properly. The last time I looked at that driver, it didn't allocate isochronous channels properly; everything went on channel 0. That limits you to one active camera. But that may have been fixed by now.
Yeah, it's probably possible to do. However, you'd be much better off creating an application that just read from N devices at a time and displayed them in the manner that you want to have them displayed.
Custom driver == expensive (either in time... or money or both)
Probably not exactly what you're looking for, but it is another possible solution. I've been using WebcamXP to do just that, but HTML based. It can use up to 5 cameras at the same time (I've used up to 3 at the same time; 2 USB webcams and my camcorder plugged into my Firewire port). I've modified the HTML it generates to put the windows side by side. You'll get the small border around each window, but at least to me, that's not a huge deal.
It's better to burn out than to fade away
How stoned were you?
Just curious...
Yeah, yeah, and garlic contains animal fat, mould has roots, you'll catch a cold if you don't dry the inside of your coffee mug properly, distilled water is poisonous and you can get the piles sitting on hard concrete floors.
So I'm curious--do you use a Mac for that? If so, are you willing to describe more about what you do/where you work? I know that Macs aren't the only things with FW, but they're most of what I see actually using it...
You're welcome to reply off-list if you prefer.
--
$tar -xvf
Yeah, yeah, and garlic contains animal fat, mould has roots...
You forgot 'hairy palms'. What have AC's come to?
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
The intel Open Source Computer Vision Library They have tools to process stereo usb cameras in real time
Everything the Amiga was doing with the two (actually the toaster has a 4 input switcher; the demo VHS said this OVER and OVER again back in the day... four input switcher! with the four input switcher... the four input switcher...) was being done by the toaster. This is obviously true because even a 68000-based Amiga 2000 can drive the toaster, the Amiga is just an interface. The toaster was far and away a more powerful system than the computer wrapped around it.
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
exactly how does freeviewing damage your vision? how badly was yours damaged?
I had perfect 20/20 vision, and after a few years of freeviewing, I became significantly far-sighted. Forcing yourself to go cross-eyed and deliberately focusing your eyes unnaturally, as is the standard method in freeviewing, will gradually degrade your fine muscle control that allows your eyes to focus accurately.
Whenever somebody says something is "well known," it means they can't prove it. Why don't you offer some evidence that what you're saying is true?
Wireless camera. TV input card with 2 input channels. Software fast-swapped between the channels and grabbed images.
Did this happen starting in your twenties? I find this a more plausible explanation, unless somehow you found occasion to "freeview" at stereograms for hours a day??
There are no karma whores, only moderation johns
I had perfect 20/20 vision, and after a few years of freeviewing, I became significantly far-sighted.
So since I'm naturally nearsighted, I should do it more so that my vision becomes normal?
Oh, say does that Star-Spangled Banner entwine / The myrtle of Venus with Bacchus's vine?
Yes, I worked at the USGS in my 20s and I spent a LOT of time freeviewing big stereograms. The photogrammetrists all told me not to do it, they all told me about how it would damage my vision, but I did it anyway, and now I regret it. I told them to get me one of those nice Zeiss stereoscopes like the other departments used, but they didn't have the budget (these were big 10in stereograms, and those viewers cost hundreds of bucks).
l
You can buy a cheap stereoscope for general use for between $2 and $6, is your vision worth more than $6?
http://stereoscopy.com/reel3d/print-viewers.htm
My main point was, how can you be so certain that the normal aging process didn't make you farsighted and make focusing more difficult?
There are no karma whores, only moderation johns
Presbyopia doesn't set in until your 40s, most people with 20/20 vision experience no changes until their 40s. This wasn't normal aging. Sure, aging is part of the process. Do you want to accelerate the process? Or would you rather spend $2 on a stereoscope?
Maybe it doesn't damage your vision - but do you really want to take that chance when you can cheaply avoid it. Better safe than sorry eh?
At least, not under Linux. No shortage of bandwidth on USB 2.0, and the USB software has no trouble handling a squillion cameras all at once.
Perhaps he's hoping to glue together enough webcams to get decent resolution? (-:
Got time? Spend some of it coding or testing
It barely handles multiple devices at all.
After all, TWAIN is not SANE.
Got time? Spend some of it coding or testing
"At my current job, we use dual FireWire cameras to capture simultaneous images in order to get two concurrent views of moving objects." aka "I do tech support for webcam porn" :D
Some even going so far as to say they have seen software or drivers that will turn your webcams into one Twain device.,.EEE;LKJJHHHGGGFGFASDFGHJKL;QWERTYUIOP^C=- 09876654321/
*/-+ .....000000321654987*/9876541234123423453456AEFGXS VB;LQRT09E., POADMN3RTK.,AM,FBJVB=0346/
E;-04325-9upamnveoi =134cijgfl eq=0oiq3bn=afdkmsd9ckmgma=9uy1.,m fgmcv j=09;KLMMAFVOIH3QRM EDF J=0IUMNEAQGC0FBEMFE., 5IFBIFJBEQ3,4 TEQJR=09UBA,FG.,G B,B 09G
So if you setup two video cams under Windows one using usb2 and the other firewire, then your drivers might work on a Toyota racing engine.I doubt they will work under Windows. Getting anthing to be a twain interface other than a scanner under Windows might be dll hell and need drivers as good as Micheal Andretti to use it. Especially firewire to twain. The twain interface is the main reason why for video editing, most pros use Apple.
I bet you could join the two webcam images on Linux using video4linux, then output it to a local loopback allowing the joined image to appear as it's own webcam.
You can be both nearsighted and farsighted at the same time. That's what bifocals are for. If you don't want to need them, I wouldn't go courting farsightedness just yet.
It's hard to be religious when certain people are never incinerated by bolts of lightning.
If you just want your conferencing partner to see both your cameras, then why don't you simply launch two copies of the application?
I once saw a man with a hat that held soda cans and spliced two straws together.
This guy was able to enjoy 24oz of carbonated refreshment instead of 12, but looked like a total ass.
Conformity is the jailer of freedom and enemy of growth. -JFK
lurking with pron tech providers. I think they may seen the commercial opprtunities of this. Why not hunt around where the porn tech providers hang out.
Haven't they led most of the practial/commercial advances in this area?
The Singularity is closer than you think
Quant
That's very interesting - you mean a regular TV input card that rapidly tuned between 2 input channels coming over the one cable, right? I was thinking of doing something like this for a homebrew PVR. Can you tell me how fast could it swap between channels? (i.e. what fps did you get per channel?)
Actually, it was an input-card with 2 input channels on 2 seperate (RCA) jacks if I remember correctly.
And as for FPS... I think it was a bit jerky as it was used to record between two monitoring devices (where a little stutter is not too bad) and might not be suitable for PVR recording, but then the software (custom-made) wasn't too great either. I'm not sure the channel-swapping was at fault though.
For hom applications, you could probably get away with a standard TV-input card. The per-channel FPS would be fine, and even with my old ATI (and earlier) cards the channel-swapping was pretty fast, and some support dual-channel input.
Thanks Phorm. Much appreciated!