Software Archive
Read-only legacy content
17061 Discussions

Emotion analysis with another image resolution

Nelson_B_
Beginner
520 Views

Hi,

I'm trying to run the Emotion analysis with another resolution different from the default 640x480, but if I try to change it the program gets stuck on the Init() method.

PXCSenseManager *sm = g_session->CreateSenseManager();
if(!sm){
	std::cout << "Failed to create SenseManager" << std::endl;
	return 1;
}
sm->EnableStream(PXCCapture::STREAM_TYPE_COLOR, 1920, 1080);
sm->EnableEmotion();

Handler handler(0);

if(sm->Init(&handler) >= PXC_STATUS_NO_ERROR) {

	int numFaces = 0;
	while(!g_stop){
		if(sm->AcquireFrame(true) < PXC_STATUS_NO_ERROR)
			break;

		PXCEmotion *emotionDet = sm->QueryEmotion();
		if(emotionDet != NULL) {
			PXCEmotion::EmotionData arrData[10];
			const PXCCapture::Sample *sample = sm->QueryEmotionSample();

			if(sample)
				convert_image(sample->color);
		}

		cv::imshow("Camera Feed", g_mat_image);

		sm->ReleaseFrame();

		char c = cv::waitKey(31);

		if(c == 27) {
			g_stop = true;
		}
	}
}

This something wrong with my code?

If it isn't possible to run the emotion algorithm with a different resolution is there a way to get the feed from, for exemple, opencv crop it and send it to Intel Real Sense SDK?

Thank you

0 Kudos
1 Reply
Xusheng_L_Intel
Employee
520 Views

Emotion analysis ONLY supports 640x480 resolution. 

0 Kudos
Reply