We are detecting faces from the video. Subsequently we are generating images from every face detected. We need to record the image timestamp.
We observed that the parameter (modified) needs to read from the image properties.
I've tried with the below snippet:
import EXIF
from PIL import Image
from PIL.ExifTags import TAGS
def get_exif(fn):
ret = {}
i = Image.open(fn)
info = i._getexif()
for tag, value in info.items():
decoded = TAGS.get(tag, tag)
ret[decoded] = value
return ret
photo_path = "test.jpg"
data = get_exif(photo_path)
It is returning blank. Please suggest a solution.