import cv2
import numpy as np
cap=cv2.VideoCapture('pothole.mp4')
fgbg=cv2.createBackgroundSubtractorMOG2()

while True:
    ret,frame=cap.read()
    fgmask=fgbg.apply(frame)

    cv2.imshow('original', frame)
    cv2.imshow('fg ',fgmask)

    k=cv2.waitKey(30) & 0xff
    if k == 27:
        break
cap.release()
cv2.destroyAllWindows()

3162fad7d0eb429b72f1155bddf989844d68a5ec
<mask token>

<mask token>
while True:
    ret, frame = cap.read()
    fgmask = fgbg.apply(frame)
    cv2.imshow('original', frame)
    cv2.imshow('fg ', fgmask)
    k = cv2.waitKey(30) & 255
    if k == 27:
        break
cap.release()
cv2.destroyAllWindows()

<mask token>
cap = cv2.VideoCapture('pothole.mp4')
fgbg = cv2.createBackgroundSubtractorMOG2()
while True:
    ret, frame = cap.read()
    fgmask = fgbg.apply(frame)
    cv2.imshow('original', frame)
    cv2.imshow('fg ', fgmask)
    k = cv2.waitKey(30) & 255
    if k == 27:
        break
cap.release()
cv2.destroyAllWindows()

import cv2
import numpy as np
cap = cv2.VideoCapture('pothole.mp4')
fgbg = cv2.createBackgroundSubtractorMOG2()
while True:
    ret, frame = cap.read()
    fgmask = fgbg.apply(frame)
    cv2.imshow('original', frame)
    cv2.imshow('fg ', fgmask)
    k = cv2.waitKey(30) & 255
    if k == 27:
        break
cap.release()
cv2.destroyAllWindows()

import cv2
import numpy as np
cap=cv2.VideoCapture('pothole.mp4')
fgbg=cv2.createBackgroundSubtractorMOG2()

while True:
    ret,frame=cap.read()
    fgmask=fgbg.apply(frame)

    cv2.imshow('original', frame)
    cv2.imshow('fg ',fgmask)

    k=cv2.waitKey(30) & 0xff
    if k == 27:
        break
cap.release()
cv2.destroyAllWindows()
