def fpsCal(frame2, prevTime):
curTime = time.time()
sec = curTime - prevTime
prevTime = curTime
fps = 1/(sec)
str = "FPS : %0.1f" % fps
cv2.putText(frame2, str, (10, 50), cv2.FONT_HERSHEY_SIMPLEX, 0.6, (0, 255, 0))
return prevTime