-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
It's better to have Projective transformation to ImageTransformations.jl.
# Definition of projective transformation
"""
Projective transformation.
"""
struct Projective <: Transformation
H::SArray{Tuple{3,3},Float64,2,9}
end
"""
Definition of projective transformation.
"""
function (p::Projective)(x)
x_ = SA[x[1],x[2],1.0]
x′_1, x′_2, x′_3 = p.H*x_
return SA[x′_1/x′_3, x′_2/x′_3]
end
"""
Inverse of projective transformation.
"""
function Base.inv(p::Projective)
Projective(inv(p.H))
endDiscussions in Slack:
https://julialang.slack.com/archives/CB1R90P8R/p1626929588093000
https://julialang.slack.com/archives/CB1R90P8R/p1626983453103200
I feel the right place to add this is in CoordinateTransformations.jl
Or we could 1) first introduce a high-level API in ImageTransformations.jl with this Projective as internal type, and then 2) migrate it to upstream CoordinateTransformations, and finally 3) use the upstream version.
(The quoted words are by @johnnychen94)
Metadata
Metadata
Assignees
Labels
No labels