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

convert_2d_to_3d produces Value Errors #190

Open
nliedmey opened this issue Jan 27, 2023 · 6 comments
Open

convert_2d_to_3d produces Value Errors #190

nliedmey opened this issue Jan 27, 2023 · 6 comments

Comments

@nliedmey
Copy link

nliedmey commented Jan 27, 2023

Hello,

I'm using the convert_2d_to_3d function to bring my 2D-Coordinates and the belonging depth to the 3D-Coordinate system of the camera. I am taking the depth value from looking up the coordinate's depth value in the capture.transformed_depth image.

Now when throwing the coordinates and their depth values into convert_2d_to_3d function, i get many valid 3D coordinates, but also "some" Value Errors. For 208 Frames, with each having 33 Landmark-coordinates, i get 6864 valid and 352 non-valid 3D-Coordinates.

Is this a normal error count or is there a way to optimize this? What is the best color resolution & (WFOV) depth mode combination for this purpose or is this not important for this function?

I looked up the SDK documentation below but this was not very helpful for me:
https://microsoft.github.io/Azure-Kinect-Sensor-SDK/master/group___functions_ga664602bdb48dab38117a6c1d14b880de.html#ga664602bdb48dab38117a6c1d14b880de

Thank you for your helping me out :-)
Greets

@nliedmey
Copy link
Author

Ok i have found out that missing depth values, which return a value of 0mm, are the reason for ~80% of the non-valid 3D-coordinates. I'll try to minimize them though interpolation.
But what could be the reason for the other non-valid 3D-coordinates?

@JJLimmm
Copy link

JJLimmm commented Feb 8, 2023

Hi @nliedmey , i am having some trouble in using the API convert_2d_to_3d(). Could you show me how did you write the code and input arguments for using this API?

@lpasselin
Copy link
Collaborator

Hi, I am not sure what else causes invalid values.
Are you able to repeat the errors using the point cloud viewer example?
https://github.com/etiennedub/pyk4a/blob/master/example/viewer_point_cloud.py

@JJLimmm
Copy link

JJLimmm commented Feb 9, 2023

Hi @lpasselin , Invalid values are caused by the SDK as mentioned in the online documentation.
Are you able to show a snippet of your code that calls this API? convert2d_to_3d()

@nliedmey
Copy link
Author

Sorry for late response.

I don't know why but i got many depth measurements with value of 120mm that seem to produce 3D calculation error through this SDK..
120mm is outside the operating range of WFOV_Unbinned mode and no realistic values for my use case anyway.

Is this a known issue or has someone else the same problem?

@lpasselin
Copy link
Collaborator

Sorry I have not seen this before.

The only time I have seen weird values is when my device was sitting on a table, not a tripod. It was sending back weird values due to the obstruction of the table which was in the field of view of the camera!

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

3 participants