I'm trying to improve the performance of my project so I'm trying to figure out which operation is taking time.
I've noticed that my
unsigned char* img; //Size is 1280*720*2
img = camera1->captureLastFrame();
qDebug()<<QString::number(timer.nsecsElapsed()/1000000) + " ms";
void video(unsigned char* copy);
connect(this, SIGNAL(video(unsigned char*)), ui->widget, SLOT(videodisplay(unsigned char*)));
If the connection is in a single thread, you perform the
emit command and also the slot, then program continues to next row that's the
qDebug one. So probably is not the signal slow, but the slot(s) that are connected to it.
Try to remove all connections using that signal, and adding it one at time in order to check the slow one. Or, better, try to use a profiler in order to check the bottleneck in this operation (valgrind on Linux, glowcode or similar in windows).