3 of 24
3
CCV 1.4.1a Multicamera Preview - Call for Participation
Posted: 23 April 2011 02:07 AM   [ Ignore ]   [ # 31 ]
Avatar
Rank
Joined  2010-10-27
Total Posts:  97
New Member

Hey guys. Just trying to test this out right now. Running into some problems. Every time we set up the camera config file to run 4 x 1 CCV crashes every time we open, however if we run 1x1 ccv opens no problem but only 1 cam shows up. We do have the 4 pack from Code labs and all cams are activated. . Here is our camera settings.

<CAMERASETTINGS>
    <
GENERALSETTINGS>
        <
INTERLEAVE>0</INTERLEAVE>
        <
STITCHEDFRAMEWIDTH>2560</STITCHEDFRAMEWIDTH>
        <
STITCHEDFRAMEHEIGHT>480</STITCHEDFRAMEHEIGHT>
        <
CALIBRATIONGRIDWIDTH>4</CALIBRATIONGRIDWIDTH>
        <
CALIBRATIONGRIDHEIGHT>3</CALIBRATIONGRIDHEIGHT>
        <
GPUMODE>0</GPUMODE>
        <
FRAMERATE>60</FRAMERATE>
        <
CAMERAGRIDWIDTH>4</CAMERAGRIDWIDTH>
        <
CAMERAGRIDHEIGHT>1</CAMERAGRIDHEIGHT>
        <
CAMERATYPE>0</CAMERATYPE>
    </
GENERALSETTINGS>
    <
CAMERA>
        <
SETTINGS>
            <
GUID>{5D7FEE80-89ED-579E-4C17-D4E7E1FFA542}</GUID>
            <
WIDTH>640</WIDTH>
            <
HEIGHT>480</HEIGHT>
            <
LEFT>0</LEFT>
            <
TOP>0</TOP>
            <
DEPTH>1</DEPTH>
            <
EXPOSURE>10</EXPOSURE>
            <
GAIN>90</GAIN>
        </
SETTINGS>
<
SETTINGS>
            <
GUID>{66C113488-9505-073F-092C-D4AAE026E1F2}</GUID>
            <
WIDTH>640</WIDTH>
            <
HEIGHT>480</HEIGHT>
            <
LEFT>0</LEFT>
            <
TOP>0</TOP>
            <
DEPTH>1</DEPTH>
            <
EXPOSURE>10</EXPOSURE>
            <
GAIN>90</GAIN>
        </
SETTINGS>
<
SETTINGS>
            <
GUID>{A0F7ED01-2B74-81D3-17D5-3259E54B82A1}</GUID>
            <
WIDTH>640</WIDTH>
            <
HEIGHT>480</HEIGHT>
            <
LEFT>0</LEFT>
            <
TOP>0</TOP>
            <
DEPTH>1</DEPTH>
            <
EXPOSURE>10</EXPOSURE>
            <
GAIN>90</GAIN>
        </
SETTINGS>
<
SETTINGS>
            <
GUID>{7E2E4761-367C-191B-044D-51274F787C30}</GUID>
            <
WIDTH>640</WIDTH>
            <
HEIGHT>480</HEIGHT>
            <
LEFT>0</LEFT>
            <
TOP>0</TOP>
            <
DEPTH>1</DEPTH>
            <
EXPOSURE>10</EXPOSURE>
            <
GAIN>90</GAIN>
        </
SETTINGS>
          <
POINTARRAY></POINTARRAY>
    </
CAMERA>
</
CAMERASETTINGS>

Here is our config for ccv as well. Any help on this would be greatly appreciated.
<?xml version="1.0" ?>

<CONFIG>
    <!--
/////////////////////////////////////////

        
YOU CAN MANUALLY EDIT THE FEATURES BELOW
 
    
///////////////////////////////////////////// -->
    
<!--// CAMERA SETTINGS // -->
    
<CAMERA_0>
        <
USECAMERA>1</USECAMERA>
        <
DEVICE>0</DEVICE>
        <
WIDTH>2560</WIDTH>
        <
HEIGHT>480</HEIGHT>
        <
FRAMERATE>60</FRAMERATE>
    </
CAMERA_0>
    <!--
// NETWORK COMMUNICATION SETTINGS //-->
    
<NETWORK>
        <
LOCALHOST>127.0.0.1</LOCALHOST>
        <
TUIO>0</TUIO>
        <
TUIOPORT_OUT>3333</TUIOPORT_OUT>
        <
TUIOFLASHPORT_OUT>3000</TUIOFLASHPORT_OUT>
    </
NETWORK>
    <!--
// VIDEO SETTINGS // -->
    
<VIDEO>
        <
FILENAME>test_videos/RearDI.m4v</FILENAME>
    </
VIDEO>
    <!--
// BLOB SETTINGS // -->
    
<BLOBS>
        <
MAXNUMBER>100</MAXNUMBER>
    </
BLOBS>
    <!--
/////////////////////////////////////////

        
DO NOT EDIT THE VALUES BELOW
 
    
///////////////////////////////////////////// -->
    
<APPLICATION>
        <
TITLE>Community Core Visision</TITLE>
        <
VERSION>1.3.1</VERSION>
    </
APPLICATION>
    <
WINDOW>
        <
WIDTH>950</WIDTH>
        <
HEIGHT>600</HEIGHT>
    </
WINDOW>
    <
BOOLEAN>
        <
PRESSURE>0</PRESSURE>
        <
LABELS>1</LABELS>
        <
OUTLINES>0</OUTLINES>
        <
LEARNBG>0</LEARNBG>
        <
TUIO>0</TUIO>
        <
VMIRROR>0</VMIRROR>
        <
HMIRROR>0</HMIRROR>
        <
HIGHPASS>1</HIGHPASS>
        <
AMPLIFY>1</AMPLIFY>
        <
SMOOTH>1</SMOOTH>
        <
GPU>0</GPU>
        <
DYNAMICBG>0</DYNAMICBG>
        <
SNAPSHOT>0</SNAPSHOT>
        <
MINIMODE>0</MINIMODE>
        <
HEIGHTWIDTH>0</HEIGHTWIDTH>
        <
OSCMODE>0</OSCMODE>
        <
TCPMODE>0</TCPMODE>
        <
BINMODE>0</BINMODE>
        <
TRACKDARK>0</TRACKDARK>
        <
TRACKFINGERS>1</TRACKFINGERS>
        <
TRACKOBJECTS>0</TRACKOBJECTS>
        <
TRACKFIDUCIALS>0</TRACKFIDUCIALS>
        <
UNDISTORT>0</UNDISTORT>
        <
HORIZONTALINVERSE>1</HORIZONTALINVERSE>
        <
VERTICALINVERSE>1</VERTICALINVERSE>
    </
BOOLEAN>
    <
INT>
        <
MINMOVEMENT>0</MINMOVEMENT>
        <
MINBLOBSIZE>25</MINBLOBSIZE>
        <
MAXBLOBSIZE>100</MAXBLOBSIZE>
        <
BGLEARNRATE>0.010000</BGLEARNRATE>
        <
THRESHOLD>47</THRESHOLD>
        <
HIGHPASSBLUR>14</HIGHPASSBLUR>
        <
HIGHPASSNOISE>4</HIGHPASSNOISE>
        <
HIGHPASSAMP>155</HIGHPASSAMP>
        <
SMOOTH>0</SMOOTH>
        <
MINTEMPAREA>0</MINTEMPAREA>
        <
MAXTEMPAREA>0</MAXTEMPAREA>
    </
INT>
    <
FIDUCIAL>
        <
HIGHPASS>0</HIGHPASS>
        <
AMPLIFY>0</AMPLIFY>
        <
SMOOTH>0</SMOOTH>
        <
THRESHOLD>69</THRESHOLD>
        <
HIGHPASSBLUR>0</HIGHPASSBLUR>
        <
HIGHPASSNOISE>0</HIGHPASSNOISE>
        <
HIGHPASSAMP>0</HIGHPASSAMP>
        <
SMOOTHVALUE>5</SMOOTHVALUE>
    </
FIDUCIAL>
</
CONFIG>

Screwfunk
TouchMi team

 Signature 

TouchMi Multitouch Bar

Profile
 
 
Posted: 23 April 2011 04:10 AM   [ Ignore ]   [ # 32 ]
Avatar
RankRankRank
Joined  2009-09-20
Total Posts:  263
Sr. Member

@TouchMI - it looks like that you’ve done some mistakes in CameraSettings.xml

I’ve corrected your xml, but i think that also you’ve done mistakes in camera GUIDs (different lengths of GUIDs) - check them again

And be sure that you USB controllers allows to capture 4x640x480x60fps - if you’ll have problems with one or few cameras become black - decrease fps or resolution.

<CAMERASETTINGS>
    <
GENERALSETTINGS>
        <
INTERLEAVE>0</INTERLEAVE>
        <
STITCHEDFRAMEWIDTH>2560</STITCHEDFRAMEWIDTH>
        <
STITCHEDFRAMEHEIGHT>480</STITCHEDFRAMEHEIGHT>
        <
CALIBRATIONGRIDWIDTH>4</CALIBRATIONGRIDWIDTH>
        <
CALIBRATIONGRIDHEIGHT>3</CALIBRATIONGRIDHEIGHT>
        <
GPUMODE>0</GPUMODE>
        <
FRAMERATE>60</FRAMERATE>
        <
CAMERAGRIDWIDTH>4</CAMERAGRIDWIDTH>
        <
CAMERAGRIDHEIGHT>1</CAMERAGRIDHEIGHT>
        <
CAMERATYPE>0</CAMERATYPE>
    </
GENERALSETTINGS>
    <
CAMERA>
        <
SETTINGS>
            <
GUID>{5D7FEE80-89ED-579E-4C17-D4E7E1FFA542}</GUID>
            <
WIDTH>640</WIDTH>
            <
HEIGHT>480</HEIGHT>
            <
LEFT>0</LEFT>
            <
TOP>0</TOP>
            <
DEPTH>1</DEPTH>
            <
EXPOSURE>10</EXPOSURE>
            <
GAIN>90</GAIN>
        </
SETTINGS>
        <
POINTARRAY></POINTARRAY>
    </
CAMERA>
    <
CAMERA>
        <
SETTINGS>
            <
GUID>{66C113488-9505-073F-092C-D4AAE026E1F2}</GUID>
            <
WIDTH>640</WIDTH>
            <
HEIGHT>480</HEIGHT>
            <
LEFT>0</LEFT>
            <
TOP>0</TOP>
            <
DEPTH>1</DEPTH>
            <
EXPOSURE>10</EXPOSURE>
            <
GAIN>90</GAIN>
        </
SETTINGS>
        <
POINTARRAY></POINTARRAY>
    </
CAMERA>
    <
CAMERA>
        <
SETTINGS>
            <
GUID>{A0F7ED01-2B74-81D3-17D5-3259E54B82A1}</GUID>
            <
WIDTH>640</WIDTH>
            <
HEIGHT>480</HEIGHT>
            <
LEFT>0</LEFT>
            <
TOP>0</TOP>
            <
DEPTH>1</DEPTH>
            <
EXPOSURE>10</EXPOSURE>
            <
GAIN>90</GAIN>
        </
SETTINGS>
        <
POINTARRAY></POINTARRAY>
    </
CAMERA>
    <
CAMERA>
        <
SETTINGS>
            <
GUID>{7E2E4761-367C-191B-044D-51274F787C30}</GUID>
            <
WIDTH>640</WIDTH>
            <
HEIGHT>480</HEIGHT>
            <
LEFT>0</LEFT>
            <
TOP>0</TOP>
            <
DEPTH>1</DEPTH>
            <
EXPOSURE>10</EXPOSURE>
            <
GAIN>90</GAIN>
        </
SETTINGS>
        <
POINTARRAY></POINTARRAY>
    </
CAMERA>
</
CAMERASETTINGS>

@Seth (cerupcat)
Source code will be released soon - after adding few features. It works with FFMV and all CMU cameras, butin this situation there should be added some new tags to CameraSettings.xml and GUID should look different. If you are going to test it with 1394a cameras - write PM and i’ll send to you settings.

 Signature 

Microsoft Applied Sciences Group Intern

Profile
 
 
Posted: 24 April 2011 03:49 PM   [ Ignore ]   [ # 33 ]
Avatar
RankRankRank
Joined  2009-09-20
Total Posts:  263
Sr. Member

[UPDATE] Added support of video recording from camera and emulating camera work with this recorded video. Now works only with PS3Eye. Support of different cameras will be added in a few days. See video for more instructions

 Signature 

Microsoft Applied Sciences Group Intern

Profile
 
 
Posted: 25 April 2011 07:59 AM   [ Ignore ]   [ # 34 ]
Avatar
RankRank
Joined  2007-05-20
Total Posts:  146
Member

this modification so great, can you tell some technique about stich 4 camera, and how do perfect stich such as overlaping clip ?
I think the respond time so much : >30ms.

I have been program for stich 2 camera automatic but respond time so much >16ms.

Whatever, thank you Anat for this modification ! Can you share source code about stich camera ? Maybe we will optimize this !

 Signature 

Vietnam Optimize Interaction
Follow on Youtube !

My Channel Youtube !

Profile
 
 
Posted: 25 April 2011 08:19 AM   [ Ignore ]   [ # 35 ]
Avatar
RankRankRank
Joined  2009-09-20
Total Posts:  263
Sr. Member

Hi, @bsquang i’m very glad that you tried Multicamera CCV. About overlapping - just add set overlapping tag in CameraSettings.xml to 1 and calibrate.

About perfomance - total perfomance of multicamera CCV and normal CCV are the same except only 1 (ONE) operation O(w*h)

int size = resultWitdth*resultHeight;
for (int i=0;i<size;i++)
result = camera[map][position[map]];

Also i’m going to recommend using fast USB controllers, decrease camera FPS and increase fps in config.xml.

Now after adding support of multicamera main goal of CCV is to increase perfomance via adding support of GPU computing.

 Signature 

Microsoft Applied Sciences Group Intern

Profile
 
 
Posted: 25 April 2011 08:38 AM   [ Ignore ]   [ # 36 ]
Avatar
RankRank
Joined  2007-05-20
Total Posts:  146
Member

"Also i’m going to recommend using fast USB controllers, decrease camera FPS and increase fps in config.xml.”
this is correct solution, and i dont have any question for this !
I have some link about this : http://cornerstone.multitouch.fi/cornerstone-documentation/multiple-cameras this is a some topic in Multitouch.fi LTD.

So i have some question about stich algorithms. First, you have get image from camera, then, In calibration you have correctly area for each camera, isn’ it ? And then each images, you have stretch it ? Ok so in overlapping video, the stich image very fine and smooth. How did you do this ? Can you share some function, some algorithms or some topic about this ? I tried programming stich camera and not be fine !
Thank you reply

 Signature 

Vietnam Optimize Interaction
Follow on Youtube !

My Channel Youtube !

Profile
 
 
Posted: 25 April 2011 08:45 AM   [ Ignore ]   [ # 37 ]
Avatar
RankRankRank
Joined  2009-09-20
Total Posts:  263
Sr. Member

@bsquang
1 Step.
Pre-process - get displacement map for lens distortion correction. Then after getting calibration points - correct this displacement map.
2 Step.

int size resultWitdth*resultHeight
for (
int i=0;i<size;i++)
 
result[i] camera[map[i]][position[map[i]][i]];

in overlapping zone

result[i] camera[map[i]][position[map[i]][i]] weight[map[i]][i];

 Signature 

Microsoft Applied Sciences Group Intern

Profile
 
 
Posted: 25 April 2011 09:17 AM   [ Ignore ]   [ # 38 ]
Avatar
RankRank
Joined  2007-05-20
Total Posts:  146
Member

oh gosh, you have processing in pixel level, that’s so simple and effective ! Therefore, processing with gpu it’s a perfect way, but so difficult !
ok so, how to get displacement map for lens distortion correction? I have confused this ! Sorry.. I have tried undistort lens in ccv with undistor2() and combine all. Did you have this ?
I very thank you about share this solution.

 Signature 

Vietnam Optimize Interaction
Follow on Youtube !

My Channel Youtube !

Profile
 
 
Posted: 25 April 2011 09:23 AM   [ Ignore ]   [ # 39 ]
Avatar
RankRankRank
Joined  2009-09-20
Total Posts:  263
Sr. Member

@bsquang - i think that you’ll be surprised soon. GPU processing is going be soonsmile

 Signature 

Microsoft Applied Sciences Group Intern

Profile
 
 
Posted: 25 April 2011 09:37 AM   [ Ignore ]   [ # 40 ]
Avatar
RankRank
Joined  2007-05-20
Total Posts:  146
Member

so i think you clever and good man, i have saw all video in your youtube channel, i very like video http://www.youtube.com/watch?v=_V4-M754gIE !
I hope the gpu version will be release soon, and attach source ! hihi.
Thank you for all !

 Signature 

Vietnam Optimize Interaction
Follow on Youtube !

My Channel Youtube !

Profile
 
 
Posted: 25 April 2011 01:19 PM   [ Ignore ]   [ # 41 ]
Avatar
RankRankRank
Joined  2009-09-20
Total Posts:  263
Sr. Member

@bsquang
Thank you! BTW - new video from stitched cameras (640x360x60fps)

 Signature 

Microsoft Applied Sciences Group Intern

Profile
 
 
Posted: 26 April 2011 05:45 AM   [ Ignore ]   [ # 42 ]
Avatar
Rank
Joined  2010-10-27
Total Posts:  97
New Member

We purchased 2 PCI usb cards, plugged in 4 ps3 cams (one into each usb controller) and when starting ccv, we get between 4 and 10 fps.  We have tried with 3 cameras and we get ~12fps.  config.xml has the framerate set to 60fps, cameras are at 320x240 30fps in the cameraconfig.xml.

Any ideas on what may be wrong?  GUIDS are all correct, and we get a picture and can see 4 cameras but at only ~6 fps.

 Signature 

TouchMi Multitouch Bar

Profile
 
 
Posted: 26 April 2011 06:06 AM   [ Ignore ]   [ # 43 ]
Avatar
RankRankRank
Joined  2009-09-20
Total Posts:  263
Sr. Member

@TouchMi
- set 90-120 fps at Config.xml
- set 90-120 fps at CameraSettings.xml
play with these settings
Do you mean - cameraconfig.xml == CameraSettings.xml???

 Signature 

Microsoft Applied Sciences Group Intern

Profile
 
 
Posted: 26 April 2011 06:18 AM   [ Ignore ]   [ # 44 ]
Avatar
RankRank
Joined  2007-05-20
Total Posts:  146
Member
TouchMi - 26 April 2011 05:45 AM

We purchased 2 PCI usb cards, plugged in 4 ps3 cams (one into each usb controller) and when starting ccv, we get between 4 and 10 fps.  We have tried with 3 cameras and we get ~12fps.  config.xml has the framerate set to 60fps, cameras are at 320x240 30fps in the cameraconfig.xml.

Any ideas on what may be wrong?  GUIDS are all correct, and we get a picture and can see 4 cameras but at only ~6 fps.

Maybe is hardware ! Can you show your system pc ? Cpu? Ram?…

 Signature 

Vietnam Optimize Interaction
Follow on Youtube !

My Channel Youtube !

Profile
 
 
Posted: 26 April 2011 06:22 AM   [ Ignore ]   [ # 45 ]
Avatar
RankRankRank
Joined  2009-09-20
Total Posts:  263
Sr. Member

@bsquang
Yes - also we should remember that multicamera setup needs perfomance pc. But in this case i think that the problem is in settings.

 Signature 

Microsoft Applied Sciences Group Intern

Profile
 
 
   
3 of 24
3