Revision 198 ofxPS3.cpp
| ofxPS3.cpp (revision 198) | ||
|---|---|---|
| 10 | 10 |
|
| 11 | 11 |
void ofxPS3::listDevices() |
| 12 | 12 |
{
|
| 13 |
// Enumerate the cameras on the USB bus |
|
| 13 |
// Enumerate the cameras on the bus. |
|
| 14 | 14 |
camNum = PS3EyeMulticamGetCameraCount(); |
| 15 | 15 |
printf("\nFound %d PS3Eye camera(s)...\n", camNum);
|
| 16 | 16 |
} |
| ... | ... | |
| 25 | 25 |
return PS3EyeMulticamGetFrame(pBuffer); |
| 26 | 26 |
} |
| 27 | 27 |
|
| 28 |
void ofxPS3::initPS3(int width,int height, int framerate) |
|
| 28 |
void ofxPS3::initPS3(int width, int height, int framerate) |
|
| 29 | 29 |
{
|
| 30 |
PS3EyeMulticamOpen(camNum, height==480?VGA:QVGA, framerate); |
|
| 30 |
printf("selecting format...\n");
|
|
| 31 |
PS3EyeMulticamOpen(camNum, (height==480) ? VGA:QVGA, framerate); |
|
| 31 | 32 |
PS3EyeMulticamLoadSettings(".\\data\\cameras.xml");
|
| 32 | 33 |
// get stitched image width |
| 33 | 34 |
PS3EyeMulticamGetFrameDimensions(camWidth, camHeight); |
| ... | ... | |
| 64 | 65 |
PS3EyeMulticamStop(); |
| 65 | 66 |
Sleep(50); |
| 66 | 67 |
PS3EyeMulticamSaveSettings(".\\data\\cameras.xml");
|
| 67 |
PS3EyeMulticamClose(); |
|
| 68 |
PS3EyeMulticamClose(); |
|
| 68 | 69 |
delete [] pBuffer; |
| 70 |
|
|
| 69 | 71 |
// this delete the temp settings.xml which is saved to data/cameras.xml |
| 70 | 72 |
remove("settings.xml");
|
| 71 | 73 |
} |
Also available in: Unified diff
