Exemplo n.º 1
0
void moPS3EyeModule::start() {
	LOGM(MO_TRACE, "start ps3 camera");

	printf("selecting format...\n");
	camWidth = 320;
	camHeight = 240;
	framerate = 60;
	camNum = PS3EyeMulticamGetCameraCount();
	PS3EyeMulticamOpen(camNum, VGA, framerate);
	PS3EyeMulticamLoadSettings(".\\data\\cameras.xml");
	// get stitched image width
	PS3EyeMulticamGetFrameDimensions(camWidth, camHeight);
	frame = cvCreateImage(cvSize(camWidth, camHeight), IPL_DEPTH_8U, 1);	
	printf("camWidth / camHeight: %d / %d\n", camWidth, camHeight);
	// Allocate image buffer for grayscale image
	pBuffer = new BYTE[camWidth*camHeight];
	// Start capturing
	PS3EyeMulticamStart();
	printf("ps3 cam started\n");

	moModule::start();	
}
Exemplo n.º 2
0
int ofxPS3::getDeviceCount()
{
	return PS3EyeMulticamGetCameraCount();
}
Exemplo n.º 3
0
void ofxPS3::listDevices()
{
	// Enumerate the cameras on the bus.
	camNum = PS3EyeMulticamGetCameraCount();
 	printf("\nFound %d PS3Eye camera(s)...\n", camNum);
}