Open
Conversation
added 6 commits
April 6, 2021 12:31
The parenthesis in the macro UPDATE and INTERPOLATE are causing problems when compiling on Windows. See arcadelab#26 for more details. This is a second pull request, as the changes in arcadelab#29 got lost by mistake.
A bug in Projector.project() stopped code execution when no C-Arm class was provided upon construction of the Object. Fixing this by moving the logging into the clause.
In order to achieve more realistic projections I suppose to allow the construction of CameraProjections from 3x4 matrices. To do so, the 3x4 matrix is decomposed using a RQ-decomposition into the intrinsics (K) and extrinsics (R, t). Then, the existing classmethod _from_rtk()_ is reused. Resources which were useful to comprehend the decomposition: - https://ksimek.github.io/2012/08/14/decompose - Siemens internal decomposition software
5 sample matrices are included. They were taken from a cios spin C-Arm device. DONT include this in a pull-request
The CameraProjection Class now can be instantiated from both a 3x4 matrix and a intrinsic and extrinsic. The latter case shall be done with the classmethod. The current implementation of from_intrinsic_extrinsic is a bit hacky, but I couldnt think of a better way. This is more pythonic than to create an overloaded constructor with kwargs e.g.
CameraProjection.index_from_world and its inverse are projecting from 3d to 2d space and vice verse. Thus they are not Affine Transforms anymore, but projective transforms. Concluding, they should not be casted to FrameTransforms but to regular Transforms. Carm.get_camera3d_from_world should return a FrameTransform, but the typing fails here. Fixed this with a type cast at return time.
* Removed the FLIPX component as its not been tested. * Added the de-homogenization to the assert in CameraProjection. * Fixed formatting of Projection matrices xml.
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
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.
adding this pull request to track progress on this feature