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

Bug on Apple #4

Closed
TammeWollweber opened this issue Dec 3, 2019 · 1 comment
Closed

Bug on Apple #4

TammeWollweber opened this issue Dec 3, 2019 · 1 comment

Comments

@TammeWollweber
Copy link
Collaborator

Assembling images into (954, 891)-shaped array...done
Defining grid on FM image: Click on corners
Done defining grid on FM image: Manually adjust fine positions
You have to select exactly 4 points. Try again!
Defining grid on FM image: Click on corners
Done defining grid on FM image: Manually adjust fine positions
Performing affine transformation on FM image
counter-clockwise
Input points:
[[ 433.84701318 904.47534444]
[ 936.84660532 1317.83144491]
[ 1350.20270579 834.7526287 ]
[ 852.18330764 386.53517036]]
ROI side length: 655.660948793 ± 13.4595223752
Transform matrix:
[[ 7.64036066e-01 6.34373517e-01 0.00000000e+00]
[ 6.57458206e-01 -7.63376609e-01 1.56339529e+03]
[ 0.00000000e+00 0.00000000e+00 1.00000000e+00]]
Traceback (most recent call last):
File "/Users/renerosch/miniconda3/lib/python3.6/site-packages/clement/base_controls.py", line 266, in _affine_transform
self.ops.calc_affine_transform(points)
File "/Users/renerosch/miniconda3/lib/python3.6/site-packages/clement/fm_operations.py", line 322, in calc_affine_transform
self.apply_transform()
File "/Users/renerosch/miniconda3/lib/python3.6/site-packages/clement/fm_operations.py", line 415, in apply_transform
self._tf_data[:,:,i] = ndi.affine_transform(self._orig_data[:,:,i], np.linalg.inv(self.tf_matrix), order=1, output_shape=self._tf_shape)
File "/Users/renerosch/miniconda3/lib/python3.6/site-packages/scipy/ndimage/interpolation.py", line 449, in affine_transform
raise RuntimeError('affine matrix has wrong number of rows')
RuntimeError: affine matrix has wrong number of rows
Abort trap: 6
(Clement) cssbhpi034-wlan:Downloads renerosch$ clement

@kartikayyer
Copy link
Collaborator

Homogeneous transformations were added to affine_transform in Scipy only in version 1.0.0. Before that, the matrix size had to be 2x2.

See older docs here:
https://docs.scipy.org/doc/scipy-0.19.0/reference/generated/scipy.ndimage.affine_transform.html#scipy.ndimage.affine_transform

This is not an OSX issue, but an old Scipy issue.

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

2 participants