Skip to content

Commit b778828

Browse files
authored
Fix variable name
and also use 10 for the buffer (same as it was originally)
1 parent 3108dea commit b778828

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/LK_buffer_mask.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@
142142
# Note that by default ``dense_lucaskanade`` uses a 5-pixel buffer.
143143

144144
# with buffer
145-
buffer = 5
145+
buffer = 10
146146
fd_kwargs2 = {"buffer_mask" : buffer}
147-
xy, uv = LK_optflow(R, dense=False, fd_kwargs=fd_kwargs2)
147+
xy, uv = dense_lucaskanade(R, dense=False, fd_kwargs=fd_kwargs2)
148148
plt.imshow(ref_dbr, cmap=plt.get_cmap("Greys"))
149149
plt.imshow(mask, cmap=colors.ListedColormap(["black"]), alpha=0.5)
150150
plt.quiver(
@@ -175,8 +175,8 @@
175175
# interpolation routine. This will produce a smoother motion field.
176176

177177
interp_kwargs = {"epsilon" : 5} # use a small shape parameter for interpolation
178-
UV1 = LK_optflow(R, dense=True, fd_kwargs=fd_kwargs1, interp_kwargs=interp_kwargs)
179-
UV2 = LK_optflow(R, dense=True, fd_kwargs=fd_kwargs2, interp_kwargs=interp_kwargs)
178+
UV1 = dense_lucaskanade(R, dense=True, fd_kwargs=fd_kwargs1, interp_kwargs=interp_kwargs)
179+
UV2 = dense_lucaskanade(R, dense=True, fd_kwargs=fd_kwargs2, interp_kwargs=interp_kwargs)
180180

181181
V1 = np.sqrt(UV1[0] ** 2 + UV1[1] ** 2)
182182
V2 = np.sqrt(UV2[0] ** 2 + UV2[1] ** 2)

0 commit comments

Comments
 (0)