Skip to main content

Concepts

Sunbeam has three main inputs and outputs:

  1. An image is multipart data passed through the current OpenCV image-processing pipeline.
  2. An answer key is a multipart CSV parsed into question numbers and correct-answer values.
  3. A grade result combines OCR text, extracted student answers, and the comparison against the answer key.

The controller passes the answer key to GradingService, passes the image to ImageProcessingService, and then builds a GradeResult. OpenCV alignment and bubble extraction are implementation details that currently define the supported sheet geometry. Tesseract name and class extraction is another implementation detail and is not independently validated by the real-sheet controller tests.

Boundaries

  • The public boundary is POST /api/v1/grade.
  • The answer-key parser accepts the CSV shape represented by AnswerKey.
  • The image processor returns answers for question numbers 1 through 40.
  • The grader calculates a score on a 0-to-10 scale from the answer-key row count.
  • The controller does not define authentication, request validation, structured error responses, or persistence.