Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to ignore the first and the last 10% of the videoCaption ?

Hello,

I've a video which starts by black stream and ends with black stream I want to ignore these parts while reading this capture

Mat frameReference;
double lengthAD = captRefrnc.get(CV_CAP_PROP_FRAME_COUNT);
int partBegin = 0.1*length;
captRefrnc.set(CV_CAP_PROP_POS_FRAMES,partBegin );
while(1){
    captRefrnc >> frameReference;
    if (frameReference.empty()){
        cout << " <<< AD sequence ended!  >>> " << sourceReference <<endl;
        break;
    }

but I can ignore the 10% part but how to ignore the 10% part at the end

How to ignore the first and the last 10% of the videoCaption ?

Hello,

I've a video which starts by black stream and ends with black stream I want to ignore these parts while reading this capture

Mat frameReference;
double lengthAD = captRefrnc.get(CV_CAP_PROP_FRAME_COUNT);
int partBegin = 0.1*length;
captRefrnc.set(CV_CAP_PROP_POS_FRAMES,partBegin );
while(1){
    captRefrnc >> frameReference;
    if (frameReference.empty()){
        cout << " <<< AD sequence ended!  >>> " << sourceReference <<endl;
        break;
    }

but I can ignore the 10% part but how to ignore the 10% part at the end