IplImage* img5=0;
img5=cvLoadImage(ui->textEdit_3->toPlainText().toLatin1(),1);
QImage input
=this
->IplImageToQImage
(img5,
false);
while(i<numFrames){
if(i<(SelectedFrame+numofFrames)){
cvGrabFrame(capture);
img2=cvRetrieveFrame(capture);
qimage=this->IplImageToQImage(img2,false);
p.drawImage(xcoordinate, ycoordinate, input , 0,0,-1,-1,Qt::AutoColor);
img3=this->qtToCv(&(qimage));
cvWriteFrame(writer,img3);
i++;
img2=0;
img3=0;
}
else {
cvGrabFrame(capture);
img2=cvRetrieveFrame(capture);
cvWriteFrame(writer,img2);
i++;
img2=0;
}
ui->progressBar_2->setValue(i);
}
QImage qimage;
IplImage* img5=0;
img5=cvLoadImage(ui->textEdit_3->toPlainText().toLatin1(),1);
QImage input=this->IplImageToQImage(img5,false);
while(i<numFrames){
if(i<(SelectedFrame+numofFrames)){
cvGrabFrame(capture);
img2=cvRetrieveFrame(capture);
qimage=this->IplImageToQImage(img2,false);
QPainter p(&qimage);
p.drawImage(xcoordinate, ycoordinate, input , 0,0,-1,-1,Qt::AutoColor);
img3=this->qtToCv(&(qimage));
cvWriteFrame(writer,img3);
i++;
img2=0;
img3=0;
}
else {
cvGrabFrame(capture);
img2=cvRetrieveFrame(capture);
cvWriteFrame(writer,img2);
i++;
img2=0;
}
ui->progressBar_2->setValue(i);
}
To copy to clipboard, switch view to plain text mode
Bookmarks