[scikit-image] How to see full image after transformation not the cropped one
Stefan van der Walt
stefanv at berkeley.edu
Thu Apr 6 19:02:25 EDT 2017
Hi Serge
Hhere you go (attached).
Notes:
- The transform is very sensitive *outside of any coordinates specified
in the source coordinates*, so make sure it covers your whole image
- The process I follow here is as follows: estimate the transform,
calculate where the corners of the image will go, then estimate a new
transform that includes a shift that positions the result on a new,
larger output image
- Estimate `affine` (forward) and warp on `affine.inverse` (because warp
expects an inverse transformation to be provided)
I hope that helps!
Stéfan
On Thu, Apr 6, 2017, at 15:50, Stefan van der Walt wrote:
> On Thu, Apr 6, 2017, at 09:57, Stefan van der Walt wrote:
>> 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.
>
> Upon closer inspection, it turns out that the PiecewiseAffineTransform
> *does* have an inverse implemented. It was the "+" operator causing
> the problem.
>
> Still, I have found cases now where I get invalid answers for valid-
> seeming sets of coordinates. I'm investigating further, but I think I
> have a solution to your problem.
>
> Stéfan
>
> _________________________________________________
> scikit-image mailing list
> scikit-image at python.org
> https://mail.python.org/mailman/listinfo/scikit-image
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20170406/cf5adc26/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warp_to_extents.py
Type: text/x-python-script
Size: 1708 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20170406/cf5adc26/attachment.bin>
More information about the scikit-image
mailing list