I got strange condition when showing my video using cvShowImage or even when appending image data on IPLImage, I’m not quite sure.
The image/frame should be like this:

but the imaged was displayed like this:

As you can see, some parts of frame are also moved to the leftside.
Is there anyone encounter similar issue?
while(1){
m_IPLimg1 = m_pFrameCapture->GrabOneFrame();
if(m_IPLimg1 == NULL) break;// no more frames, exit the loop
cvFlip(m_IPLimg2, NULL, 0 );
cvShowImage("Original Video", m_IPLimg1);
cvShowImage("GMM Result Video", m_IPLimg2);
char c = cvWaitKey(20);
if (c==27) break;
}
Really thanks in advance.
I got the solution, I need to format my .avi first using mencoder , since the video above I generated from image sequence, the codec seems broken. Thanks for all responses however.