Subversion Repositories seema-scanner

Rev

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

Rev 120 Rev 207
Line 57... Line 57...
57
//        return img;
57
//        return img;
58
}
58
}
59
 
59
 
60
 
60
 
61
void SMVideoWidget::showImageCV(cv::Mat image){
61
void SMVideoWidget::showImageCV(cv::Mat image){
-
 
62
    if(image.rows){
-
 
63
        QImage qimage = cvMat2qImage(image);
62
 
64
 
63
    QImage qimage = cvMat2qImage(image);
-
 
64
 
-
 
65
    // correct size only if label has no borders/frame!
65
        // correct size only if label has no borders/frame!
66
    int w = this->width();
66
        int w = this->width();
67
    int h = this->height();
67
        int h = this->height();
68
 
68
 
69
    pixmap = QPixmap::fromImage(qimage);
69
        pixmap = QPixmap::fromImage(qimage);
70
    this->setPixmap(pixmap.scaled(w,h,Qt::KeepAspectRatio));
70
        this->setPixmap(pixmap.scaled(w,h,Qt::KeepAspectRatio));
71
 
71
    }
72
}
72
}
73
 
73
 
74
void SMVideoWidget::resizeEvent(QResizeEvent *event){
74
void SMVideoWidget::resizeEvent(QResizeEvent *event){
75
 
75
 
76
    if(!pixmap.isNull()){
76
    if(!pixmap.isNull()){