rpcm icon indicating copy to clipboard operation
rpcm copied to clipboard

localization_iterative max number of iterations 100 is too small

Open drzhouq opened this issue 3 years ago • 8 comments

Though 100 is a good number, yet we found sometimes we need more than 100 (253) to converge. Suggest increase this number to 500? Many thanks.

drzhouq avatar Apr 29 '21 00:04 drzhouq

@carlodef any response? Do I need to create a pull request?

drzhouq avatar Jun 21 '21 19:06 drzhouq

Hi @drzhouq, could you please provide an example? Thanks

carlodef avatar Jun 21 '21 21:06 carlodef

I cannot give you the image example for the issue, but the issue line is at https://github.com/centreborelli/rpcm/blob/07560868ad28515d182cfd65df55ca4b027e1127/rpcm/rpc_model.py#L230

Why the arbitrary 100 is decided? perhaps allow the 100 to be changed with an environment variable? Anyhow, as I stated in the issue, some image file needs 253 iterations to converge.

drzhouq avatar Jun 22 '21 01:06 drzhouq

No need to share an image, a list of RPC coefficients would be enough. I'd like to reproduce your issue.

In general, the loop converges in one or two iterations.

carlodef avatar Jun 22 '21 08:06 carlodef

Sorry for the tardy response, Carlo. Side tracked by other things. This is the RPC data I had issue with. RPC.txt

Let me know if you need more information in order to debug. Thanks.

drzhouq avatar Jul 01 '21 17:07 drzhouq

I have problems too relating to this. May I ask exactly what are the reasons why this convergence may not happened? I am using this package for perform a DEM from a Skysat triplet of stereo images. And the processing ends at around 97% of the images. I am quite new in this topic and I cannot understand what exactly this code is doing. Visualizing the images I see that all of them are overlapping. I start removing, from the input, the images that are read just before the last iteration, but nothing seems changing. Could you please support me? thank you a lot. PS: the increase of the iteration number seems to not solve the problem.

Bea07 avatar Jul 22 '21 05:07 Bea07

looks like
https://github.com/centreborelli/rpcm/blob/07560868ad28515d182cfd65df55ca4b027e1127/rpcm/rpc_model.py#L228 can get Nan values causing it to always return false

gilgilad avatar Mar 08 '22 13:03 gilgilad

maybe : e1=0; @ 236 e1 = X1 - X0

manyy avatar Jul 03 '22 12:07 manyy