I recently shifted my project library from Emgu CV to OpenCVSharp.
The code for flipping the image(using pictureBox) in Emgu CV was:
Image<Bgr,Byte> f = _capture.QueryFrame().Flip(Emgu.CV.CvEnum.FLIP.HORIZONTAL)
I tried using the Flip(CvArr dst, FlipMode flip_mode) method in OpenCVSharp, but in vain.
I am no sure what to use for dst.
The Flip method in OpenCVSharp is declared here.
The Flip method in EmguCV is declared on Line 4162 here. It sets dst to null (IntPtr.Zero in by its definition).
The original OpenCV documentation on flip is here.
For
dsteither specify acvArr(whetherIplImageorcvMatthe same size as thecvArryou are callingFlipon.This means that the flipped array will be placed in the
cvArryou pass in asdstand your source arraysrcin OpenCV andthisin OpenCVSharp will remain unchanged.If
dstis null, then the array will be flipped in place. This means your source array will be changed to be the flipped array.If you want the same behaviour as you had as before, you can safely call
myImage.Flip(null, FlipMode.Y);where myImage is your givenIplImageorcvMat.If you are using an older version OpenCVSharp , then Flip takes the source argument as well, instead of getting it from the calling object. E.g
Flip(img, null, FlipMode FlipMode.Y);