I have 2 images, one is the original image which has grids in it, the other is the same image except it has digits written in those grids, and is rotated, I am supposed to find the rotation angle for that image so that I can make it straight and recognize those digits written.
For the digits I'd probably put them in 2D pixel arrays and see the patterns, but I can't really understand how to write the code to detect the rotation angle. This has been answered here Calculating translation value and rotation angle of a rotated 2D image, but I have no idea how to translate that code into C#.
Also, I can't use any libraries that do all that for me, I need to implement the algorithm from scratch. I can only use byte arrays and the Bitmap class.
Here are the picture examples: