How to fix vertically mirrored image

Apr 15, 2015 at 12:26 PM

first of thank you for this amazing work.
I am working on a high frame rate camera system and so far your tool was the only thing I found that could keep up with the number of images.

I just have one problem with one of my cameras:
The video appears to be mirrored vertically and I do not know how to fix this.

Can you tell me what I need to do in order to get a "correct" video?

Thank you very much,
Apr 20, 2015 at 4:31 PM

SharpAvi itself cannot help you with mirroring image. E.g. there is no such switch or parameter.
I'll think about adding this capability to video streams.

For now, you should do the mirroring of the data in your code before passing it to video stream.
You can use method FlipVertical in class BitmapUtils as reference.

It's interesting that you have such behavior with only one of the cameras.
BTW, what camera models do you use and at what resolution/framerate?
Apr 20, 2015 at 7:41 PM
When having a look at your source code I found some methods about flipping - that is why I thought there might be a way.
Doing the flip in my code seems impossible because of the high frame rate that I use - any additional operation before passing the byte array to SharpAvi causes my framerate to drop drastically.

I am using Ximea USB 3 Monochrome Cameras at framerates of 500fps at VGA and 170fps at 2Mpx resolution.

Also I do see this phenomenon on both of the cameras that I use - sorry if I gave you a wrong impression.
It is just that when reading the images coming from the camera as Bitmaps they look fine, but when grabbing them as byte arrays then they appear flipped.

But I guess I can also solve this in post processing. As I am using the uncompressed file creation (because of the 8bit Grayscale images) the files become large very quickly. So when doing file size reduction I could also do the flipping.

If you ever find a way let me know.

Thanks again for this amazing tool - without it I would not have been able to set my system up.