0

I'm trying to detect pieces on a photographed checkerboard. Determining the corners of each square works fine, but for each of those squares I'd like to generate an image from the original image and the four corners. How can I do this?

Edit: To be clear, the four corners don't form a square (or even a rectangle) yet, as we're dealing with a photograph that could be taken at a rotation and at an angle. For instance, the corners might be

{{0, 3}, {5, 4}, {7, 10}, {0, 8}}

I'd like to transform the image in such a way that these points are mapped like this:

{0,  3} -> {0, 0}
{5,  4} -> {0, y}
{7, 10} -> {x, y}
{0,  8} -> {x, 0}

with x the width and y the height of the transformed image.

Tim Vermeulen
  • 407
  • 3
  • 11

0 Answers0