-
Notifications
You must be signed in to change notification settings - Fork 1
Probe_angle (5DOF) & Consensus of TransM #155
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
Open
hannalee2
wants to merge
19
commits into
dev
Choose a base branch
from
feature/probe_angle
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previous) global = R@local + t, Now) local = R@global+t
…t are {3x1} vectors
Unknown: Rb and tb. Known: R, t, Rm, tm.
… brocast to local host 8081 server
Fix the typeO in comments Co-authored-by: Copilot <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update:
1. Consensus of transM
Scientists want to reach a consensus on the transformation-matrix convention.
They obtain Rb and tb using least squares.
Column-vector form
local = Rb @ bregma + tb, where local and bregma are column vectors.
Previously, Parallax obtained R and t using least squares.
Old (row-vector) form: global = R @ local + t, where local and global are row vectors.
Now (column-vector) form: local = R @ global + t, where local and global are column vectors.
(Trained: local = global @ R.T + t, row vectors, since NumPy often uses row vectors by default.)
To get Rb and tb, I use this derivation:
Unknown: Rb and tb. Known: R, t, Rm, tm (where Rm and tm are reticle metadata).
To get Rb and tb, I uses this formula:
Unknown: Rb and tb. Known: R, t, Rm, tm. (Rm and Tm is reticle metadata)
Return shape is a {4×4} transformation matrix [R t; 0 1] (homogeneous coordinates to simplify computation).
After getting Rb and tb, I did a sanity check by comparing out below and the output is same.
bregma = (local - t) @ R @ Rm.T + tm (row major: get global and then apply reticle metadata)
bregma = local - tb @ Rb.T (row major)
Note: The format may change after I hear back from Yoni and Galen. I’m considering letting the user select the reticle metadata and updating only the selected reticle’s points (not the entire list) to save computation. I’m also considering sending global_X, global_Y, and global_Z as the post-bregma–applied coordinates, so they can be used to visualize the bregma-based point from Pinpoint.
1.json
User can save stage info into json format or checkout on the localhost:8081

Example)
2. Getting 3D Angle (5DoF)
Let e_z(local) = [0, 0, 1]^T.
Its direction in global coordinates is:
vec = R^T * e_z(local)
= (3rd column of R^T)
= (3rd row of R)^T.