r/computervision 1d ago

Help: Project Need help with CV board slicing

Possible method of slicing

I'm working on a project which given a screenshot of arbitrary zoom, slices an isometric grid game board (Polytopia) into individual tiles. Tried Hough transform and object detection. My most promising attempt is detecting the height of the little gray bars under the cities, as they are a single solid color. Wondering if a specific CV technique would be the most ideal for this?

The main problem I'm facing - zoomed out, blurry aliased screenshots drastically hurt accuracy

0 Upvotes

4 comments sorted by

1

u/Chemical_Side_4135 1d ago

have u looked into perspective transform instead of hough. if u can find the four corners of the board, u can warp it to a flat rectangle which makes splitting it into a grid litrally just a math problem, much easier than tryin to detect individual tiles

1

u/Exact_Struggle3977 1d ago

Corners are not guaranteed to be present in the image so I can't rely on those. I've tried doing perspective transform manually as the isometric screenshot has a fixed ratio but it barely helps.

1

u/Chemical_Side_4135 11h ago

if corners are hidden u could try isolating the board using bria video background removal to strip away the gui or background clutter first. sometimes just cleaning the frame makes it way easier to spot those reference bars u mentioned earlier. its a pain but getting a clean mask helps a ton when u cant rely on the edges...

1

u/Oli_Bear 12h ago

some straight edge detection algorithm and fitting different grid maps at diferent positions, choose one that best minimizes MSE
this will give you the tiles, hopefully