Closed philipbelesky closed 3 years ago
Ok, some initial challenges/thoughts:
Actually, maybe its just easiest to update to .NET 4.6.1? I think that is installed by default on Windows 10 and users can always install it themselves if needed. That would also potentially come with a better JIT compiler and fewer issues with our other dependencies.
I think we should upgrade .NET. It's better to do it now before we have shipped the plugin than later when we have a user base counted in millions ;)
Support for Kinect 2 and Azure should definitely persist between sessions. I like the idea of bundling the selection into the options component.
Btw - 4 Kinects Azure DK have just arrived at my desk!
OK, merged the PRs you posted. I'm a bit swamped with work now so won't be able to contribute significantly in the coming week, but feel free to ping me with specific questions and issues.
@mariuszhermansdorfer @BarusXXX just a couple of handover notes:
Core
and controller for each device type. There may be some replication of properties that haven't been cut down yet. The Azure controller also tries to support different viewer modes (e.g. FoV and resolution)CaptureFrame()
is called after an init and config function. It pulls the depth picture before converting it to a point cloud. @philipbelesky @mariuszhermansdorfer , I managed to run it with VS2019. I managed to pinpoint the problem with transforming the depth frame. Currently the depth array is present but all values in it are of 0 value. On each item in the array being, assigned by the sensor that value is going to 1000000. Does the issue that philip pointed to use a transformation that is different than the one you had for the other kinects? link
Thrown at this line; https://github.com/mariuszhermansdorfer/SandWorm/blob/e57a23fce654642efff7a84acbe7aa3187370f75/SandWorm/Sensors/K4AController.cs#L89
System.ArgumentException: 'depthImage must have 0 width in pixels but has 1024. Parameter name: depthImage'
It seems that the transformation requires an array shaped; 0 x 3145728 While we are giving it (1024x1024) @philipbelesky I guess the transform mapping is a known issue? https://github.com/microsoft/Azure-Kinect-Sensor-SDK/issues/1012#issuecomment-571241628
@philipbelesky With depth mode set to DepthMode = DepthMode.WideViewUnbinned the Stride(bytes for each horizontal line) is 2048 and not 6144, which I get is only the Z value. I am not sure that the function in that line is being used correctly. I have started a new branch with my changes for your review.
https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/a227f73b8c78e17db843e7a962a1fabd571c6213/examples/fastpointcloud/main.cpp#L54 Here there is a fast point cloud data fetch example
Some progress at last... In aspect mode I am seeing something and when I exaggerate the z axis I can resolve that there is some depth to the mesh. So ushorts are being mapped to the wrong height? @philipbelesky do you know if there is some formula to covert depth into height? Or is this resolved when the we implement the transform function?
@mariuszhermansdorfer This is the relevant branch we are working on https://github.com/mariuszhermansdorfer/SandWorm/tree/feature/%2361-MAKS-not-k4a
do you know if there is some formula to covert depth into height? Or is this resolved when the we implement the transform function?
@BarusXXX, the depth is converted into height in this function: https://github.com/mariuszhermansdorfer/SandWorm/blob/2b53d409f3cc18aa32da5d14bd61c5a1802dead8/SandWorm/Components/BaseKinectComponent.cs#L185
We multiply it by -1 * unitsMultiplier
to flip the direction on the Z axis. Kinect measures the distance looking away from the sensor, while we want to have a 2.5D grid growing away from the table.
Will likely involve splitting or augmenting
Core.cs
and shifting a number of constants regarding FoV/resolution into some sort of manager.