Jump to content
meldrew

Calculating / matching orientation

Recommended Posts

Hello all,

Have been racking my brains/this forum on something seemingly quite simple, but not getting anywhere...

Basically, I would like to match the scale/orientation of one set of points, based on another. Then be able to extract those 'transform' paramaters.

For example, if i have a pointcloud A, with 10 points, which has been re-scalled/oriented to create Pointcloud B (in a separate process, I don't have access to those transf params). How would i then re-orient it to match?

I have a photogrametry pc, which i am trying to match a tracked camera to. The issue is that the camera track is coming it at origin, so I need to transform to match the original pc.

I have isolated 10 identically positioned (not identical ptnum) points from the pc & tracking data to use as 'calibrators', but can't figure out the best/most efficient next step in doing the re-orient/scale.

 

Any help, tips, or pointers in the right direction for threads would be very much appreciated as always. :)

Share this post


Link to post
Share on other sites
4 hours ago, Jesper Rahlff said:

do you have access to pointcloud B in houdini?

Hi Jesper,

Thanks for the response - Yep, have access to both in H.

The camera track (which is the thing I'd like to re-orient) has been done in C4D and has been given to me as an .fbx, the pointcloud is directly from photogrammetry.

So far my approach has been finding 3 points in the track that i can pintoint in the PC, then creating a bounding box of each and attempting to align.

 

I would share a .hip but unfortunately can't at the moment due to NDA's etc.

Thanks again!

Share this post


Link to post
Share on other sites
45 minutes ago, Jesper Rahlff said:

so basically if I understand you correctly you want the points from pointscloud a to be on top of the points from pointcloud b?

Yes, and I also want to extract the XYZ rot/scale transforms needed to place them on top, so I can then apply it to the .fbx upon import.

Apologies if I wasn't clear, or if this is a v simple issue that I just am not sure how to approach - one of the pitfalls of being self taught I suppose. :/

 

Thanks again!

Share this post


Link to post
Share on other sites

I've worked up a quick annotated example file, with a proxy version of my problem (and a few variants of my initial explorations to solve included/bypassed).

I am calculating the centre (average) of each stream as a detail attrib, and my idea was to use that as a pivot point to base the orientation from.

Unfortunately I have no real math background, so I'm struggling to wrap my head around the concept of reverse engineering the rotational/translation values.

Also would be very helpful to get some tips on correctly using the centerpoints I've generated in the pivot parameters of the transform node. (I am currently exploring some other threads on this specific topic.)

Thanks :)

 

EDIT:

One approach I hadn't considered was pclookup/filter etc in VOPs - Again, something I've never used before. So I'm beginning to explore that as well.

pc_match_001.hip

Edited by meldrew

Share this post


Link to post
Share on other sites

Hey @jkunz07,

That's great, and super lightweight. Thanks! :)

However I'm still trying to calculate how to extract XYZ translate/rotate parameters from this process. Any ideas on that?

i.e what XYZ translate/rotate is required to get from geo A > geo B.

Being able to morph one to the other is v useful, but my poinclouds are *very* heavy, so being able to just apply a transform to the .fbx would be a lighter fix in this case, If I can get that data from a sample of 3 or 4 points.

 

Thanks again!

Share this post


Link to post
Share on other sites

Essentially I am trying to access the results to whatever calculation(s) the 'extract transform' SOP does at object level... If anyone has any idea how to do that? :)

Share this post


Link to post
Share on other sites

Thanks @moneitor - That is exactly what I was trying to achieve, done in a way I would have not even thought about.

I'll spend some time this evening/over the weekend going through it & trying to better understand the math that's going on in there. Plus some VOP stuff that's pretty new to me.

 

Thanks for the annotations as well, they're always very helpful! :)

Share this post


Link to post
Share on other sites

here's another one which is using rigid transformation similar to "extractTransform" but in sops. works also an geometries with points in arbitrary order as long as the pointcount is the same. if that's not the case you could try to use the file in this post: http://forums.odforce.net/topic/28907-wrapping-geo-like-wrap3/?tab=comments#comment-164108

hth.

petz

 

pc_match_001_1.hip

 

  • Like 1

Share this post


Link to post
Share on other sites

Hey all,

Left this thread behind because the workflow got pretty intense! :)

As an update - @moneitor @petz & @galagast solutions all worked well - Thank you so much! - But the issue I kept running into, which was eventually revealed, was that the tracking data was bad <_<

So eventually I got it working with all 3 approaches once we re-tracked and got it done correctly.

Thanks again everyone for your kind help - I learned a heck of a lot solving this in the end!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×