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