Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created April 20, 2020 09:16
Show Gist options
  • Save prateekjoshi565/57c2ea7aeda7ca206778fcdb41d4ccc6 to your computer and use it in GitHub Desktop.
Save prateekjoshi565/57c2ea7aeda7ca206778fcdb41d4ccc6 to your computer and use it in GitHub Desktop.
# convert the frames to grayscale
grayA = cv2.cvtColor(col_images[i], cv2.COLOR_BGR2GRAY)
grayB = cv2.cvtColor(col_images[i+1], cv2.COLOR_BGR2GRAY)
# plot the image after frame differencing
plt.imshow(cv2.absdiff(grayB, grayA), cmap = 'gray')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment