"untangling" a camera's path

   3333   3   2
User Avatar
Member
207 posts
Joined: 11月 2015
Offline
Hi there;

I have an animated camera that I've exported from a photogrammetry package (Meshroom). The camera path itself seems erroneous, and I suspect the issue is that a handful of the camera's positions have been transposed with one another in time (e.g. frames 10 and 11 have been swapped, producing odd "glitches" in my camera's movement). Here's an example of me placing a point at each camera's location in time:



Looks reasonable, except when I connect the points in order, we can see several places where the path "doubles back" on itself, which I think imply that the points' order isn't right (which implies, in turn, that several of the camera's animation keyframes are in the wrong order):





What I'd like to do is try to "untangle" my camera's path, and I'm curious what the most ideal way to do this might be (or, what ANY way to do this might be).

Thanks!
Edited by dhemberg - 2021年1月30日 14:27:11

Attachments:
Screenshot 2021-01-30 132425.png (446.0 KB)
Screenshot 2021-01-30 132358.png (362.9 KB)

User Avatar
Member
80 posts
Joined: 2月 2018
Offline
How are you importing the cameras into Houdini from Alicevision?
3D Freelancer
https://www.artstation.com/ffd [www.artstation.com]
User Avatar
Member
13 posts
Joined: 8月 2006
Offline
I have been playing with Zephyr, Meshroom and SideFXLab's AliceVision plugin. I would also like to reconstruct the cameras such that when I feed in the images as background, I get an exact match to the reconstructed 3d model/scene.

My understanding is Meshroom/AliceVision may re-order the camera/path based on the matching, and not necessarily the order they were input. So you'll probably want to use the original image order to build the points, but use the image name to find out the corresponding camera position from the meshroom output.

With the latest AV Photogrammetry node, the third output seems to be the alembic cameras. You can unpack to get at the local coordinate systems, or grab the primitive transform intrinsic attribute. What I'm finding is that Meshroom/AliceVision tend to give vertically inverted outputs even though the rgb axis in the camera output has green pointing up (I assume rgb means xyz). Maybe it's just a left vs right hand thing?

Also this known issue about Alembic import has been around for a few years. Has it been resolved with the latest meshroom-2020.0.1/AliceVision 2.3.0?


Known Issues

Error reporting is relatively light right now
Cameras currently cannot be extracted from the scan due to a bug in Alembic import in Houdini. This should soon be resolved.
Edited by sch1 - 2021年6月29日 15:12:18
User Avatar
Member
251 posts
Joined: 7月 2013
Offline
A bit convoluted but this might work..

1) Resample the tangled line so you have a lot more points,

2) convert to a meshed volume so you get a worm like mesh that fits the path

3) use the extract 3d skeleton node, this should give you a smooth line though the center core of the worn. This is approximately the correct path.

4) resample this path so you get good point density

5) loop over the original points and find the closest points in the newly generated path, delete the other ones. Also store the point index of the original path in the found closest one.

6) move points in new path to the position or the point at stored index in original path.

Sonething like that
More code, less clicks.
  • Quick Links