Skip to content

Commit 302774c

Browse files
Andy FerrisChris Foster
authored andcommitted
Added tests for PerspectiveMap
1 parent ca76546 commit 302774c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/perspective.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@testset "Perspective transformation" begin
2+
@test PerspectiveMap()([2.0, -1.0, 0.5]) [4.0, -2.0]
3+
4+
@test cameramap() === PerspectiveMap()
5+
@test cameramap(pixel_size = 3e-5, focal_length = 0.3) LinearMap(UniformScaling(1e4)) PerspectiveMap()
6+
@test cameramap(origin = [1.0,2.0,3.0], orientation = [0 1 0; 0 0 1; 1 0 0]) PerspectiveMap() AffineMap([0 0 1; 1 0 0; 0 1 0], [-3.0, -1.0, -2.0])
7+
@test cameramap(offset_x = 100, offset_y = 20) Translation(SVector(-100, -20)) PerspectiveMap()
8+
end

0 commit comments

Comments
 (0)