How to preserve image metadata
Mostrar comentarios más antiguos
I want to preserve image metadata but my code strips all metadata. How do I stop this? I run this script from the MATLAB SDE command prompt. Code is below:
p = which('G0011363.JPG');
filelist = dir([fileparts(p) filesep '*.JPG']);
fileNames = {filelist.name};
fileNames_size = size(fileNames,2);
number_of_colums = fileNames_size;
for k = 1:number_of_colums
imwrite(undistortImage(imread(fileNames{k}), cameraParams2cof, 'OutputView', 'valid'), (strcat(int2str(k), 'R2_3COF_ONRcorrected.jpg')));
end
2 comentarios
Andrew Nault
el 16 de Ag. de 2016
Editada: Andrew Nault
el 16 de Ag. de 2016
Image Analyst
el 16 de Ag. de 2016
Yeah it's too bad they only allow a single "comment" meta data tag and not all of the IPTC and EXIF tags.
Respuestas (2)
Andrew Nault
el 20 de Ag. de 2016
Editada: Andrew Nault
el 20 de Ag. de 2016
Image Analyst
el 14 de Ag. de 2016
0 votos
You are creating a brand new image. You did not extract the metadata (EXIF and IPTC tags) from the image so it's not being saved. Also, even if you did extract the tags, I'm pretty sure imwrite() does not have the ability to include metadata tags. I think the TIFF class ( http://www.mathworks.com/help/matlab/ref/tiff-class.html ) does give you the ability to save some tags but I have not used it and don't know if you can save EXIF and IPTC tags.
Categorías
Más información sobre Blocked Images en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!