copy ALL exif information for multispectral camera

Started by Lindsii, June 22, 2017, 02:44:31 AM

Previous topic - Next topic

Lindsii

Wow this is very impressive.
From this I get 21 values of 8 bytes each, I should just have 19. But I will check this.

Thank you 1000000 times, Phil!

Lindsii

Thanks very much Phil!

From that I will get 1 Long, and 20 Double values, althoug i just should have 18, but I will see why that is.

Thanks again 100000 times, Phil!!

Phil Harvey

There look to be 18 double values:  10 in the first opcode starting at offset 24 (dec), and 8 in the second opcode starting at offset 120 (dec).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Lindsii

wow this is amazing.
Is the phdump available?

And do you see a possibility to batch this process, for exmaple for a whole folder of images?
Thank you so much!

Phil Harvey

I hadn't made phdump available yet, but if you can compile it, here is the source code for you.

To compile with g++, the command is:  g++ -o phdump phdump.cxx

Batching this process would require a bit of programming or fancy scripting I think.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Lindsii

Thank you so much Phil, you helped me so much, I will write about you in my acknoledgements!!

CmdrDaniels

Quote from: Lindsii on June 22, 2017, 10:50:02 AM
Thanks heaps!!!
I have the binary information to convert them, so I will see how it goes.
Thanks so much
linda

Hi!  The information in this thread is very useful!
I am also trying to extract and understand the binary information in this XMP block from the RedEdge metadata.

Lindsii - can you share the information that shows how to convert this binary information to the camera parameters?
Thanks

marliesL

Hi

I guess my question is the same than the original but I am using Pythonscripts.

My code reads:
subprocess.call(['exiftool', '-m','-overwrite_original', '-TagsFromFile', "old_im.tif", "new_im.tif"])

Although the coordinates are transferred to the new image, the images are not recognised as multispectral data in Agisoft.
Did I not copy the band information?

Thanks
Grtz


Phil Harvey

The OpcodeList tags are marked as unsafe (!) (see here), so they must be copied explicitly.  You might also want to add -all:all to write the tags in the same locations:

subprocess.call(['exiftool', '-m','-overwrite_original', '-TagsFromFile', "old_im.tif", "-all:all", "-opcodelist1", "-opcodelist2", "-opcodelist3", "new_im.tif"])

There may be other tags you want to add as well.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

marliesL

Hi Phil

Thank you for the quick repsonse.
I get this warning:
Warning: Can't convert value for SubIFD:OpcodeList3 (no PrintConvInv)
The images are still nog recognised as multispectral data. Could the tag, holding this information be, 'ImageLayer' or is it in this OpcodeList3?

Kind regards
Marlies



Phil Harvey

Right.  You must copy the unconverted values for these tags (ie. -opcodelist1# -opcodelist2# -opcodelist3#).

As I said, you may need to copy more tags than just these.  You'll have to do a bit of detective work yourself to see what is required.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).