MultiCam solutions
Posted: 29 March 2009 11:31 AM   [ Ignore ]
Avatar
Rank
Joined  2009-03-29
Total Posts:  13
New Member

I ve seen a lot of people asking for multicam solution.
If you’re able to code C or C++ , just modify touchlib it’s quite simple

Here is what i’ve done, with 2 firefly MV.

- add custom filter like “multicam” -> so modify filterfactory to read your custom filter through the xml file
- add a new filter in xml like ” to identify your cameras
- in this new filter, you code exactly the same as for videowrapper , but you double the code, cause you’ve 2 images wink
- when you have your 2 images you stick them together by creating a new image with the same height but a width twice long,
- the stitching is done with simple opencv function like ROI and copyimage.

- in the windows of your new filter you create 2 sliders to move X and Y axis for the great stiching.

JUST note that your cameras have to be on 2 diff iee1954 bus. i’ve one pluged onto the motherboard, and the other on the ptgrey firewire card.
Is the first number in the videowrapper string represents the BUS number ??? i don’t know… i’ve coded this in 2 hours and when it has worked i jumped onto another thing.

ps: if you want to handle error if only one cam is connected, use the great SDK of pointgrey. a simple function return all the info on the connected cams.

Hope it will help.

Maiko

Profile
 
 
Posted: 07 April 2009 09:51 AM   [ Ignore ]   [ # 1 ]
Rank
Joined  2009-04-07
Total Posts:  32
New Member

Do you have a solution for PS3Eye Cams?

Profile
 
 
Posted: 07 April 2009 10:43 AM   [ Ignore ]   [ # 2 ]
Avatar
Rank
Joined  2009-03-29
Total Posts:  13
New Member

The way is exactly the same. The issue is that the SDK of AlexP for ps3eye doesn’t allow you to chose the cam to initialize and the grabbing source cam !

If you have the source of this sdk, it’s quite simple to add a piece of code in function CREATE() that will return a pointer to IPS3EyeLib for the next cam.
(cam are identified based on the ID hardware of usb devices blablabla)

Or there is also another solution .... writing your own SDK for handling ps3cam… grin

Profile
 
 
Posted: 07 April 2009 07:51 PM   [ Ignore ]   [ # 3 ]
Rank
Joined  2009-03-23
Total Posts:  7
New Member

Hmm, i don’t think stitching is that simple thing. if you want to do it that simple, at least you need to allign your cameras parallelly. also i think there will be an obvious edge between the stitched image. could you kindly post the stitched image?

Profile
 
 
Posted: 08 April 2009 10:58 AM   [ Ignore ]   [ # 4 ]
Avatar
Rank
Joined  2009-03-29
Total Posts:  13
New Member

for sure yaya. you’re right.

To do it with the easy way you need to have those 2 cams parallely aligned… but it most case it will be. for example in MS Surface the 4 top cams are on diff X aand Y axisbut with the same ‘inclinaison’ and the same Z depth.

Otherwise, if they are not // you will need a different calibration matrix for each cam…

Don’t forget that we need to minimize the frame processing time. with a dual core i ‘m just below 1 second to process 60 fps. if i complicate the stitching by distortion or whatever, i will have lost frames.

concerning the edge, if you mean overlap or gaps between 2 images, there isn’t… a manual calibration pixel by pixel for X and Y axis is needed to stitch them perfectly.

i’will post that stitched image tomorrow when i get back at work.

Profile
 
 
Posted: 08 April 2009 12:40 PM   [ Ignore ]   [ # 5 ]
RankRank
Joined  2008-10-06
Total Posts:  107
Jr. Member

I accomplished this using Isadora, visual jockey worked as well… most of the off-the-shelf VJ apps will let you take multiple camera inputs and combine them into one stream. i’m outputting that stream to tbeta an voila, i have multiple tables… I built my “networked tables” about 4-5 months ago but have been too busy to make a video or take photos of it. works smoothly…

I tried using netstreaming via Bigfug (love his software) and had a bit of a delay on startup, maybe 1 second, but no lag, that’s on a 100mb lan. This is doing it all one one machine.. the method that worked for me with 0 lag is by using my acer netbook as a sort of “stream combiner”.

Alpay

 Signature 

blog.LitStudios.com
Adventures in Human Computer Interaction

Profile
 
 
Posted: 14 April 2009 08:44 AM   [ Ignore ]   [ # 6 ]
Rank
Joined  2008-08-26
Total Posts:  38
New Member

Maiko,waiting for your demo!

Profile
 
 
Posted: 16 April 2009 04:55 AM   [ Ignore ]   [ # 7 ]
Avatar
Rank
Joined  2009-03-29
Total Posts:  13
New Member

Here is the result. (I’ve setup the 2 cams config quickly so they aren’t aligned correctly on a same Z axis...)
You can have a better result by screewing them into place or whatever.

?ACT=28&fid=27&aid=3013_e0RFg30oGiNYdjOL0Ylq

Image Attachments
Nouveau Image bitmap.JPG
Profile
 
 
Posted: 23 May 2009 01:24 AM   [ Ignore ]   [ # 8 ]
Avatar
RankRankRankRank
Joined  2008-09-12
Total Posts:  1475
Elite

Hey Maiko, good work you got going here with Touchlib.  Any chance you can explain and supply the files you changed to get this working?  I got a box full of ps3 cams I want to get this testing with.  Thanks.

 Signature 

My MT Website - A Collection of the Most MT Relevant Info From These Forums
My MT Blog
My Optical-Based Multitouch Parts Store - Buy complete modified cameras, m12 mounts, m12 lenses, infrared lasers, LEDs, etc

Profile
 
 
Posted: 23 May 2009 02:21 AM   [ Ignore ]   [ # 9 ]
RankRank
Joined  2008-05-20
Total Posts:  205
Jr. Member

i’m interested to test this as well....

some questions… what kinda lens r u using? and wats the fps u r getting?

can u show us an image where you have a blob in the center/intersection?

i’ve two firefly MV usb version.. do u think it will work well?

Profile
 
 
Posted: 24 May 2009 11:06 PM   [ Ignore ]   [ # 10 ]
RankRank
Joined  2008-05-20
Total Posts:  205
Jr. Member

hi maiko,

how do i use the cvCopy(src, dst, mask) to stitch the 2 images? what do i specify in the mask parameter?

cheers and thanks

Profile
 
 
Posted: 25 May 2009 12:44 AM   [ Ignore ]   [ # 11 ]
Avatar
Rank
Joined  2009-01-03
Total Posts:  42
New Member

Hi Maiko,
Good job!I am quite interesting to test this as well.So any chance u can supply the files?
Thank you.

Profile
 
 
Posted: 27 May 2009 02:12 AM   [ Ignore ]   [ # 12 ]
RankRank
Joined  2008-05-20
Total Posts:  205
Jr. Member

hi guys…

somehow manage to code the dual cam configuration in touchlib… however, not very promising as fps(47) and cpu usage(23%) is not really healthy for MT apps… i’m running 400 by 300 in format7 btw… screenshot as per below

DualCamScreenshot.jpg

EDIT: i realize i was running the smooth filter which i doesn’t need so i took it out and the fps is 75 and cpu usage is 17%… looking gd.. below is the revised fps

DualCamScreenshot2.jpg

Profile
 
 
Posted: 30 July 2009 03:51 AM   [ Ignore ]   [ # 13 ]
Rank
Joined  2009-07-21
Total Posts:  4
New Member

the stitch job is not so simple as u say…

Profile
 
 
Posted: 08 February 2010 09:03 PM   [ Ignore ]   [ # 14 ]
Avatar
Rank
Joined  2009-05-19
Total Posts:  10
New Member

Hi Maiko /icube

Do you think it would be possible for me to see some of your code you wrote? I need some help as I have 2 images obtained from the ps3Eye camera and I want to use this method to stitch them together. My cameras are aligned correctly on axis so they should fit nicely together if I can move along x and y axis pixel by pixel.

I would like to be able to do the following:

- when you have your 2 images you stick them together by creating a new image with the same height but a width twice long,
- the stitching is done with simple opencv function like ROI and copyimage.
- in the windows of your new filter you create 2 sliders to move X and Y axis for the great stiching.

I hope you can help me guys, if I could see the source code I might be able to figure it out myself.

Thanks in advance,
Alan

 Signature 

“Strive for perfection in everything you do. Take the best that exists and make it better. When it doesn’t exist, design it, build it and Open Source it!”

Profile