OMRChecker icon indicating copy to clipboard operation
OMRChecker copied to clipboard

[Feature] Support for detecting tick marks or cross marks

Open Udayraj123 opened this issue 4 months ago • 7 comments

Is your feature request related to a problem? Please describe. It'll be good to have support for tick marks/cross marks instead of just fully circled bubbles.

Describe the solution you'd like

  • Traverse each bubble point just like in the current algorithm

  • Instead of calculating the mean pixel value for a bubble, use a different algorithm to accurately detect a cross or a tick mark (open to ideas)

  • The algorithm should be able to differentiate between a slightly shifted bubble boundary(checkbox walls) vs a tick mark (no false positives) image

  • Return a fixed value for that detected bubble so that it works with existing algorithm too.

for pt in field_block_bubbles:
    # shifted
    x, y = (pt.x + field_block.shift, pt.y)
    rect = [y, y + box_h, x, x + box_w]
    q_strip_vals.append(
        # cv2.mean(img[rect[0] : rect[1], rect[2] : rect[3]])[0]
        detectCross(img, rect) ? 0 : 255
    )

Additional context

Udayraj123 avatar Feb 17 '24 03:02 Udayraj123