findHomography inaccurate as it moves to left side of image

It’s a bit surprising it would hang - I would think even if it was having trouble converging to a reasonable solution it would “time out” after some number of iterations. I’m not sure what is causing it to hang, but a few thoughts:

  1. If you are using CALIB_USE_INTRINSIC_GUESS, your camera matrix should have sensible values. I would start with your CX, CY parameters at the numerical center of the image unless you have an unusual camera and specific knowledge about where it actually is. For FX, FY parameters I’d probably use something like half the width of the image - that would correspond to a HFOV of 90 degrees and is probably decent starting point. If you are using 1 for your FX parameter (I think you mentioned that before), that might be a bad enough starting point that the algorithm wouldn’t converge. Not sure.

Also if you are manually populating the camera matrix, make sure you are indexing into it correctly - otherwise you might be inadvertently using the transpose of of the matrix, which would be nonsensical (wouldn’t work for calibrateCamera). Print it out, it should look like:

Fx 0 CX
0 Fy CY
0 0 1.0

(And Fx/Fy should be the same value)