Camera tracking?

Hi,
I was wondering if it’s possible to derive/record the camera movement/rotation as well with RecFusion?
E.g. record time, x/y/s position and trotation (euler and/or quaternions) into a simple CSV file?

Cheers,
frank

Hello Frank,

yes, you can do something like that. To enable the export, you need to go to RecFusion Settings->Advanced->Image Export -> check Pose box, then use the shortcut Ctrl+E (this will enabe the export of the data during the reconstruction). Press F11 to open the log window. When you start the reconstruction, the message in the log window will tell you in which folder the data will be exported. In that folder you will find the .txt files containing the camera matrix for each captured frame.

Let me know if I should give you more details.

Best regards,
Olga

Oh cool, I will check that out, thanks!

Finally got back to this.
I have saved the txt files containing the camera matrix and am trying to import them in a way that they line up with the exported point cloud. It looks like there is an offset though that I cannot account for. Is that possible? Or are xyz export and camera matrix in the same world space?
I am trying to do this in Foundry’s Nuke which is a Y-up right handedcoordinate system.

Also, can I see the horizontal and vertical field of view somewhere?
And lastly: can the images saved with sequence be exported/extracted somehow as well so Ican use them as reference for this little experiment?

My goal is to replicate the sensor as a virtual camera so I can use the point cloud scan and the extracted camera animation to render an artificial represntation of the aqcuired image sequence (which will then assist me in various VFX workflows).

Cheers,
frank

So there definitely seems to be an extra xform that I need to account for in order to line up the camera with the point cloud. The point cloud is at an angle (e.g. a table top is sinking into the ground), but the first frame camera matrix has only default rotations of 1.
Where can I get this extra transform from to make sure camera and point cloud line up after the export?

As for the image export, I checked all the boxes in the preferences but can’t find any exported images anywhere after exporting the point cloud. Sorry if I am missing the obvious?

Cheers,
frank

Is there any info on that? It’d be great to be able to import camera positions into our software that line up with the scan.

Just bumping this again. If I could extract cameras that match the point cloud the use cases of this would multiply significantly for us.
So any help to get this happening would be massively appreciated!
Maybe you could even offer to export an animated camera as as feature?

Cheers,
frank

Hello Frank,

sorry for the late reply. You can press F9 after the reconstruction - this will display the camera positions in the 3d view.

Best regards,
Olga

Hello Frank,

yes, you are right, there is additional transform applied to the exported pose.

If T is a point cloud matrix, the exported pose is computed the following way:

Tvol = Identity();
Tvol(0, 3) = -volSize.x/ 2.0;
Tvol(1, 3) = -volSize.y / 2.0;
Tvol(2, 3) = -volSize.z / 2.0;

Tflip = Identity();
Tflip(1, 1) = -1;
Tflip(2, 2) = -1;

pose = T * Tvol * Tflip;

where volSize is the size of the reconstruction volume.

Best regards,
Olga

Thanks Olga,
I will have to experiment with how to apply this on my side, I’m not great with matrix math.
Is there any way you could add an export feature that exports cameras in the same world space as the point cloud so this can be an efficient workflow?
Even if it’s just a basic text file like the strings in the logs that I currently have to extract to get to the cameras.

Cheers,
frank

Hello Frank,

we will consider adding this in the future releases but I can’t give you a definite answer right now whether it will be added and when.

Best regards,
Olga

Ok, thanks, I will tiniker with this to see if I can get it to work in the meantime.

Cheers,
frank