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

Initial work on dynamic pixel sizing as part of #2 #22

Conversation

philipbelesky
Copy link
Collaborator

I had a Grasshopper definition floating around that had a calculation to determine pixel size given sensor height (I used to help figure out a table layout). I am Kinect-less at the moment so haven't tested this properly, but the getDepthPixelSpacing function provides the following values which seem sensible:

sensor height of 1060 = x 2.931725918576969
sensor height of 1060 = y 3.0296598284208076
sensor height of 500 = x 1.3828895842344193
sensor height of 500 = y 1.429084824726796
sensor height of 2000 = x 5.531558336937677
sensor height of 2000 = y 5.716339298907184

Note that this also adds back a sensorHeight parameter to the component, but that seemed unavoidable. Will test/update properly tomorrow to confirm it actually works when run as part of the plugin.

@mariuszhermansdorfer
Copy link
Owner

Great! I remember you sending this GH definition for a table setup and hoped you will be able to reuse the logic. Adding a sensorHeight parameter is fine for now but we should really look into creating an 'initial setup & calibration component' as mentioned in #1.

After the box is setup and mounted, one would hardly ever change this.

@philipbelesky
Copy link
Collaborator Author

Ok, have tested it 'live' and everything seems to work so it should be good to merge.

I need to run a proper calibration using one of the kinect calibrators for my setup at some point, as I'm seeing maybe a 10% difference between each model. Part of that might be unavoidable, but a future improved version of this function might also try and adjust the pixel spacing to account for lens distortion (or whatever the Kinect's IR equivalent is?).

@mariuszhermansdorfer
Copy link
Owner

Maybe worth considering for #1?

@mariuszhermansdorfer mariuszhermansdorfer merged commit 25d590e into mariuszhermansdorfer:master Sep 6, 2019
@philipbelesky philipbelesky deleted the feature/dynamic-pixel-distance branch September 12, 2019 08:49
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

Successfully merging this pull request may close these issues.

None yet

2 participants