public static void Run()
{
// ExStart:DetectUsingElements
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_OCR();
// Load template file and Instantiate the recognition engine for the template
OmrTemplate template = OmrTemplate.Load(dataDir + "questions.amr");
OmrEngine engine = new OmrEngine(template);
// First, remove all default steps
engine.ProcessingPipeline.Clear();
// Now add the grayscale convertor It may not be necessary to add it if the scans are already in grayscale and Adding the Otsu’s binarization algorithm
engine.ProcessingPipeline.Add(new GrayscaleAlgorithm());
engine.ProcessingPipeline.Add(new OtsuBinarizationAlgorithm());
// ExEnd:DetectUsingElements
}
}