I'm using Emgu.CV in several C# project to save video files. This works fine in most circumstances.
But then I saved a video with dimensions 431 x 359 (odd dimensions). I'm converting each frame to an Image<Bgr,byte> object and then saving it using
VW?.Write(img.Mat);
I have checked that this Mat object also has dimensions 431 x 359. But the saved file dimensions are 430 x 358. There appears to be a black line through the right-most pixels in the saved video. This is the code where I initialize the Emgu VideoWriter, and I have checked that the size also has dimensions 431 x 359:
int codec = Emgu.CV.VideoWriter.Fourcc('X', 'V', 'I', 'D');
VW = new Emgu.CV.VideoWriter(filename, codec, fps, size, true); //XVID-codec
I'm using Emgu.CV version 4.5.1.4349.
It's not a problem, but I'm interested to know if anyone knows why this happens. I can't find any documentation describing this behavior.