pyaota.image.warper module

pyaota.image.warper.detect_bubble_centers(img_gray, expected_positions, search_radius=200)[source]

Find actual bubble centers near expected positions in the roughly-warped image.

Parameters:
  • img_gray (grayscale image after initial 4-corner warp)

  • expected_positions (list of (x, y) canonical bubble positions)

  • search_radius (how far to search around each expected position)

Returns:

  • detected_centers (list of (x, y) actual detected positions)

  • valid_mask (boolean array indicating which bubbles were successfully detected)

pyaota.image.warper.thin_plate_spline_warp(img, src_points, dst_points)[source]

Apply thin-plate spline warp using detected control points. This handles non-rigid, local deformations.

pyaota.image.warper.warp(raw_img, corner_indicials, canonical_corners, canonical_page_dimensions)[source]

Two-stage warping to handle local page deformations.

Parameters:
  • raw_img (the scanned image with deformations)

  • corner_indicials (detected (x, y) of 4 corner markers in raw image)

  • canonical_corners (canonical (x, y) of 4 corner markers)

Returns:

warped

Return type:

image after two-stage correction