Hi All,
Newbie here so this maybe trivial, but..
I am simply trying to insert the tag Xmp.Camera.BandName into a JPG (or TIF). This is required for applications like Pix4D etc where they require it for a multi-spectral data set as described https://support.pix4d.com/hc/en-us/articles/360016450032-Specifications-of-xmpcamera-tags#label1 (https://support.pix4d.com/hc/en-us/articles/360016450032-Specifications-of-xmpcamera-tags#label1) under "(XMP) Radiometric correction" section. Many vendors like www.parrot.com and www.micasense.com have this tag in their multi spectral images.
I don't seem to get the syntax right. I tried
exiftool -Xmp-Camera:BandName='SomeBandString' image.JPG
or
exiftool -Xmp.Camera.BandName='SomeBandString' image.JPG
and other syntax, but I always get this error:
Warning: Tag 'XMP-Camera:BandName' is not defined
Nothing to do.
When I look for this tag in an image that has it using
exiftool -X images/IMG_0180_1.tif | grep BandName
I get
<XMP-Camera:BandName>Blue</XMP-Camera:BandName>
That's why I tried the above sytax to insert it to an image that doesn't have it.
I was able to easiy insert this tag using:
exiv2 -M"reg Camera https://xmp.camera/" -M"add Xmp.Camera.BandName 'BandNameString'" /file/path/img.JPG
But that seemed to insert it somehow ackwardly in a manner the photogrammetry software could not read (still trying to debug why...). So I thought to try and inserting the tag using the excellent exiftool - but as of now.. no go :(
Would greatly appreciate any assistance or pointing to the right thread or documentation on exactly this BandName tag
Thank you very much and stay healthy during these extraordinary times..
ExifTool doesn't yet have built-in support for writing Pix4D tags. But you will find a config file attached to this post (https://exiftool.org/forum/index.php?topic=8740.msg45083#msg45083) which should allow you to do this.
- Phil
Thank you Phil,
I actually just read this post https://exiftool.org/forum/index.php?topic=7153.msg36132#msg36132 and wanted to update my own humbly since I didn't read it prior to posting... :D
I am somewhat not clear on exactly the syntax usage to add the Xmp-Camera:BandName tag.
Would the new config file be updated (in the new xmp tags section) like so:
# XMP tags may be added to existing namespaces:
'Image::ExifTool::XMP::xmp' => {
# Example 5. XMP-xmp:NewXMPxmpTag
NewXMPxmpTag => { Groups => { 2 => 'Author' } },
NewXMPxmpTag => { Groups => { 2 => 'Camera:BandName' } },
and then command line usage would be
exiftool -xmp:Camera:BandName='SomeBandString' image.JPG
Really appreciate your help !
Your syntax is wrong in the config file. The post I linked has a config file that will write BandName properly. However, looking at the specification you linked I can see there have been a number of new tags added since 2017. Attached is an updated config file with definitions for the new tags.
- Phil
Thank you very much !
Really appreciate it.