You can take a look at this.
Basic principle of optical tag reader;
Scanning head (CIS, CCD, etc. ) to obtain a digital image (pixel array) of the answer sheet.
Image recognition software first recognizes the positioning mark blocks printed around the answer sheet (these mark blocks have standard size and blackness and are easy to identify), and then establishes the coordinate system of the image.
The image recognition software locates the position (coordinates) of each option on the image according to the printing position (relative to the position of the marker block) of each option that has been stored in the memory.
Taking these positions as the center, select pixels in a certain area (usually less than the range allowed by the respondent), calculate the sum of gray values of all pixels in each area, and compare with a certain threshold. If it is higher than this, it is considered that the respondent has drawn a picture (select this option).
Image recognition software compares the identified option set with the standard answer to determine whether the answer to each question marked by the respondent is correct.
These are just the most basic treatments. In fact, in order to adapt to various situations, many other professional algorithms are provided in the products that can sell money, such as image racemization, noise reduction, gray balance and so on.
So, your grades won't affect your grades, don't worry.