Open milkcat0904 opened 1 year ago
- I am a little confused. You say "homography warped source image, which is should be like reference image.", but in your formula, q_{xyz} in is 3d coordinate of points in source image. So homography warped image should be like source image? (I don't know whether I have a correct understanding)
- In your intrinsics' calculation, you miswrite 82 for 92, this should have some effects on your result.
warped = cv2.remap(src_image, y, x, interpolation=cv2.INTER_LINEAR)
I found something wrong as well. The output of client.simGetCameraInfo has proj_mat which is like [[0.0, 1.0, 0.0, 0.0], [0.0, 0.0, -1.7777777910232544, 0.0], [0.0, 0.0, 0.0, 10.0], [-1.0, 0.0, 0.0, 0.0]]. but this project_mat is not like a standard projection matrix. Is there anything wrong with this API function (client.simGetCameraInfo) ?
Bug report
What's the issue you encountered?
Homography is very import transformation in MVS task, the formula is
I collect two images, depth map and camera parameters. First image is the reference image, and the other is source image, I want to get homography warped source image, which is should be like reference image. But I get wrong result: | ref image | ref depth map | src image | warped src image |![screenshot-20220929-102454](https://user-images.githubusercontent.com/27838089/192924506-1c433c99-8863-41c9-b2ca-ba104460d42b.png)
I also test my image warping code in DTU dataset, the result is right:
so, I speculate that there is something wrong with the camera parameters and depth map of the airsim
Settings
How can the issue be reproduced?
I use
airsim.ImageType.DepthPlanar
as depth mapi use
client.simGetCameraInfo
to get camera parameterscalculate camera intrinsics and extrinsics
Include full error message in text form
What's better than filing an issue? Filing a pull request :).