-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
applyDistortion does not propagate precision. #244
Comments
Ground precision can very drastically within an image. Consider a flyby image where the whole disk is visible, or a wide angle camera with a FOV near 180deg. The distortion calculations only involve the focal plane why bring the ground into this? If we are going to propagate something why not the pixel pitch or use the coefficients for TransX,Y. These are usually the pixel pitch or very near to it. |
A couple thoughts:
I think using a hard-coded percentage of the pixel pitch and using the ground resolution with the desired precision are a "six of one, half-dozen of the other". For that reason, I'd go with the simpler solution, the hard-coded percentage of the pixel pitch. |
I've noticed an issue with CTX data which is likely related to this. In the ground-to-image calculation, first an iterative scheme takes place which finds the correct line. No distortion is assumed. That scheme runs until the error goes below desired precision. Then distortion is applied to the computed line and sample, another error is evaluated, and now the error is way above what was asked by the caller. If this last error is the correct one, maybe the distortion operation should happen during the iterative scheme. I will attach below this a testcase (this has the model state, not the ISD). |
Adding iterative distortion inversion is a non-trivial amount of overhead. We could instead "portion" the precision so that we iterate until half the precision when doing the line search and then iterate until half the precision in the distortion inversion. |
The testcase for this is now in the usgscsm repo, and is named tests/data/ctxLineScan.json. |
@acpaquette : Is this related to #436? |
@oleg-alexandrov That last comment from Jesse does seem related but the overhead seems negligible? Granted 5 seconds of overhead isn't negligible but does fix the problem we were seeing in KaguyaTC. I think coming back to this as a potential fix to speed up the fix applied in #436 would be a good idea |
Ah, right. This original issue as filed was about propagation of precision, not modeling the distortion in ground-to-image, which is what you fixed. |
Right, and I think the case may be that the original change to the projective transform may be enough of a save that we can add the iterative distortion inverse in #436 and be about the same speed as before. It's hard to say. I think you are right though that this is related to the above discussion |
applyDistortion
in Distortion.cpp currently uses the default value for desirePrecision. ISIS3 uses pixel pitch which CSM does not have access too. We should probably propagate the desired ground precision and convert that to a precision in focal plane space.The text was updated successfully, but these errors were encountered: