If you're in a professional environment where time saved will pay for capital equipment, consider an optics table and a collimating lens. You'll have to take great care to make sure that the resulting optics train doesn't add appreciable distortion, but you'll be able to do the work in a room.
If you're a student or amateur -- find a nice building, with ...
If it helps, try a simpler version. Just look at two neighbouring pixels in a row.
First example: There is 10 and 10. Difference between them is 0, no difference, no edge.
Second example: In the middle, there is 10 and 0. Difference is -10 because it drops from 10 to 0. There is a step of -10, that must be an edge.
The 3x3 kernel just takes the source pixel ...
I managed to figure it out. In addition to altering the intrinsic matrix, I also had to apply a 3D rotation around the z axis, in camera space. (since z is the forward pointing axis)
So I just altered the projection matrix to be:
P = K' \cdot rot_z \cdot [R|t]
cos(90°) & -sin(90°) & 0 \\
sin(90°) & cos(90°)...
I believe Haar Cascades(used by Viola-Jones) are inherently scale-invariant. Also severely deprecated by modern Neural Networks, but I know nothing about those. It also doesn't do any OCR - if you need that you would need to run a separate algorithm on the extracted sub-image.