Skip to content

Commit

Permalink
[Fix] Fix bug in MATLABLikeResize (#630)
Browse files Browse the repository at this point in the history
  • Loading branch information
ckkelvinchan authored Nov 25, 2021
1 parent d19d389 commit 23247e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmedit/datasets/pipelines/matlab_like_resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def _cubic(x):

# if |x| <= 1: y = 1.5|x|^3 - 2.5|x|^2 + 1
# if 1 < |x| <= 2: -0.5|x|^3 + 2.5|x|^2 - 4|x| + 2
f = 1.5 * (x_abs_cu - 2.5 * x_abs_sq + 1) * (x_abs <= 1) + (
f = (1.5 * x_abs_cu - 2.5 * x_abs_sq + 1) * (x_abs <= 1) + (
-0.5 * x_abs_cu + 2.5 * x_abs_sq - 4 * x_abs + 2) * ((1 < x_abs) &
(x_abs <= 2))

Expand Down

0 comments on commit 23247e1

Please sign in to comment.