@@ -82,14 +82,28 @@ include("../imports.jl")
8282 testprojective(tfm)
8383
8484 end
85+
8586 @testset ExtendedTestSet " ScaleRatio" begin
8687 tfm = ScaleRatio((1 / 2 , 1 / 2 ))
8788 @test_nowarn apply(tfm, image)
8889 @test_nowarn apply(tfm, keypoints)
8990 timage = apply(tfm, image)
9091 tkeypoints = apply(tfm, keypoints)
9192 @test ! any(isnan.(timage |> itemdata))
92- @test getbounds(timage). rs == (2 : 26 , 2 : 26 )
93+ @test getbounds(timage). rs == (1 : 25 , 1 : 25 )
94+ @test getbounds(timage) == getbounds(tkeypoints)
95+ testprojective(tfm)
96+ end
97+
98+ @testset ExtendedTestSet " ScaleRatioTwice" begin
99+ tfm = ScaleRatio((4 / 5 , 4 / 5 )) |> ScaleRatio((1 / 2 , 1 / 2 ))
100+ @show getbounds(image). rs
101+ @test_nowarn apply(tfm, image)
102+ @test_nowarn apply(tfm, keypoints)
103+ timage = apply(tfm, image)
104+ tkeypoints = apply(tfm, keypoints)
105+ @test ! any(isnan.(timage |> itemdata))
106+ @test getbounds(timage). rs == (1 : 20 , 1 : 20 )
93107 @test getbounds(timage) == getbounds(tkeypoints)
94108 testprojective(tfm)
95109 end
0 commit comments