对于R,我找到了一个只读取EXIF数据的机会。
在R中是否有可能将EXIF数据写入JPEG文件?
发布于 2017-11-20 18:42:16
感谢所有回应的人。因此,我得到了以下解。
安装ExifTool,我使用Ubuntu:
sudo apt安装libimage-exiftool perl
然后在我的R代码中,将GPS坐标添加到我使用的图像中:
exiftool_cmd <- paste("exiftool -GPSLongitudeRef=E -GPSLongitude=",latlon_exif[i,11]," -GPSLatitudeRef=N -GPSLatitude=",latlon_exif[i,10]," ","./nodejpg/",latlon_exif[i,4],".jpg",sep='')
system(exiftool_cmd)其中latlon_exifi,11和latlon_exifi,10 -坐标,latlon_exifi,4 -文件名.
若要向图像添加数据和时间,请使用:
exiftool_cmd <- paste("exiftool -alldates=",shQuote(date_exif[which(date_exif[,4]%in%latlon_exif[i,4]),8])," ","./nodejpg/",latlon_exif[i,4],".jpg",sep='')
system(exiftool_cmd)格式的shQuote(date_exif[which(date_exif,4%in%latlon_exifi,4),8])数据和时间:'2017-11-16 22:33:17‘
https://stackoverflow.com/questions/47293978
复制相似问题