I'm trying to develop a sudoku solver, using image processing, ocr with neural networks and such. I've got the bare solver working, I can successfully interpret numbers and letters from a picture. All of this is done in GNU Octave. Now I am trying to make it more robust, and I've found this question on stack overflow which greatly helped with most of the image processing. But now I am left with the last part - transforming the single "squares" so that they are uniform and (mostly) square. What I would like to have: A method that from one set of $(X,Y)$ corner coordinates, e.g.:$(73,86), (117,88), (70,127), (115,128)$ would transform the image with interpolation to the set of coordinates, e.g.: $(0,0), (50,0), (0,50), (50,50)$.
I have looked at the functions supplied with octave and there are these possibilities:
but both of them require, for me to know the affine matrix.
Is there a thing I've overlapped with these functions, or could someone here point me in a direction to develop such a function?