Skip to content

Commit 75bcb3f

Browse files
committed
Use better interpolation
1 parent 53c6089 commit 75bcb3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/java/com/dan/videostab/MainFragment.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class MainFragment(activity: MainActivity) : AppFragment(activity) {
3434

3535
private fun fixBorder(frame: Mat, crop: Double) {
3636
val t = getRotationMatrix2D(Point(frame.cols() / 2.0, frame.rows() / 2.0), 0.0, 1.0 + crop)
37-
warpAffine(frame, frame, t, frame.size())
37+
warpAffine(frame, frame, t, frame.size(), INTER_LANCZOS4)
3838
}
3939

4040
fun show(activity: MainActivity) {
@@ -661,7 +661,7 @@ class MainFragment(activity: MainActivity) : AppFragment(activity) {
661661
false
662662
} else {
663663
trajectory.getTransform(index, t)
664-
warpAffine(frame, frameStabilized, t, frame.size())
664+
warpAffine(frame, frameStabilized, t, frame.size(), INTER_LANCZOS4)
665665

666666
if (crop >= 0.001) fixBorder(frameStabilized, crop)
667667
videoOutput.write(frameStabilized)

0 commit comments

Comments
 (0)