public static void Run() { // ExStart:SkewedImageSecondMethod // The path to the documents directory. string dataDir = RunExamples.GetDataDir_OCR(); // Load the image to be analyzed OmrImage image = OmrImage.Load(dataDir + "answers.jpg"); OmrEngine engine = new OmrEngine(new OmrTemplate()); // Get skew degree of the image double degree = engine.GetSkewDegree(image); // Rotate image to correct skew engine.RotateImage(ref image, degree); // Save image image.AsBitmap().Save(dataDir + "result_out.jpg"); // ExEnd:SkewedImageSecondMethod }