Some additional details and small corrections to what I said earlier. I’ll put it in an ‘accordion’ to avoid cluttering the thread.
Click to expand and read
Gray can be white
I said that the paper is actually gray, but that depends on the lighting that hits it. In scanners, the paper background can reach absolute digital white (#FFFFFF) with the scanner light shining on it, but the brightness level influences the other elements, such as the pen markings: if the glare is too strong, it can blow out the pen’s highlight, increasing its luminance (the Y component) and, therefore, reducing contrast.
Chemistry is an exact science, but not exactly exact
Each pen has a different composition: Bic’s blue is different from Compactor’s blue, because Bic uses one composition for its ink and Compactor uses another, and even pens from the same brand will have differences because chemical composition hardly ever can be exact and micrometric in industrial processes (like pen manufacture).
These two things will generate differences, even if subtle, in the luminance of the pen markings. However, exams like ENEM (which is state-run) cannot force a specific brand (“only Bic pens”) because that could raise doubts about the exam’s neutrality.
Calibration
There enters another factor: scanner calibration. They calibrate the scanner to anticipate the differences between the various brands of pens (and minor differences in the chemical composition of the same brand).
And why calibration? Because of the contrast I mentioned earlier. An OCR (Optical Character Recognition) needs to distinguish between two areas: where something is marked vs where it is not marked. Hence the notion of the “monochromatic” factor: it converts the three color channels (RGB) into a single one (Luma/Y) to feed the OCR algorithm, which will do quantization (in Portuguese: “up to a certain gray level, it’s zero/unmarked, from this point, it’s one/marked”) and segmentation of congruent areas (that is: which nearby areas are marked, and which nearby areas are unmarked, which involves technical applications such as matrix convolution).
Today there are AIs (Visual Models) but they frequently hallucinate (just see Grok, ChatGPT, Gemini and others when interpreting images), and computer vision on a gabarito needs to be as exact and precise as possible, so they certainly do not use visual models for that. This leads to your following quote:
Outdated? Indeed, we can call it that, but imagine if AI hallucinated a marking that wasn’t made? That’s why they use “established” OCR algorithms, which involve meticulously engineered algorithms to quantify answer sheets, which also explains those “little squares” on the edges of the answer key (which serve to align a real-world object, the sheet, in a virtual grid, but also give a reference for leveling the brightness):
Black pen… or pencil?
After I posted earlier, I looked into this issue of the black pen. It happens that the black pen, to the naked eye, can look like a pencil marking, and a pencil is obviously prohibited (because it can be erased, or the candidate could argue that the original answer was erased). There is a superficial visual inspection, where a human looks at the sheet to identify possible erasures, and this inspection will also check whether it was made with a pen: if not, they won’t pass it to the scanner, they will immediately fail that answer key.
I don’t know why some exams allow (like entrance exams), but perhaps it’s due to quantity: fewer candidates, fewer answer keys to inspect, so you can inspect better whether it’s pencil or pen. ENEM has many candidates (millions), and the less time they spend on the answer keys, the faster they release the millions of results into the system.