I'd humbly suggest just taking a nice clear photo as flat as you can, then totally flatten it with the perspective tool in GIMP. I'd drag guides to the near-side corners (probably the bottom edge unless you're taking the photo at 90 degrees or something) and squeeze the far-side corners in to match, and, with a bit more faffing, job done.
(,
Fri 27 Feb 2026, 17:21,
archived)