Specifies an analysis engine for OMR forms to compute their statistics and grades.
public class OmrAnalysisEngine
public class OmrAnalysisEngine
Public Class OmrAnalysisEngine
public:
ref class OmrAnalysisEngine
OmrAnalysisEngine can be used to compute filled-in forms grades. The answers get marked based on the filled-in form provided as an answer key in the Constructor of this class.
If no answer key is available, users can fill the OmrAnalysisEngine.Grades property by creating grade objects manually.
After properly filling the OmrAnalysisEngine.Grades and the OmrAnalysisEngine.FilledForms properties, the user can grade forms and generate the OmrGradesStatistics object using OmrAnalysisEngine.GradeForms.
The following example is a snippet of a larger example project. To run the larger example project, follow the work flow laid out in the OMREngine example. You can also download the complete example in Visual Studio 2017.
using Leadtools;
using Leadtools.Barcode;
using Leadtools.Codecs;
using Leadtools.Forms.Processing.Omr;
using Leadtools.Ocr;
public static void PerformAnalysis(List<IRecognitionForm> recognizedForms, IRecognitionForm answers)
{
int threshold = 70; // pass/fail threshold value
OmrAnalysisEngine omrAnalysisEngine = new OmrAnalysisEngine(recognizedForms, answers);
omrAnalysisEngine.PassingScore = threshold;
// this call generates both the OmrGradesStatistics and populates the IRecognitionForm.Grade and Score properties
OmrGradesStatistics statistics = omrAnalysisEngine.GradeForms();
// print out the generated basic statistics (skipping the histogram)
Console.WriteLine("Statistics");
PropertyInfo[] properties = statistics.GetType().GetProperties();
for (int i = 0; i < properties.Length; i++)
{
PropertyInfo pi = properties[i];
if (pi.PropertyType == typeof(Double) || pi.PropertyType == typeof(UInt32))
{
Console.WriteLine("{0}:\t{1}", pi.Name, pi.GetValue(statistics));
}
}
// print out the final grade for each exam
for (int i = 0; i < recognizedForms.Count; i++)
{
IRecognitionForm form = recognizedForms[i];
string text = string.Format("{0}:\t {1}%", form.Name, form.Grade.ToString("0.#"));
Console.WriteLine(text);
}
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document