........
.......
// Loop ...
while(camSwitch != false)
{
// Wait 5000 MillSeconds for a frame
if(Ret == FCE_NOERROR)
Ret = FGGetFrame(hCamera, &Frame, 5000);
if(Ret == FCE_NOERROR)
Ret = FGPutFrame(hCamera, &Frame);
cvNamedWindow("1", CV_WINDOW_AUTOSIZE);
camImage.setColorTable(grayscales);
Display
->scene
()->setBackgroundBrush
(QBrush::QBrush(camImage
));
Display->fitInView(0,0,640,480);
cvWaitKey(50);
}
QImage camImage;
........
.......
// Loop ...
while(camSwitch != false)
{
// Wait 5000 MillSeconds for a frame
if(Ret == FCE_NOERROR)
Ret = FGGetFrame(hCamera, &Frame, 5000);
if(Ret == FCE_NOERROR)
Ret = FGPutFrame(hCamera, &Frame);
cvNamedWindow("1", CV_WINDOW_AUTOSIZE);
camImage = QImage::QImage(Frame.pData, 640, 480, QImage::Format_Indexed8);
camImage.setColorTable(grayscales);
Display->scene()->setBackgroundBrush(QBrush::QBrush(camImage));
Display->fitInView(0,0,640,480);
cvWaitKey(50);
}
To copy to clipboard, switch view to plain text mode
Bookmarks