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