Unable to erase some XMP from DJI P4 Multispectral

Started by Konlavach, August 02, 2021, 08:48:06 AM

Previous topic - Next topic

Konlavach

Dear all,

I am working with the images from the DJI P4 Multispectral drone.
I would like to remove some of the Camera parameters and Sun Sensor parameters from the metadata.

Camera Parameters:
So far I have no problem delete the following: -EXIF:ISOSpeed= -fnumber= -ApertureValue= -MaxApertureValue= -ShutterSpeedValue=
Except the: -EXIF:ExposureTime=0  which can not erase but only possible to set to 0

Question 1: What is the solution for me to erase the -EXIF:ExposureTime?

Sun Sensor Parameters:
I use the following command to print XMP:Irradiance
```
exiftool -XMP:Irradiance DJI_0011_2_2021.TIF
```
Irradiance                      : 7006.405

However, when I try to erase it, with following command:
```
exiftool -XMP:Irradiance= DJI_0011_2_2021.TIF
```
Warning: Tag 'XMP:Irradiance' is not defined
Nothing to do.

This result also appears with other parameters as well eg.: SunSensor etc.

Question 2: Does anyone know what is the problem that I am not able to erase these tags?

Thanks in advance for the helps.  :) :) :)
Konlavach

StarGeek

Quote from: Konlavach on August 02, 2021, 08:48:06 AM
Except the: -EXIF:ExposureTime=0  which can not erase but only possible to set to 0

Question 1: What is the solution for me to erase the -EXIF:ExposureTime?

Where are you seeing that EXIF:ExposureTime is set to 0 rather than being removed.  Are you double checking the file with exiftool or using some other program?

Exiftool can absolutely remove the EXIF:ExposureTime tag.  See this output
C:\>exiftool -G1 -a -s -EXIF:ExposureTime Y:\!temp\ccc\2012-03-17_14.52.21.Jpg
[ExifIFD]       ExposureTime                    : 1/50

C:\>exiftool -P -overwrite_original -EXIF:ExposureTime= Y:\!temp\ccc\2012-03-17_14.52.21.Jpg
    1 image files updated

C:\>exiftool -G1 -a -s -EXIF:ExposureTime Y:\!temp\ccc\2012-03-17_14.52.21.Jpg

C:\>


Now, there are two likely possibilities. One, if you are using some program other than exiftool to look at the data, then that program has a default setting of 0 if the tag does not exist.  The second possibility is that the ExposureTime is in a non-standard place, such as IFD0/IFD1 instead of ExifIFD.  Some cameras (Sony, IIRC) do this with ModifyDate.  In that case, you have to be explicit about the location.  Use the command I show above (which is from FAQ #3) to find the exact location and use that to remove it.

QuoteHowever, when I try to erase it, with following command:
```
exiftool -XMP:Irradiance= DJI_0011_2_2021.TIF
```
Warning: Tag 'XMP:Irradiance' is not defined
Nothing to do.
...
Question 2: Does anyone know what is the problem that I am not able to erase these tags?

Exiftool can only write/delete tags that it has definitions for.  And as the output says, exiftool does not have a definition for that tag.  XMP is such a flexible format that anyone can create tags for it (even Victoria's Secret has XMP tags for their photoshoots) and exiftool can't know about every single tag.

In order to delete that tag, you would need to write a config file for it.  Someone started to create a config file for XMP-Camera:Irradiance in this thread, but never posted the completed config. 

If your tag is XMP-Camera:Irradiance, it probably can be added to the Pix4d.config.  You just need to make sure the namespace is the same.  Run this command on the file
exiftool -b -xmp file.jpg
look for the Irradiance entry in the XMP output and look through the data above it for the URI.  Odds are it will show http://pix4d.com/camera/1.0/.  If so, then you can download that config file, edit it to replace
IrradianceRelativeRotation => { },
);

with
IrradianceRelativeRotation => { },
Irradiance => { Writable => 'string' },
);

And then you could use that config file like this
exiftool -config /path/to/pix4d.config -XMP:Irradiance= file.jpg

Another option would be to delete the entire group that contains the XMP:Irradiance but doing so would also delete any other data in that group.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype