I am having a problem with the attached PNG file which should be recognized by the nops_scan function, but it does not.
exams::nops_scan("S0000001.PNG", file = FALSE)
Loading required namespace: png
Reading PNG files:
S0000001.PNG: Trimming PNG, rotating PNG, extracting information, done.
[1] "S0000001.PNG XXXXXXXXXXX XX 019 0 0000042 00000 10100 01000 10010
11000 10000 00100 00100 00000 01000 01000 10100 10000 11100 00000 01000
10100 00100 00010 00000 00000 00000 00000 00000 00000 00000 00000 00000
00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000 00000
00000 00000 00000 00000 00000"
This problem occurred as an interaction of two aspects:
The scanned PNG is rotated to the right and somewhat distorted (so that even after rotation to the left not everything is completely upright).
The exam ID label ("Class: OSWALD") is rather long.
The code in nops_scan() was able to deal with both issues separately. But in combination the upper border of the exam ID box was not recognized correctly, leading to traces of the text not being properly shaved
The bug was fixed in version 2.4-3 of the package. At the time of writing this is only available on R-Forge and can be installed from there. But it will also be released to CRAN soon.