We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
WarpAffine
1 parent 7918c34 commit f4988d2Copy full SHA for f4988d2
src/projective/warp.jl
@@ -18,11 +18,12 @@ function getprojection(
18
randstate = getrandstate(tfm))
19
T = Float32
20
rng = Random.seed!(Random.MersenneTwister(), randstate)
21
- scale = sqrt(prod(sum.(bounds.rs)))
+ scale = sqrt(prod(length.(bounds.rs)))
22
23
srcps = shuffle(rng, SVector{2, T}.(corners(bounds)))[1:3]
24
offsets = rand(rng, SVector{2, T}, 3)
25
offsets = map(v -> (v .* (2one(T)) .- one(T)) .* convert(T, scale * tfm.σ), offsets)
26
+
27
return threepointwarpaffine(srcps, srcps .+ offsets)
28
end
29
0 commit comments