I'm implementing a system, that is receiving on the input imprecise (due to various external influences) coordinates in 2D. My goal is to assign to each coordinate position in regular rectangular mesh. I don't have knowledge on how many rows and columns are there. I know what is the typical distance between rows and columns.
Our current approach is strictly procedural - meaning that we're isolating points which we think belong to the same columns/rows and then merging them together.
I'm wondering whether there exists some suitable numerical method, we could use to fit imperfect data to a perfect rectangular mesh.
EDIT: I will try to elaborate. There are no serious real life consequences of a bad positioning. See image bellow. I receive feedback from my real-life system (step motor feedback). f(x,y), I need to assign to each box discrete position [m,n].
So in this case I would somehow expect that potential transformation to create a mesh with ~6 rows and ~5 columns and assign to each block position in that block.
In practice there may be some slight rotation factor +-10 degrees.
