void ofxPS3::initPS3(int width, int height, int framerate) { printf("selecting format...\n"); PS3EyeMulticamOpen(camNum, (height==480) ? VGA:QVGA, framerate); PS3EyeMulticamLoadSettings("data/settings/cameras/cameras.xml"); // get stitched image width PS3EyeMulticamGetFrameDimensions(camWidth, camHeight); // Allocate image buffer for grayscale image pBuffer = new BYTE[camWidth*camHeight]; // Start capturing PS3EyeMulticamStart(); }
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(); }