2017-11-14 2 views
0

R의 경우 EXIF ​​데이터 만 읽을 수있었습니다.R EXIF ​​데이터를 JPEG 파일에 쓰기

EXIF ​​데이터를 JPEG 파일에 쓸 가능성이 있습니까?

+0

아마도 R 명령 줄 매개 변수를 사용하여 외부 exif 도구 프로그램을 호출하는 것이 가장 좋습니다. – anotherfred

+0

어떤 OS를 사용합니까? – hrbrmstr

+0

우분투 16.04를 사용합니다. – makbuk

답변

0

응답 한 모든 사람에게 감사드립니다. 결과적으로 다음 솔루션을 얻었습니다. 내가 사용하는 GPS 이미지 좌표를 추가 설치

쉽다는 sudo libimage - exiftool - 펄 내 R 코드에서 다음

:

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) 

ExifTool, 내가 우분투 '명령을 사용하여 설치

여기서, latlon_exif [i, 11]latlon_exif [i, 10] - coord inet, latlon_exif [i, 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 [(date_exif [1,4] %의 % latlon_exif [I, 4), 8) 데이터 시간 형식 : '2017-11-16 22:33:17'

관련 문제