how to make a natural transition from one picture to another?
language is unlimited, is there any open source solution?
how to make a natural transition from one picture to another?
language is unlimited, is there any open source solution?
import cv2
import time
old = cv2.imread('1.jpg')
new = cv2.imread('2.jpg')
cv2.imshow('image', old)
cv2.waitKey() -sharp
t = 1000 -sharpms
fps = 60 -sharp60
step = 1000 / fps
i = 0
while i < t:
cv2.imshow('image', cv2.addWeighted(old, 1 - i / t, new, i / t, 0)) -sharp
if cv2.waitKey(1) &0xFF == ord('q'):
break
i += step
time.sleep(0.001)
cv2.imshow('image', new)
cv2.waitKey() -sharp
cv2.destroyAllWindows()
Previous: How to listen for scrolling on the mobile end
Next: Mysql database 1400 + tables, slow to create new tables