keijiro / Dkvfx

An example that shows how to use recorded Depthkit footage with Unity VFX Graph
Other
228 stars 34 forks source link

Metadata asset #3

Closed sergiobd closed 5 years ago

sergiobd commented 5 years ago

Hi Keijiro,

I'm using your repo to make some effects on Depthkit footage from azure. I'm guessing your Metadata.asset file is from Kinect V2, as your depth image resolution is 512*424. I'm trying to copy the parameters from Azure into a new Medata file. Depthkit conversion gives a metadata file from which I can copy:

from lines 18 to 24 of the Metadata scriptable object: `

        material.SetVector("_Crop", pers.crop);
        material.SetVector("_ImageDimensions", pers.depthImageSize);
        material.SetVector("_FocalLength", pers.depthFocalLength);
        material.SetVector("_PrincipalPoint", pers.depthPrincipalPoint);
        material.SetFloat("_NearClip", pers.nearClip);
        material.SetFloat("_FarClip", pers.farClip);
        material.SetMatrix("_Extrinsics", pers.extrinsics);

`

Therefore, I'm missing extrinsics and crop. How would I get them? (I tried using depthkit's sensor calibration json file, but their extrinsic values are not in matrix form).

Best,

Sergio

keijiro commented 5 years ago

You can convert a metadata file (a .txt file exported from Depthkit along with a .mp4 file) from right click menu ("Depthkit" -> "Convert Metadata").

Sorry for lack of proper instructions.

keijiro commented 5 years ago

I'm closing this issue now. Please feel free to reopen for further questions.