Skip to content
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

Strange result of colmap data #21

Open
weihaosky opened this issue Nov 16, 2022 · 13 comments
Open

Strange result of colmap data #21

weihaosky opened this issue Nov 16, 2022 · 13 comments

Comments

@weihaosky
Copy link

Hi, great work!

I am trying to reconstruct a small room. The camera poses and intrinsics are obtained from Colmap. Using the colmap dataloader from the repo, I only get a strange result as below:
image

Could you figure out where the problem is?
Many thanks!

@Morpheus3000
Copy link

Hi, I had similar problems. For my case, turned out, the pose provided by colmap was already inverted for some reason. Inverting the poses from colmap again and then feeding it to simplerecon solved for me.

@pablovela5620
Copy link

@Morpheus3000 could you give a bit more details as to what you mean you needed to invert poses provided by Colmap and exactly what you did? I'm having a similar issue. My depth/normals look reasonable, but like weihaosky, my mesh is a mess.

image

colmap-conference-room-2-480.mov

@qweqwasdazE
Copy link

Hello, I also plan to use this project and use colmap to calculate posture. There was a problem with posture when I tried Neural Recon before. It seems that this project cannot directly use the posture exported from colmap. Have you found a solution yet

@carlosedubarreto
Copy link

Hi, I had similar problems. For my case, turned out, the pose provided by colmap was already inverted for some reason. Inverting the poses from colmap again and then feeding it to simplerecon solved for me.

Sorry to bother @Morpheus3000 , as @pablovela5620 I'm a bit lost on how to make the colmap data to work. I'm on it for 2 days trying to make it work.

Can you give some more information on how to invert the data?
I tried to inver the intrinsic using numpy (np.linalg.inv) but didnt make much difference on the final result.

The inver poses, you mean by invert the quaternions and translation data from each image that is stored on the "images.txt" file?

Thanks a lot for the help

@Morpheus3000
Copy link

@Morpheus3000 could you give a bit more details as to what you mean you needed to invert poses provided by Colmap and exactly what you did? I'm having a similar issue. My depth/normals look reasonable, but like weihaosky, my mesh is a mess.

image colmap-conference-room-2-480.mov

Hi, I had similar problems. For my case, turned out, the pose provided by colmap was already inverted for some reason. Inverting the poses from colmap again and then feeding it to simplerecon solved for me.

Sorry to bother @Morpheus3000 , as @pablovela5620 I'm a bit lost on how to make the colmap data to work. I'm on it for 2 days trying to make it work.

Can you give some more information on how to invert the data? I tried to inver the intrinsic using numpy (np.linalg.inv) but didnt make much difference on the final result.

The inver poses, you mean by invert the quaternions and translation data from each image that is stored on the "images.txt" file?

Thanks a lot for the help

Hello all,

For me just inverting the pose (using the inverse) on the poses saved by colmap worked. So I assumed simplerecon expects the colmap poses to be inverted.

@carlosedubarreto
Copy link

@Morpheus3000 Thanks a lot, I'm getting crazy trying to find out how to invert. it would be to inver the quaternions only or also the tranlation data?

If I'm not asking too much, can you point a direction, or something that you've found on how to invert it?

I was thinking on trying to convert the quarterion + translation to a transform matrix, invert it and then try to split it again into quaternion and translation.

That was what you've done?

Sorry to bother with that, I'm 4h today just trying to invert the data 😅

@Morpheus3000
Copy link

@carlosedubarreto Hi, no problem. Getting stuff running is an experience I have had a lot haha.

For the inversion, I just inverted the pose matrix. I didn't need to convert to quaternion. That solved the issue for me.

@carlosedubarreto
Copy link

@Morpheus3000 Thanks for the help.

I tried to invert the data that was on the cameras.txt file, the part of the fx,fy,cx,cy.

I took that data, put into a matrix, inverted that, put the data back on the cameras.txt file, passed through the split data and procssed it.

The result just moved a few centimeters, but overall the result was still terrible.
From what you say you inverted the pose matrix, do you remember where this pose matrix is?

It would be to invert the data for each image that is on the images.txt?
From what i saw , in that file there is the quaternion and translation data for each image.

You said that just inverted the pose matrix, i dont know where it is. Do you remember if it was from a colmap result that you had this pose matrix?

What you said seemed to be actually very simple i just dont have any idea where that data would be. I couldnt find it on the colmap results

@Morpheus3000
Copy link

@carlosedubarreto Hmmm you are inverting the camera intrinsic matrix. You could convert the quaternion and translation to the pose matrix and invert that. I don't exactly remember what I did, but I remember using some libraries to do the conversion.

@carlosedubarreto
Copy link

Thanks a lot @Morpheus3000 that makes very much sense to me.

Ill try your suggestion and post the results

@carlosedubarreto
Copy link

I've inverted but the result got much worst.

at first my result was this
image

after inverting the poses, it became this
image

I'll send the code that I was able to make in case anyone wants to try to improve. I think I'll giveup I dont know what else to do

But thanks a lto for all the suggestions @Morpheus3000 , really appreciated

invert_pose_colmap.zip

@daniyar-niantic
Copy link

Hi. Have you verified that the colmap reconstruction looks correct?

@carlosedubarreto
Copy link

@daniyar-niantic, Thanks for the messagem, I actually dont even remember what I've done. I gave up on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants