Skip to content

Commit dc5a576

Browse files
authored
Merge pull request #63 from lorenzoh/lo/fix-crop-projective-composition
Fix crop-projective composition
2 parents 9591121 + b89c7f8 commit dc5a576

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/projective/crop.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ function compose(composed::ComposedProjectiveTransform, cropped::CroppedProjecti
101101

102102
end
103103

104+
function compose(cropped::CroppedProjectiveTransform, projective::ProjectiveTransform)
105+
return Sequence(cropped, projective)
106+
end
107+
104108

105109
"""
106110
offsetcropbounds(sz, bounds, offsets)

test/projective/affine.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,12 @@ end
157157
@testset ExtendedTestSet "2D" begin
158158
tfms = compose(
159159
Rotate(10),
160-
FlipX(), FlipY(),
160+
FlipX(),
161+
FlipY(),
161162
ScaleRatio((.8, .8)),
162-
RandomCrop((10, 10)),
163163
WarpAffine(0.1),
164-
Zoom((1., 1.2))
164+
Zoom((1., 1.2)),
165+
RandomCrop((10, 10)),
165166
)
166167
testprojective(tfms)
167168
end

0 commit comments

Comments
 (0)