-
Notifications
You must be signed in to change notification settings - Fork 18
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
Question regarding this example about the OCamCalib model #3
Comments
The black artifacts appearing when restoring images using newly extracted parameters are simply due to a lack of interpolation. If you look at 'prepare_data()' for recovering the image, it merely creates the image by unprojecting all points in the image to 3D and then projecting them back using the estimated model. Furthermore, as seen in these lines, the artifacts can occur because the projected points were directly converted to integers without considering their precision. I am aware of this issue, but since image recovery is intended for reference purposes only, I have decided to overlook it as a known issue. To restore the image without any artifacts, instead of interpolating from 3D to 2D projection, I considered implementing an inverse warping method that generates an unprojected ray from every pixel in 2D using the estimated parameters, and finds the nearest 3D point for each ray. However, this would increase the dependency on additional libraries, and since the previous method is sufficient, I decided not to proceed. (For reference, see the deleted function 'recover_image()' in commit f937402.) The key metric you should closely monitor for accuracy is the reprojection error. Therefore, as you know, you should continue using the estimated parameters as they are. |
By the way, the conversion of projected points from float to integer was fixed in commit c62571f. Could you test it out? |
I will do so after the weekend. Thank you for your detailed and fast response. |
@Sheradil
Please check if these issues align with the system you are implementing and let me know after careful consideration. Particularly for issue number 1, I need to decide whether to implement taking a negative within the code without changing the input. |
I just tried the commit c62571f and it did not work. I am not sure if it made things better or worse. I will take a close look at it when I find a bit more time. My issues might have another reason, though: I will make the image available on another page for you (tomorrow), so that you can see for yourself. |
Once again, the output image is only for reference, and I did not thoroughly consider interpolation. It is sufficient if the pixels from the input image are near their appropriate locations in the output image. You can directly use the estimated output model parameters in your network. |
Found a place to upload images that are large. |
Hey,
now that I fixed my previous issue, I did some testing.
We have some hundred images taken with high resolution (5472*3648 pixel) cameras. The used camera model is the OcamCalib model (with 16 distortion coefficients).
We want to do some training with neural networks, but almost all neural networks use Pinhole models (rarely fisheye, never OcamCalib), so we have to calculate the parameters of a fisheye lense that matches our OcamCalib model. We can do that with this repository.
I used your software and used the KB, RadTan and UCM models as target model. The KB did not really work. The resulting image had a large black circle in the middle, probably because it is not good enough to capture the details of the OcamCalib model. RadTan and UCM worked, though. They just have noise (specific patterns) scattered over the image.
Do these artifacts occur because RadTan and UCM are less accurate models?
(I know that I can use the original images and use the calculated intrinsics and pretend that the original images have been taken with the hypothetical camera, I just want to know if that's the reason)
I can't upload the original image. It exceeds githubs file size limit.
The text was updated successfully, but these errors were encountered: