there is a problem in code for sequenced blobs counter
every time we add a blob to existing blobs we must recount , because blob is alive and we want to find sequences of frames that blob is not appear,
without this line we are count all frames that blob is disappear
void addBlobToExistingBlobs(Blob& currentFrameBlob, std::vector& existingBlobs, int& intIndex) {
existingBlobs[intIndex].currentContour = currentFrameBlob.currentContour;
existingBlobs[intIndex].currentBoundingRect = currentFrameBlob.currentBoundingRect;
existingBlobs[intIndex].centerPositions.push_back(currentFrameBlob.centerPositions.back());
existingBlobs[intIndex].dblCurrentDiagonalSize = currentFrameBlob.dblCurrentDiagonalSize;
existingBlobs[intIndex].dblCurrentAspectRatio = currentFrameBlob.dblCurrentAspectRatio;
existingBlobs[intIndex].blnStillBeingTracked = true;
existingBlobs[intIndex].blnCurrentMatchFoundOrNewBlob = true;
existingBlobs[intIndex].intNumOfConsecutiveFramesWithoutAMatch=0;
}
there is a problem in code for sequenced blobs counter
every time we add a blob to existing blobs we must recount , because blob is alive and we want to find sequences of frames that blob is not appear,
without this line we are count all frames that blob is disappear
void addBlobToExistingBlobs(Blob& currentFrameBlob, std::vector& existingBlobs, int& intIndex) {
existingBlobs[intIndex].currentContour = currentFrameBlob.currentContour;
existingBlobs[intIndex].currentBoundingRect = currentFrameBlob.currentBoundingRect;
existingBlobs[intIndex].centerPositions.push_back(currentFrameBlob.centerPositions.back());
existingBlobs[intIndex].dblCurrentDiagonalSize = currentFrameBlob.dblCurrentDiagonalSize;
existingBlobs[intIndex].dblCurrentAspectRatio = currentFrameBlob.dblCurrentAspectRatio;
existingBlobs[intIndex].blnStillBeingTracked = true;
existingBlobs[intIndex].blnCurrentMatchFoundOrNewBlob = true;
existingBlobs[intIndex].intNumOfConsecutiveFramesWithoutAMatch=0;
}