Skip to content

Instantly share code, notes, and snippets.

@aravindpai

aravindpai/11_2.py

Created Mar 30, 2020
Embed
What would you like to do?
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
You can’t perform that action at this time.