-
Notifications
You must be signed in to change notification settings - Fork 1
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
Calibration with known camera position #1
Comments
Thank you very much for your interest in UCalib. We appreciate it. We find your suggestion very interesting. We are going to modify it, so there is no need for you to work on it ;). We will update the code before the end of this week. We will let you know. |
@myronzbrown |
Thank you! I'll try it out this week. |
Thanks. I tried it today, and it works well. Maybe you can help with a separate issue I see. There appears to be a random seed based on time in the code. I sometimes get very good results but then at other times complete failures with errors > 100 for the same images with the same GCPs. It does appear correlated with time. I had hoped this was just some unreliability from trying to estimate too many parameters that would go away when constraining the known camera position, but it looks like more than that. Is this something you have noticed? |
Thank you for your message and thoughts. We are glad that the parameter forcing is working despite the fact that sometimes the error is large. Regarding the latter, as you suggest, the code finds a first seed with a Monte-Carlo method with maximum time, "timedeltaMax", and maximum number of iterations "counterMax" modifiable. It is also possible to rerun the code to obtain better results. However, the above should be avoided (and we agree on your thoughts about fixing the camera). The code includes some reasonable ranges for some parameters that, being quite general, have been set with coastal video monitoring in mind (camera looking "down", e.g.). These parameters can be modified (data['refValuesDict']['ta'] is set to pi/2 and could be increased to pi). Maybe you don't mind sending us a case, so that we can try to detect (and solve) what is the problem that we haven't had with our data. Sincerely, |
Thanks. And sorry for the long wait. I was away from work and also am not getting email notifications from GitHub, which I should go try to fix. Thanks for the recommendation about changing 'ta'. I'll give that a try. If it doesn't work for me, I may be able to work up an example data set I would be allowed to send. |
OK Myron. Please, let us know. Thanks! |
Quick update. I tried changing the TA values quite a bit, and it produces similar results for me with those different starting values, sometimes very good and sometimes fails. I can iterate to get a good result, so that does work. For my current situation, my cameras have plastic domes that are causing distortion that cannot be easily modeled in calibration. It's causing the residual errors to be larger than usual. It may also be causing the instability in the solution, though UCalib does produce a nice though understandably approximate result when it does find a good solution. I'm having similar problems with other solvers. I'll be working with other cameras soon that don't have the domes, and I'll check then to see if that helps with stability. I don't have an easy way to send example data, unfortunately. Thanks for your help on this. |
You are welcome, Myron, and thanks for the info. We understand that the plastic domes can introduce a difficult distortion, and in any case, we would suggest using the "full" model if you have enough GCPs. Just a comment in regard "I can iterate to get a good result, so that does work", which is good news: when re-running, the code always uses the previous saved solutions (so you can only improve); also, instead of re-running, you can perhaps increase the timedeltaMax and counter Max. Thanks for your feedback and suggestions! |
Thanks for making this open source. I have a use case with PTZ cameras where I know the camera position. UCalib sometimes works to give me the correct position without forcing it to do that, but it's not entirely reliable because the camera fov is not that wide. With the constraint, I think it would be very reliable. I'm working on an ugly hack to force this in the code right now, but I was wondering if you already have a nice clean way to enforce this in the initial basis calibration.
The text was updated successfully, but these errors were encountered: