Subversion Repositories seema-scanner

Rev

Rev 244 | Rev 247 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 244 Rev 245
Line 417... Line 417...
417
    // Indicate that the current item is currently reconstructing
417
    // Indicate that the current item is currently reconstructing
418
    item->setTextColor(0, QColor(128, 128, 128));
418
    item->setTextColor(0, QColor(128, 128, 128));
419
    item->setIcon(0, QIcon::fromTheme("system-run"));
419
    item->setIcon(0, QIcon::fromTheme("system-run"));
420
 
420
 
421
    // Reconstruct the frame sequence
421
    // Reconstruct the frame sequence
422
    //QMetaObject::invokeMethod(reconstructionWorker, "reconstructPointCloud", Q_ARG(SMFrameSequence, frameSequence));
422
    QMetaObject::invokeMethod(reconstructionWorker, "reconstructPointCloud", Q_ARG(SMFrameSequence, frameSequence));
423
    frameSequence.reconstructed = true;
423
    frameSequence.reconstructed = true;
424
 
424
 
425
    captureData.push_back(frameSequence);
425
    captureData.push_back(frameSequence);
426
 
426
 
427
}
427
}
Line 529... Line 529...
529
        for(unsigned int j=0; j<captureData[i].frames0.size(); j++){
529
        for(unsigned int j=0; j<captureData[i].frames0.size(); j++){
530
 
530
 
531
            progressDialog.setValue(100.0*i/captureData.size() + 100.0/captureData.size()*j/captureData[i].frames0.size());
531
            progressDialog.setValue(100.0*i/captureData.size() + 100.0/captureData.size()*j/captureData[i].frames0.size());
532
 
532
 
533
            QString fileName0 = QString("%1/frames0_%2.%3").arg(seqDirName).arg(j).arg(format);
533
            QString fileName0 = QString("%1/frames0_%2.%3").arg(seqDirName).arg(j).arg(format);
-
 
534
 
534
            // Convert Bayer to rgb (png needs BGR order)
535
            // Convert Bayer to rgb (png needs BGR order)
-
 
536
            if(captureData[i].frames0[j].type() == CV_8UC1)
535
            cv::cvtColor(captureData[i].frames0[j], frameBGR, CV_BayerBG2BGR);
537
                cv::cvtColor(captureData[i].frames0[j], frameBGR, CV_BayerBG2BGR);
-
 
538
            else
-
 
539
                cv::cvtColor(captureData[i].frames0[j], frameBGR, CV_RGB2BGR);
-
 
540
 
536
            cv::imwrite(fileName0.toStdString(), frameBGR);
541
            cv::imwrite(fileName0.toStdString(), frameBGR);
537
 
542
 
538
            // Necessary to prevent pileup of video frame signals
543
            // Necessary to prevent pileup of video frame signals
539
            QCoreApplication::processEvents();
544
            QCoreApplication::processEvents();
540
 
545
 
541
            QString fileName1 = QString("%1/frames1_%2.%3").arg(seqDirName).arg(j).arg(format);
546
            QString fileName1 = QString("%1/frames1_%2.%3").arg(seqDirName).arg(j).arg(format);
-
 
547
 
542
            // Convert Bayer to rgb (png needs BGR order)
548
            // Convert Bayer to rgb (png needs BGR order)
-
 
549
            if(captureData[i].frames1[j].type() == CV_8UC1)
543
            cv::cvtColor(captureData[i].frames1[j], frameBGR, CV_BayerBG2BGR);
550
                cv::cvtColor(captureData[i].frames1[j], frameBGR, CV_BayerBG2BGR);
-
 
551
            else
-
 
552
                cv::cvtColor(captureData[i].frames1[j], frameBGR, CV_RGB2BGR);
-
 
553
 
544
            cv::imwrite(fileName1.toStdString(), frameBGR);
554
            cv::imwrite(fileName1.toStdString(), frameBGR);
545
 
555
 
546
            // Necessary to prevent pileup of video frame signals
556
            // Necessary to prevent pileup of video frame signals
547
            QCoreApplication::processEvents();
557
            QCoreApplication::processEvents();
548
            if(progressDialog.wasCanceled())
558
            if(progressDialog.wasCanceled())