🎮 Simulator EP06_03: OMR Mark Classification
4 Alternatives
Adjust the fill level of each bubble (A–D) and the threshold to observe the resulting classification.
–
After sheet rectification and segmentation of answer frames, MCTest estimates, for each bubble, a fill degree, represented by a value between \(0\) and \(100\). Based on these values, the system must automatically determine the marked alternative, also identifying blank questions and cases of multiple markings.
In this exercise, you will implement this decision stage of the OMR pipeline. The classification depends on a fill threshold: small variations in this value can alter the result of automatic reading.
A, B, C, …, in input order.BRANCO.A, B, C, …).DUPLA_MARCACAO.OK (single marking), BRANCO, and DUPLA_MARCACAO.A, index \(1\) to alternative B, and so on.DUPLA_MARCACAO, regardless of their respective fill degrees.| Situation | Classification | Interpretation |
|---|---|---|
| Exactly one alternative above the threshold | Letter of the alternative | Valid answer |
| No alternative above the threshold | BRANCO |
Unanswered question |
| Two or more alternatives above the threshold | DUPLA_MARCACAO |
Ambiguous answer |
The fill threshold controls the sensitivity of the algorithm. Very low values tend to increase the number of DUPLA_MARCACAO, while very high values may increase the number of questions classified as BRANCO.
Input:
Output:
OK: x BRANCO: y DUPLA_MARCACAO: z.| Input | Output | Observation |
|---|---|---|
| 3 4 50 10 85 5 12 20 15 18 22 90 88 10 5 |
B BRANCO DUPLA_MARCACAO OK: 1 BRANCO: 1 DUPLA_MARCACAO: 1 |
In the first question only B exceeds the threshold; in the second, no alternative exceeds it; in the third, A and B exceed the threshold. |
| 1 2 50.0 50 50 |
BRANCO OK: 0 BRANCO: 1 DUPLA_MARCACAO: 0 |
Values equal to the threshold are not considered valid markings. |
%%writefile EP06_03.py
# Python codeOverwriting EP06_03.py
TestSuite("EP06_03.py").run()✔️ EP06_03.cases already exists in casos/
📋 5 case(s) loaded from casos/EP06_03.cases
🔍 Testing Python: EP06_03.py
⚠️ EP06_03.py: Empty file (fewer than 3 lines). Tests skipped.