Created
March 30, 2020 13:39
-
-
Save aravindpai/e028f8441681677bfae1c4fd5934788d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nonzero=[] | |
for i in range((len(images)-1)): | |
mask = cv2.absdiff(images[i],images[i+1]) | |
_ , mask = cv2.threshold(mask, 50, 255, cv2.THRESH_BINARY) | |
num = np.count_nonzero((mask.ravel())) | |
nonzero.append(num) | |
x = np.arange(0,len(images)-1) | |
y = nonzero | |
plt.figure(figsize=(20,4)) | |
plt.scatter(x,y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment