Slashdot Mirror


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?"

55 comments

  1. To what end? by MarkusQ · · Score: 1

    What do you hope to acomplish by doing this? Stereovision?

    Does it have to be real time?

    In short, why?

    -- MarkusQ

    1. Re:To what end? by mcdrewski42 · · Score: 1

      I'm guessing he wants two webcams which appear to a piece of video-conferencing software to be a single webcam comprising two images glued together.

      Sounds like he wants a camera aggregator driver which glues together 'n' webcams into a single, larger (or PiP style) image.

      I can't see that this is likely to be supported by anything. Most likely he'll want a piece of software which reads 'n' webcams in realtime and pastes them together (solving any refresh, synchronisation, resolution and format problems) and then presents that stream as a new, third aggregated webcam.

      Sheesh!

      --
      /* affect != effect */ void affect(int *thing,int effect) { *thing += effect; }
    2. Re:To what end? by heliocentric · · Score: 1

      Most likely he'll want a piece of software which reads 'n' webcams in realtime and pastes them together (solving any refresh, synchronisation, resolution and format problems) and then presents that stream as a new, third aggregated webcam.

      You forgot free, by tomorrow, and with as little work from himself as possible.

      --
      Wheeeee
    3. Re:To what end? by HTH+NE1 · · Score: 1

      If his plan was to use three webcams, perhaps he'd be planning to become the next Des e-Arnaz.

      --
      Oh, say does that Star-Spangled Banner entwine / The myrtle of Venus with Bacchus's vine?
  2. depth by lowtekneq · · Score: 1

    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!
  3. Uh, what? by GoRK · · Score: 0, Redundant

    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.

  4. Possible, but pointless by jam244 · · Score: 2, Informative

    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.

  5. Well... maybe not with webcams, but... by dbirchall · · Score: 1
    I'm pretty sure I've seen scenarios where a SAN was hooked to two different computers or whatever, which could conceivably happen over FireWire (though Fibrechannel might be more common).

    The catches are:

    1. The thing that's being hooked to both other things being smart enough to realize that it's hooked to two things instead of one, and not get confused.
    2. Actually doing whatever it is you want to do (which starts with knowing what you want to do).

    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.

    1. Re:Well... maybe not with webcams, but... by Hast · · Score: 1
      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.

      Most modern computers today have 3D accelerators in them. Those cards are basically built to do image processing in hardware. (Naturally they are made to transform 3D -> 2D, but the math is largely the same so it doesn't matter.)

      I've only seen stuff about this in academic papers though, so it may be some more time before you see actual applications which use 3D cards for image processing / computer vision accelerations.
  6. What??? by Stigmata669 · · Score: 2, Informative

    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.
    1. Re:What??? by orthogonal · · Score: 2, Funny

      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.

      Yeah! I got an email today telling me they could make it twice as wide!

      Something about a pill.

      Come to think of it, I get one of these emails almost everyday.

    2. Re:What??? by Bastian · · Score: 1

      You can stitch the feeds together to get a panorama, but due to the optical situation with using two cameras, the images will only mesh properly for objects at a certain distance. Stuff that's closer or further away will have "pencil in a glass of water" type discontinuities.

  7. I've seen similar by Bastian · · Score: 2, Informative

    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.

    1. Re:I've seen similar by Anonymous Coward · · Score: 0

      really. I mean holy fuck, he wants us to tell him how to do magic with his cameras, the least he could do is give us two of the same kind of camera to work with.

  8. Re:Not pointless by Bastian · · Score: 3, Informative

    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!

  9. Re:G5? sheeit. . . by Bastian · · Score: 1

    I've seen old Amigas with toaster cards that can do some interesting stuff with combining two video streams in realtime.

  10. Technology's there, but driving adoption is hard. by dbirchall · · Score: 1
    I think we should be more concerned with bringing up the audiovideo quality of videoconferencing.

    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!

  11. Re:Not pointless by sakusha · · Score: 1

    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.

  12. What do you want to do today? by Zarf · · Score: 1

    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]
  13. The Easy Way by sakusha · · Score: 1

    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:

    http://www.3dstereo.com/Merchant2/merchant.mvc?S cr een=PROD&Product_Code=LOR-LICeos&Category_Code=jl- ncam&Product_Count=28

    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.

  14. Thats what I thought by Hecatonchires · · Score: 1

    When I read the incredibly badly worded and obviously unedited question.

    --

    Yay me!

  15. Sure, why not? Except on Linux. by Animats · · Score: 2, Informative
    You can read two FireWire cameras simultaneously under Windows 2000. There seems to be a bit of occasional image tearing when two cameras are running. It won't work using the old Video for Windows interface, but the newer Windows API works. Get a pair of Unibrain Fire-i cameras and play with them.

    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.

  16. Custom Drivers by GreenKiwi · · Score: 1

    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)

  17. Application: WebcamXP by Sandman1971 · · Score: 2, Informative

    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
    1. Re:Application: WebcamXP by Anonymous Coward · · Score: 0

      Whoa, bummer to see XP has it but not Linux. Hmm, whooda thought? The applications for porn are huge though.
      Having multiple camera angles without having a crew could make for some killer amateur porn without all the sleaze of having a crew standing around gawking while you're trying to be intimate.
      I realize there are going to be those going, well what's the difference if you're going to broadcast it either way. I'll just put it this way --if you're not gay or into group sex, this crew problem can be a real limitation on your porn career despite the fact that you might otherwise have a decent bod and a good technique.
      I think there's a lot of people who don't care about letting other people see their videos and making whatever comments they want, but draw the line at letting others come into the privacy of their lovemaking as it's actually happening.
      So, I'm disappointed to find that Linux doesn't have what it takes so far, but at the same time it's not that big a deal to use multiple PCs and a video camera or two. You could easily get five angles that way for a reasonable budget, that's not too bad. Add some transitions and you're a star without having to "work you way up."

  18. uhh, question... by Anonymous Coward · · Score: 0

    How stoned were you?

    Just curious...

  19. Re:Not pointless by Anonymous Coward · · Score: 0

    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.

  20. Re:Not pointless by Johnny+Mnemonic · · Score: 1


    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 .sig.tar
  21. Re:Not pointless by bill_mcgonigle · · Score: 1

    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)
  22. how about a link to something ? by HughsOnFirst · · Score: 3, Informative

    The intel Open Source Computer Vision Library They have tools to process stereo usb cameras in real time

  23. Re:G5? sheeit. . . by drinkypoo · · Score: 1

    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.'"
  24. Re:Not pointless by heh2k · · Score: 1

    exactly how does freeviewing damage your vision? how badly was yours damaged?

  25. Re:Not pointless by sakusha · · Score: 1

    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.

  26. Re:Not pointless by Anonymous Coward · · Score: 0

    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?

  27. Where I used to work by phorm · · Score: 2, Informative

    Wireless camera. TV input card with 2 input channels. Software fast-swapped between the channels and grabbed images.

  28. Re:Not pointless by The+Clockwork+Troll · · Score: 1
    The aging process and gradual enlargement of your lenses makes it more difficult to focus.

    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
  29. Re:Not pointless by HTH+NE1 · · Score: 1

    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?
  30. Re:Not pointless by sakusha · · Score: 1

    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).

    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.html

  31. Re:Not pointless by The+Clockwork+Troll · · Score: 1

    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
  32. Re:Not pointless by sakusha · · Score: 1

    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?

  33. Re:Not pointless by Anonymous Coward · · Score: 0

    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?

  34. Shouldn't need separate controllers for USB2.0 by leonbrooks · · Score: 1

    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
    1. Re:Shouldn't need separate controllers for USB2.0 by GoRK · · Score: 2, Informative

      Well actually no.. at least not if you use USB 1.1 cameras which most cheap webcams still are. The OS has nothing to do with it.

      USB1.1 devices on a USB2.0 controller can be difficult.. If you didn't put them on seperate controllers you'd have to put them on a USB hub with multiple USB1.1 USB2.0 TT's. The Transaction Translator is the device responsible for translating the USB1.1 data to USB2.0 and vice versa. There is typically only one TT per USB controller in the chipset. Webcams are especially nasty since they take up almost the complete bandwidth of USB1.1. If you have two usb 1.1 cameras and only one TT, they're still going to be fighting for that 12Mb/s bandwidth into/out of the TT, even though the bus is capable of a lot more.

      The problem is similar to the migration from 10Mb/s ethernet to 100Mb/s ethernet if you were ever doing that.. Some "dual speed" hubs only had a single switch path to get from 10 megabits to 100 megabits, so putting a 100Mb/s card in the server and leaving all the clients at 10Mb/s didn't actually create any performance increase. In many situations where idiot admins swapped in a 10/100 hub to replace 10Mb switches they killed their perforamnce. I had quite a few of those. The solution? Buy a 10 megabit switch with a 100Mb uplink port and plug the uplink into the 100 megabit hub. This is the same problem all over again, except that it's on your desk this time and not in the walls!

      Another cheap solution is to put one of the USB1.1 cameras directly into a port from the motherboard and another one on a USB2.0 hub. That way one camera will use the chipset's TT and the other one will use the hub's TT.

      ~GoRK

  35. To an end TWAIN was not designed for. by leonbrooks · · Score: 1

    It barely handles multiple devices at all.

    After all, TWAIN is not SANE.

    --
    Got time? Spend some of it coding or testing
  36. Re:Not pointless by EnvyRAM · · Score: 1

    "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

  37. Twain cams by Anonymous Coward · · Score: 0

    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.

  38. Hmm... by Anonymous Coward · · Score: 0

    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.

  39. Re:Not pointless by damiam · · Score: 1

    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.
  40. two apps by matts.nu · · Score: 1

    If you just want your conferencing partner to see both your cameras, then why don't you simply launch two copies of the application?

  41. Well... not with storage,, but... by duffbeer703 · · Score: 1

    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
  42. The answer you want may be... by tqft · · Score: 1

    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
  43. What FPS was it? by sonamchauhan · · Score: 1

    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?)

  44. Re:What FPS was it? by phorm · · Score: 1

    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.

  45. Re:What FPS was it? by sonamchauhan · · Score: 1

    Thanks Phorm. Much appreciated!