Re: [scikit-image] How to see full image after transformation not the cropped one
okay, but I don't need Affine.Does it mean that there is no solution for my problem? Best regards, Serge Shakhov. On Wednesday, 5 April 2017, 10:35, Stefan van der Walt <stefanv@berkeley.edu> wrote: Hi Serge There is no inverse defined for the piecewise affine, hence the change I made. Stéfan On Tue, Apr 4, 2017, at 15:28, Serge Shakhov wrote: Hi Stefan. Noticed that you changed my PiecewiseAffineTransform to AffineTransform. Is it applicable to PiecewiseAffineTransform? When I tried to revert it back to PiecewiseAffineTransform Got error: Traceback (most recent call last): File "C:/Users/Serge/Downloads/warp_to_extents.py", line 45, in <module> shifted_transform = (affine + offset).inverse File "C:\Users\Serge\Software\lib\site-packages\skimage\transform\_geometric.py", line 208, in __add__ raise NotImplementedError() NotImplementedError Thanks Best regards, Serge Shakhov. On Tuesday, 4 April 2017, 18:58, Stefan van der Walt <stefanv@berkeley.edu> wrote: Hi Serge Have a look at the attached version. Stéfan
Hello Stefan, Just want to clarify. Am I right that your solution isn't applicable to PiecewiseAffineTransform at all?Do you think it may be possible to find a workaround?Thanks. Best regards, Serge Shakhov. On Wednesday, 5 April 2017, 10:46, Serge Shakhov via scikit-image <scikit-image@python.org> wrote: okay, but I don't need Affine.Does it mean that there is no solution for my problem? Best regards, Serge Shakhov. On Wednesday, 5 April 2017, 10:35, Stefan van der Walt <stefanv@berkeley.edu> wrote: Hi Serge There is no inverse defined for the piecewise affine, hence the change I made. Stéfan On Tue, Apr 4, 2017, at 15:28, Serge Shakhov wrote: Hi Stefan. Noticed that you changed my PiecewiseAffineTransform to AffineTransform. Is it applicable to PiecewiseAffineTransform? When I tried to revert it back to PiecewiseAffineTransform Got error: Traceback (most recent call last): File "C:/Users/Serge/Downloads/warp_to_extents.py", line 45, in <module> shifted_transform = (affine + offset).inverse File "C:\Users\Serge\Software\lib\site-packages\skimage\transform\_geometric.py", line 208, in __add__ raise NotImplementedError() NotImplementedError Thanks Best regards, Serge Shakhov. On Tuesday, 4 April 2017, 18:58, Stefan van der Walt <stefanv@berkeley.edu> wrote: Hi Serge Have a look at the attached version. Stéfan _______________________________________________ scikit-image mailing list scikit-image@python.org https://mail.python.org/mailman/listinfo/scikit-image
On Wed, Apr 5, 2017, at 19:02, Serge Shakhov wrote:
Just want to clarify. Am I right that your solution isn't applicable to PiecewiseAffineTransform at all? Do you think it may be possible to find a workaround?
Sorry, I should have been clearer. With "defined" I meant implemented. To invert a piecewise affine transform, you'll have to use SciPy KD-tree to find the nearest quad coordinates, and then invert the matching affine. This is not necessarily hard, but it's not trivial to implement. Stéfan
participants (2)
-
Serge Shakhov
-
Stefan van der Walt