Subversion Repositories Code-Repo

Rev

Rev 287 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 287 Rev 289
Line 36... Line 36...
36
	ScriptNode scriptNode;
36
	ScriptNode scriptNode;
37
	EnumerationErrors errors;
37
	EnumerationErrors errors;
38
 
38
 
39
	// Check if the config file exists
39
	// Check if the config file exists
40
	const char *fn = NULL;
40
	const char *fn = NULL;
41
	if (fileExists(SAMPLE_XML_PATH)) fn = SAMPLE_XML_PATH;
41
	if (fileExists(CONFIG_XML_PATH)) fn = CONFIG_XML_PATH;
42
	else if (fileExists(SAMPLE_XML_PATH_LOCAL)) fn = SAMPLE_XML_PATH_LOCAL;
42
	else if (fileExists(CONFIG_XML_PATH_LOCAL)) fn = CONFIG_XML_PATH_LOCAL;
43
	else {
43
	else {
44
		QString error = QString("Could not find " + QString(SAMPLE_XML_PATH) + " nor " + QString(SAMPLE_XML_PATH_LOCAL));
44
		QString error = QString("Could not find " + QString(CONFIG_XML_PATH) + " nor " + QString(CONFIG_XML_PATH_LOCAL));
45
		emit setStatusString(error);
45
		emit setStatusString(error);
46
		exit(XN_STATUS_ERROR);
46
		exit(XN_STATUS_ERROR);
47
		return;
47
		return;
48
	}
48
	}
49
	// Load the config file
49
	// Load the config file
Line 118... Line 118...
118
		emit setStatusString(status);
118
		emit setStatusString(status);
119
		emit setFPSString(QString::number(xnFPSCalc(&xnFPS)));
119
		emit setFPSString(QString::number(xnFPSCalc(&xnFPS)));
120
		emit setFrameString(QString::number(depthMD.FrameID()));
120
		emit setFrameString(QString::number(depthMD.FrameID()));
121
 
121
 
122
		// Allocate a new cv::Mat
122
		// Allocate a new cv::Mat
123
		cv::Mat depthData = cv::Mat(240, 320, CV_16UC1);
123
		cv::Mat depthData = cv::Mat(Y_RES, X_RES, CV_16UC1);
124
 
124
 
125
		// Save the depth data (mirrored horizontally)
125
		// Save the depth data (mirrored horizontally)
126
		ushort *p;
126
		ushort *p;
127
		for (int y = 0; y < Y; ++y) {
127
		for (int y = 0; y < Y; ++y) {
128
			p = depthData.ptr<ushort>(y);
128
			p = depthData.ptr<ushort>(y);