How to avoid rotation of rects, detected by MinAreaRect?
问题 I am trying to detect text fields on Windows Form but CvInvoke.MinAreaRect(contour) returns rectangle, rotated by -7.29419661 Angle. My code is Image<Bgr, Byte> a = new Image<Bgr, byte>(@"d:/Art/documents/Projects/InputFieldsDetector/Images/Form345_1.PNG"); imageBox1.Image = a; UMat grayed = new UMat(); CvInvoke.CvtColor(a, grayed, ColorConversion.Bgr2Gray); imageBox2.Image = grayed; UMat canny = new UMat(); CvInvoke.Canny(grayed, canny, 50, 200, 3); imageBox3.Image = canny;