You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@soupault the problem is that transform uses xy-coordinates, whereas we want the nd version to work on rc coordinates. The idea is to have an n-dimensional transform module with (p)rc coordinates, but keep the old transform module for backwards compatibility. Then later we can deprecate it if needed.
Firstly, thank you all for developing such a cool transform module.
I wanted to give some feedback based on my experience with it for the better part of the year.
I know there was some enthusiasm to revamp the transform module, so I wanted to include some feedback on what I thought was missing or problematic. I think this is the best place for it???
RC vs XY
I agree wit the move to RC
__repr__ and __str__
I think what I struggled with the most is how opaque the classes like ProjectiveTransform are.
They don't have nice reprs or nice string representations. This makes it really annoying to work with them when you are trying to quickly debug what is going on.
Closeness to the mathmatical representations
Homographies have really nice mathematical representations. But for example SimilarityTransform.inverse which you would think is just an other SimilarityTransform is some strange callable that is even more opaque than the original object.
I understand the desire to support piecewise transforms, but I feel like piecewise transforms are much more niche than the general case of homographies.
I think this goes back to an earlier request of mine to have the @ operator be supported and dropping the support for the + operator.
Many classes
I get why there are different constructors, but there are many *Transforms classes. I think most of them could be summarized by class methods and maybe some use of functools.partial.
The big advantage here is that it would simplify the upcasting system with + operator.
Finally, it is unclear what users are "supposed" to use. If I only need a translation, do I use a SimilirityTransform or an AffineTransform. They return different classes, and that might make the code difficult to reuse.
Having so many classes makes writing __repr__ annoying.
One major challenge in having an "opaque" representation is that it adds friction when serializing results. The choice of having one attribute being params and the input to the constructor being matrix make it really confusing in terms of what the user should use.
I don't think numpy or python have a good solution to the serialization problem. To me, this is a major drawback of python compared to matlab.
Personal note
I've fallen back to representing the homography matrix directly as a 3x3 array, though I get why a class might be desirable.
Activity
soupault commentedon Jan 14, 2017
What is the purpose of this? Aren't we planning to make, more or less, every algorithm support nd, not just the ones from
transform?jni commentedon Jan 15, 2017
@soupault the problem is that
transformuses xy-coordinates, whereas we want the nd version to work on rc coordinates. The idea is to have an n-dimensional transform module with (p)rc coordinates, but keep the old transform module for backwards compatibility. Then later we can deprecate it if needed.soupault commentedon Jan 15, 2017
@jni Ah, I see the keypoint.
👍 from me, and good luck to the devs who will generalize the transforms :).
hmaarrfk commentedon Dec 7, 2018
Firstly, thank you all for developing such a cool transform module.
I wanted to give some feedback based on my experience with it for the better part of the year.
I know there was some enthusiasm to revamp the transform module, so I wanted to include some feedback on what I thought was missing or problematic. I think this is the best place for it???
RC vs XY
I agree wit the move to RC
__repr__and__str__I think what I struggled with the most is how opaque the classes like
ProjectiveTransformare.They don't have nice
reprsor nice string representations. This makes it really annoying to work with them when you are trying to quickly debug what is going on.Closeness to the mathmatical representations
Homographies have really nice mathematical representations. But for example
SimilarityTransform.inversewhich you would think is just an otherSimilarityTransformis some strange callable that is even more opaque than the original object.I understand the desire to support piecewise transforms, but I feel like piecewise transforms are much more niche than the general case of homographies.
I think this goes back to an earlier request of mine to have the
@operator be supported and dropping the support for the+operator.Many classes
I get why there are different constructors, but there are many
*Transformsclasses. I think most of them could be summarized by class methods and maybe some use offunctools.partial.The big advantage here is that it would simplify the
upcastingsystem with+operator.Finally, it is unclear what users are "supposed" to use. If I only need a translation, do I use a
SimilirityTransformor anAffineTransform. They return different classes, and that might make the code difficult to reuse.Having so many classes makes writing
__repr__annoying.Example of how to avoid having many classes
Serialization
One major challenge in having an "opaque" representation is that it adds friction when serializing results. The choice of having one attribute being

paramsand the input to the constructor beingmatrixmake it really confusing in terms of what the user should use.I don't think numpy or python have a good solution to the serialization problem. To me, this is a major drawback of python compared to matlab.
Personal note
I've fallen back to representing the homography matrix directly as a 3x3 array, though I get why a class might be desirable.