我需要向许多图像添加新标签,这些标签是:
AboveGroundAltitude
BandName
CentralWaveLength
ColorTransform
PerspectiveDistortion
PerspectiveFocalLength
PrincipalPoint
WavelengthFWHM
我创建了此配置文件:
%Image::ExifTool::UserDefined = (
'Image::ExifTool::XMP::xmp' => {
NewXMPxmpTag => { Groups => { 1 => 'AboveGroundAltitude' } },
NewXMPxmpTag => { Groups => { 1 => 'BandName' } },
NewXMPxmpTag => { Groups => { 1 => 'CentralWaveLength' } },
NewXMPxmpTag => { Groups => { 1 => 'ColorTransform' } },
NewXMPxmpTag => { Groups => { 1 => 'PerspectiveDistortion' } },
NewXMPxmpTag => { Groups => { 1 => 'PerspectiveFocalLength' } },
NewXMPxmpTag => { Groups => { 1 => 'PrincipalPoint' } },
NewXMPxmpTag => { Groups => { 1 => 'WavelengthFWHM' } },
},
);
变体:我第一次尝试了第0组,然后在某处读取了XMP标记属于第1组并进行了编码编辑。
我正在像这样运行命令:
exiftool -config config.txt -ext jpg \
-AboveGroundAltitude='55.8224668413325'\
-BandName='Red, Garbage, NIR'\
-CentralWaveLength='625, 0, 850'\
-ColorTransform='1.000, 0.000, -0.996, 0.000, 0.000, 0.000, -0.286, 0.000, 4.350'\
-PerspectiveDistortion='-0.093, 0.122, 0.000, 0.000, 0.000'\
-PerspectiveFocalLength='5.4'
-PrincipalPoint='3.100, 2.325'\
-WavelengthFWHM='100, 0, 40' test.jpg
尝试的变化:
- -xmp:AboveGroundAltitude='55.8224668413325'
- -XMP-AboveGroundAltitude='55.8224668413325'
- -XMP-xmp:AboveGroundAltitude='55.8224668413325'
- all the three above with `+=` between the tag and the value
还请注意,为清楚起见在此处添加了反斜杠,我的原始命令是一个没有换行符或反斜杠的衬线。
我得到的错误是(我在这里尝试使用各种选项来说明不同的错误消息,但是当我尝试使用它们时,每次尝试时选项的样式都进行了标准化):
还使用-v4
进行更详细的记录
exiftool -config config.txt -v4 -ext jpg -XMP-AboveGroundAltitude='55.8224668413325' -xmp:BandName='Red, Garbage, NIR' -XMP-xmp:CentralWaveLength='625, 0, 850' -xmp:ColorTransform='1.000, 0.000, -0.996, 0.000, 0.000, 0.000, -0.286, 0.000, 4.350' -PerspectiveDistortion='-0.093, 0.122, 0.000, 0.000, 0.000' -xmp:PerspectiveFocalLength='5.4' -xmp:PrincipalPoint='3.100, 2.325' -xmp:WavelengthFWHM='100, 0, 40' test.jpg
Tag 'XMP-AboveGroundAltitude' is not defined or has a bad language code
Warning: Tag 'XMP-AboveGroundAltitude' is not defined or has a bad language code
Tag 'xmp:BandName' is not defined
Warning: Tag 'xmp:BandName' is not defined
Tag 'XMP-xmp:CentralWaveLength' is not defined
Warning: Tag 'XMP-xmp:CentralWaveLength' is not defined
Sorry, xmp:ColorTransform doesn't exist or isn't writable
Warning: Sorry, xmp:ColorTransform doesn't exist or isn't writable
Tag 'PerspectiveDistortion' is not defined
Warning: Tag 'PerspectiveDistortion' is not defined
Tag 'xmp:PerspectiveFocalLength' is not defined
Warning: Tag 'xmp:PerspectiveFocalLength' is not defined
Tag 'xmp:PrincipalPoint' is not defined
Warning: Tag 'xmp:PrincipalPoint' is not defined
Tag 'xmp:WavelengthFWHM' is not defined
Warning: Tag 'xmp:WavelengthFWHM' is not defined
Nothing to do.
请注意ColorTransform
的消息有何不同
注意:在这里和exiftool论坛中已经看到enter link description here和其他相关文章。
答案 0 :(得分:0)
我找到了由相机制造商制作的配置文件,我将其粘贴在下面:
#------------------------------------------------------------------------------
# File: xmp_camera_tags.config
#
# Description: Adds capability to modify all XMP camera tags
#
#------------------------------------------------------------------------------
%Image::ExifTool::UserDefined = (
'Image::ExifTool::XMP::Main' => {
Camera=> {
SubDirectory => {
TagTable => 'Image::ExifTool::UserDefined::Camera',
},
},
},
);
%Image::ExifTool::UserDefined::Camera = (
GROUPS => { 0 => 'XMP', 1 => 'XMP-Camera', 2 => 'Other' },
NAMESPACE => { 'Camera' => 'http://pix4d.com/Camera/1.0/' },
WRITABLE => 'string',
GPSXYAccuracy=> {},
GPSZAccuracy => {},
Pitch => {},
Roll=>{},
Yaw => {},
BandName => { List => 'Seq' },
CentralWavelength => { List => 'Seq' },
WavelengthFWHM => { List => 'Seq' },
BandSensitivity => { List => 'Seq' },
ColorTransform => { List => 'Seq' },
);
%Image::ExifTool::UserDefined::camera = (
GROUPS => { 0 => 'XMP', 1 => 'XMP-Camera', 2 => 'Other' },
NAMESPACE => { 'Camera' => 'http://pix4d.com/Camera/1.0/' },
);
#------------------------------------------------------------------------------
并以此为模板添加我需要的缺失标签。
Sentera 相机的相关型号信息为:
LensModel : 5.4mm-0001_0015
Model : 21021-03_12MP-ERS-0001
最初的问题是我的员工使用旧固件拍摄了第一批(接近8000张)航拍照片。后来他更新了固件并完成了其余工作。因此,在尝试处理图像时,首先拍摄的图像会产生错误,并且处理软件拒绝运行。
仍然感谢@StartGeek您的评论:)
很明显,我的尝试与所需的东西相去甚远,但是紧迫性使我没有时间进一步研究配置Exiftool的正确方法。