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

How to use Sensor Streaming Camera Intrinsics in C# (Unity project) #51

Open
STLeee opened this issue Jul 25, 2018 · 5 comments
Open

How to use Sensor Streaming Camera Intrinsics in C# (Unity project) #51

STLeee opened this issue Jul 25, 2018 · 5 comments

Comments

@STLeee
Copy link

STLeee commented Jul 25, 2018

I need to map color camera pixel coordinate to depth data coordinate. But Sensor Streaming frame doesn't had property "MFSampleExtension_Spatial_CameraProjectionTransform". I only found "MFSampleExtension_SensorStreaming_CameraIntrinsics". How can I use it in C#?

@FracturedShader
Copy link

In short, you can't. I had to write a custom little DLL to handle that since the depth camera intrinsics object is not the standard one, but a custom interface to an otherwise opaque structure. There's actually a lot of other issues when trying to do this in Unity. I've spent the past four months working on it, and it's still not exactly right. There's a bunch of coordinate transforms that need to be taken into account because the HoloLens uses coordinate systems typically used by roboticists, while Unity uses another one entirely. It makes using the matrices and projection information that much harder. Not to mention, the two samples for the Kinect, that seem like a good reference, aren't actually how the HoloLens data works in the end.

@maurosyl
Copy link

@FracturedShader could you suggest a workflow to align depth frames with the ones from the color camera?( i mean the standard high resolution color camera, not those made accessible along with the depth and IR sensors)
I think first step would be acquire synchronized frames from the cameras, but i'm not sure how to achieve that since they are from different source groups; then get the intrinsics of the depth camera, and i would appreciate some hints about this part too.

@FracturedShader
Copy link

@mauronano I see you created a separate issue for this, I've responded there with some details.

@cyrineee
Copy link

@FracturedShader can u refer to the other issue ?

@FracturedShader
Copy link

@cyrineee, sure, that was issue #64

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

4 participants