Help?Kinect under CCV15
Posted: 29 March 2013 02:11 PM   [ Ignore ]
Rank
Joined  2013-03-25
Total Posts:  13
New Member

The problem has been solved. Please turn to 3#

Hi, everyone!
Since my my computer is a laptop and the image in the CCV15 is rotated.
So I get a Kinect. and I install CL-NUI-Platform-1.0.0.1121 and the test is very well. And CCV15 with VS2008 under Win7-32bit can work well (except the rotated image). But when I want to combine them, there are some errors:
When I run the CCV 15 while the Kinect is linked to yhe computer, the CCV 15 get something wrong: memory error, it’s like the CCV wants get wrong while there are several cameras.
______________________________________________________
Is there anyone compiling with Kinect? Would you please tell me the place that I can get the source that can compile with Kinect

30025043-cb4de5b34492438db753204f6769aa34.jpg

30025938-204ba047cd4d4742b0b25295fd764feb.jpg

Does it mean that something get wrong with multicam dll? And how to fix it?
Thank you

Profile
 
 
Posted: 30 March 2013 02:09 PM   [ Ignore ]   [ # 1 ]
Rank
Joined  2013-03-25
Total Posts:  13
New Member
NUIhqqxyy - 29 March 2013 02:11 PM

Hi, everyone!
Since my my computer is a laptop and the image in the CCV15 is rotated.
So I get a Kinect. and I install CL-NUI-Platform-1.0.0.1121 and the test is very well. And CCV15 with VS2008 under Win7-32bit can work well (except the rotated image). But when I want to combine them, there are some errors:
When I run the CCV 15 while the Kinect is linked to yhe computer, the CCV 15 get something wrong: memory error, it’s like the CCV wants get wrong while there are several cameras.
______________________________________________________
Is there anyone compiling with Kinect? Would you please tell me the place that I can get the source that can compile with Kinect

30025043-cb4de5b34492438db753204f6769aa34.jpg

30025938-204ba047cd4d4742b0b25295fd764feb.jpg

Does it mean that something get wrong with multicam dll? And how to fix it?
Thank you

Just now, I had test the official release CCV1.5 (CCV-1.5.exe) and several other revisions, they also can not open kinect. They just broke down when I run it with kinect linked and the error information is same with the upside image( stop at “1 Device<s> found“. So now, I’m really puzzled about what I should do next.
The good news is that CCV1.2 with yangyang’s code can work, however CCV1.2 doesn’t have as many as funtions as the several recently revisions.
Maybe I did something wrong with recent revisions.  Who can teach me what should I do? Thank you

CCV1.5 with kinect linked
31030345-03d4e28d04e24f6e88e55121f44e7cbc.jpg

Profile
 
 
Posted: 31 March 2013 04:50 AM   [ Ignore ]   [ # 2 ]
Rank
Joined  2013-03-25
Total Posts:  13
New Member

I think maybe I have get wrong wih the setting of xml for Kinect.

After I change the app_settings.xml

from

<CAMERATYPES>
            <
PS3>1</PS3>
            <
FFMV>0</FFMV>
            <
KINECT>0</KINECT>
            <
CMU>0</CMU>
            <
DIRECTSHOW>1</DIRECTSHOW>
        </
CAMERATYPES>

to

<CAMERATYPES>
            <
PS3>0</PS3>
            <
FFMV>0</FFMV>
            <
KINECT>1</KINECT>
            <
CMU>0</CMU>
            <
DIRECTSHOW>0</DIRECTSHOW>
        </
CAMERATYPES>

I can run CCV with Kinect linked, and the memory error dispeared.

However, CCV doesn’t show anything from kinect. Maybe there are something else need to change for Kinect.

31165346-639eb5c89ad44024a775260549961e42.jpg

Who can tell me where I should change?

This is my now XML setting of

app_settings.xml camera_settings.xml default_settings.xml multiplexer_settings.xml

PS: gui_settings.xml and templates.xml are not sticked here.

app_settings.xml

<?xml version="1.0" ?>
<!--
CCV 1.5 UPDATES:
DEBUG CONFIG
Can now 
use VIDEO or CAMERA MULTIPLEXER MODES.
-->
<
CONFIG>
    <
MULTIPLEXER>
        <
WIDTH>640</WIDTH>
        <
HEIGHT>480</HEIGHT>
        <
FRAMERATE>90</FRAMERATE>
        <
CAMERATYPES>
            <
PS3>0</PS3>
            <
FFMV>0</FFMV>
            <
KINECT>1</KINECT>
            <
CMU>0</CMU>
            <
DIRECTSHOW>0</DIRECTSHOW>
        </
CAMERATYPES>
    </
MULTIPLEXER>
    <
VIDEO>
        <
FILENAME>videos/RearDI.m4v</FILENAME>
    </
VIDEO>
    <
SOURCE>MULTIPLEXER</SOURCE>
    <
NETWORK>
        <
LOCALHOST>127.0.0.1</LOCALHOST>
        <
TUIO>0</TUIO>
        <
TUIOPORT_OUT>3333</TUIOPORT_OUT>
        <
TUIOFLASHPORT_OUT>3000</TUIOFLASHPORT_OUT>
        <
VERSION>1</VERSION>
        <
OBJECTSASFIDUCIALS>0</OBJECTSASFIDUCIALS>
    </
NETWORK>
    <
BLOBS>
        <
MAXNUMBER>128</MAXNUMBER>
    </
BLOBS>
    <
APPLICATION>
        <
TITLE>Community Core Vision</TITLE>
        <
VERSION>1.5</VERSION>
    </
APPLICATION>
    <
WINDOW>
        <
WIDTH>927</WIDTH>
        <
HEIGHT>600</HEIGHT>
    </
WINDOW>
    <
BOOLEAN>
        <
PRESSURE>205</PRESSURE>
        <
LABELS>1</LABELS>
        <
OUTLINES>0</OUTLINES>
        <
LEARNBG>0</LEARNBG>
        <
TUIO>1</TUIO>
        <
WINTOUCH>0</WINTOUCH>
        <
VMIRROR>0</VMIRROR>
        <
HMIRROR>0</HMIRROR>
        <
HIGHPASS>1</HIGHPASS>
        <
AMPLIFY>1</AMPLIFY>
        <
SMOOTH>1</SMOOTH>
        <
GPU>0</GPU>
        <
DYNAMICBG>0</DYNAMICBG>
        <
DYNAMICTH>0</DYNAMICTH>
        <
SNAPSHOT>0</SNAPSHOT>
        <
MINIMODE>0</MINIMODE>
        <
HEIGHTWIDTH>0</HEIGHTWIDTH>
        <
OSCMODE>1</OSCMODE>
        <
TCPMODE>0</TCPMODE>
        <
BINMODE>0</BINMODE>
        <
TRACKDARK>0</TRACKDARK>
        <
TRACKFINGERS>1</TRACKFINGERS>
        <
TRACKOBJECTS>1</TRACKOBJECTS>
        <
TRACKFIDUCIALS>1</TRACKFIDUCIALS>
    </
BOOLEAN>
    <
INT>
        <
MINMOVEMENT>4</MINMOVEMENT>
        <
MINBLOBSIZE>389</MINBLOBSIZE>
        <
MAXBLOBSIZE>700</MAXBLOBSIZE>
        <
BGLEARNRATE>73.690910</BGLEARNRATE>
        <
THRESHOLD>145</THRESHOLD>
        <
HIGHPASSBLUR>21</HIGHPASSBLUR>
        <
HIGHPASSNOISE>2</HIGHPASSNOISE>
        <
HIGHPASSAMP>190</HIGHPASSAMP>
        <
SMOOTH>6</SMOOTH>
        <
MINTEMPAREA>328</MINTEMPAREA>
        <
MAXTEMPAREA>1157</MAXTEMPAREA>
        <
THRESHOLDSIZE>7</THRESHOLDSIZE>
    </
INT>
    <
FIDUCIAL>
        <
TILE>20</TILE>
        <
THRESHOLD>72</THRESHOLD>
    </
FIDUCIAL>
</
CONFIG>

camera_settings.xml

<CAMERAS>
    <
CAMERA>
        <
SETTINGS>
            <
GUID>0</GUID>
            <
TYPE>DIRECTSHOW</TYPE>
            <
FRAME>
                <
RAW>0</RAW>
                <
WIDTH>160</WIDTH>
                <
HEIGHT>120</HEIGHT>
                <
LEFT>0</LEFT>
                <
TOP>0</TOP>
            </
FRAME>
            <
SENSOR>
                <
MODE>0</MODE>
                <
DEPTH>3</DEPTH>
                <
BRIGHTNESS>
                    <
VALUE>0</VALUE>
                    <
AUTO>0</AUTO>
                </
BRIGHTNESS>
                <
CONTRAST>
                    <
VALUE>32</VALUE>
                    <
AUTO>0</AUTO>
                </
CONTRAST>
                <
GAIN>
                    <
VALUE>33</VALUE>
                    <
AUTO>0</AUTO>
                </
GAIN>
                <
SATURATION>
                    <
VALUE>32</VALUE>
                    <
AUTO>0</AUTO>
                </
SATURATION>
                <
SHARPNESS>
                    <
VALUE>3</VALUE>
                    <
AUTO>0</AUTO>
                </
SHARPNESS>
                <
EXPOSURE>
                    <
VALUE>-6</VALUE>
                    <
AUTO>1</AUTO>
                </
EXPOSURE>
                <
FRAMERATE>15</FRAMERATE>
                <
HUE>
                    <
AUTO>0</AUTO>
                    <
VALUE>0</VALUE>
                </
HUE>
                <
GAMMA>
                    <
AUTO>0</AUTO>
                    <
VALUE>30</VALUE>
                </
GAMMA>
            </
SENSOR>
        </
SETTINGS>
    </
CAMERA>
</
CAMERAS>

default_settings.xml

<CAMERAS>
    <
CAMERA>
        <
SETTINGS>
            <
TYPE>PS3</TYPE>
            <
FRAME>
                <
WIDTH>320</WIDTH>
                <
HEIGHT>240</HEIGHT>
                <
LEFT>0</LEFT>
                <
TOP>0</TOP>
  <
RAW>0</RAW>
            </
FRAME>
            <
SENSOR>
                <
MODE>0</MODE>
                <
DEPTH>1</DEPTH>
                <
GAIN>
   <
AUTO>0</AUTO>   
   <
VALUE>16</VALUE>
  </
GAIN>
                <
EXPOSURE>
   <
AUTO>0</AUTO>
   <
VALUE>100</VALUE
  </
EXPOSURE>
                <
FRAMERATE>60</FRAMERATE>
            </
SENSOR>
        </
SETTINGS>
    </
CAMERA>
    <
CAMERA>
        <
SETTINGS>
            <
TYPE>DIRECTSHOW</TYPE>
            <
FRAME>
                <
WIDTH>320</WIDTH>
                <
HEIGHT>240</HEIGHT>
                <
LEFT>0</LEFT>
                <
TOP>0</TOP>
  <
RAW>0</RAW>
            </
FRAME>
            <
SENSOR>
             <
MODE>0</MODE>
                <
DEPTH>3</DEPTH>
                <
FRAMERATE>15</FRAMERATE>
            </
SENSOR>
        </
SETTINGS>
    </
CAMERA>
    <
CAMERA>
        <
SETTINGS>
            <
TYPE>FFMV</TYPE>
            <
FRAME>
                <
WIDTH>640</WIDTH>
                <
HEIGHT>480</HEIGHT>
                <
LEFT>0</LEFT>
                <
TOP>0</TOP>
  <
RAW>0</RAW>
            </
FRAME>
            <
SENSOR>
             <
MODE>0</MODE>
                <
DEPTH>1</DEPTH>
                <
FRAMERATE>1063</FRAMERATE>
  <
BRIGHTNESS>
   <
AUTO>0</AUTO>
   <
VALUE>34</VALUE>
  </
BRIGHTNESS>
  <
EXPOSURE>
   <
AUTO>0</AUTO>
   <
VALUE>40</VALUE>
  </
EXPOSURE>
  <
GAIN>
   <
AUTO>0</AUTO>
   <
VALUE>64</VALUE>
  </
GAIN>
  <
GAMMA>
   <
AUTO>0</AUTO>
   <
VALUE>1</VALUE>
  </
GAMMA>
  <
SHUTTER>
   <
AUTO>0</AUTO>
   <
VALUE>867</VALUE>
  </
SHUTTER>
            </
SENSOR>
        </
SETTINGS>
    </
CAMERA>
    <
CAMERA>
        <
SETTINGS>
            <
TYPE>CMU</TYPE>
            <
FRAME>
                <
WIDTH>320</WIDTH>
                <
HEIGHT>240</HEIGHT>
                <
LEFT>0</LEFT>
                <
TOP>0</TOP>
  <
RAW>0</RAW>
            </
FRAME>
            <
SENSOR>
             <
MODE>5</MODE>
                <
DEPTH>3</DEPTH>
                <
FRAMERATE>15</FRAMERATE>
            </
SENSOR>
        </
SETTINGS>
    </
CAMERA>
    <
CAMERA>
        <
SETTINGS>
            <
TYPE>KINECT</TYPE>
            <
FRAME>
                <
WIDTH>640</WIDTH>
                <
HEIGHT>480</HEIGHT>
                <
LEFT>0</LEFT>
                <
TOP>0</TOP>
  <
RAW>0</RAW>
            </
FRAME>
            <
SENSOR>
             <
MODE>1</MODE>
                <
DEPTH>1</DEPTH>
                <
FRAMERATE>30</FRAMERATE>
  <
DEPTHNEARBOUND>0</DEPTHNEARBOUND>
  <
DEPTHFARBOUND>65535</DEPTHFARBOUND>
  <
MOTORLED>0</MOTORLED>
  <
MOTORPOSITION>0</MOTORPOSITION>
            </
SENSOR>
        </
SETTINGS>
    </
CAMERA>
</
CAMERAS>

multiplexer_settings.xml

<MULTIPLEXER>
    <
CAMERAGRID>
        <
WIDTH>1</WIDTH>
        <
HEIGHT>1</HEIGHT>
    </
CAMERAGRID>
    <
CALIBRATIONGRID>
        <
WIDTH>3</WIDTH>
        <
HEIGHT>3</HEIGHT>
    </
CALIBRATIONGRID>
    <
INTERLEAVE>1</INTERLEAVE>
    <
CAMERAS></CAMERAS>
</
MULTIPLEXER>

Profile
 
 
Posted: 01 April 2013 11:33 PM   [ Ignore ]   [ # 3 ]
Rank
Joined  2013-03-25
Total Posts:  13
New Member

The problem has been solved!!!
I find that in the

void ofxKinect::getNewFrame(unsigned charnewFrame)
{
    GetNUICameraDepthFrameRAW
(kinectCamera,depthData);
    
int size width*height;
    
float len farBound nearBound;
    switch (
cameraPixelMode)
    
{
    
case 0:
        for (
int i=0;i<size;i++)
            
newFrame[i] = ((depthData[i] <= farBound) && (depthData[i] >= nearBound)) ? 255 0;
        break;
    case 
1:
        for (
int i=0;i<size;i++)
        
{
            
if (depthData[i] <= nearBound)
                
newFrame[i] 0;
            else if (
depthData[i] >= farBound)
                
newFrame[i] 255;
            else 
                
newFrame[i] = (len == 0) ? : (unsigned char)(255.0f * ((depthData[i] nearBound)/len));
        
}
        
break;
    case 
2:
        for (
int i=0;i<size;i++)
            
newFrame[i] = ((depthData[i] <= farBound) && (depthData[i] >= nearBound)) ? (unsigned char)(255.0f * ((depthData[i] nearBound)/len)) : 0;
    
}
}

when I change

newFrame[i] = (len == 0) ? : (unsigned char)(255.0f * ((depthData[i] nearBound)/len));

to

newFrame[i] = (len == 0) ? : (unsigned char)(255.0 * ((depthData[i] nearBound)/1000));

CCV can show the depth image.

for the len is too large so the newFrame is smaller than 5.(depthData is about 800, and the len (farBound - nearBound) is 65555), so it seems to show nothing. When I make len small, so we can get the depth image visiable.

Actually I advice to change the bounds in the xml.

Thank all the people in the nuigroup!!!

Profile