Forum

Author Topic: replace Exif-Data by CSV-List  (Read 7328 times)

AndreasMueller

  • Newbie
  • *
  • Posts: 16
    • View Profile
replace Exif-Data by CSV-List
« on: January 05, 2024, 12:37:19 PM »
Hello,

can anyone tell me how I replace (wrong) exif coordinates by (correct) csv-data. When I just load the csv data as reference, metashape still keeps the exif header. Thank you!

Kind regards
Andreas
« Last Edit: January 05, 2024, 12:56:59 PM by AndreasMueller »

AndreasMueller

  • Newbie
  • *
  • Posts: 16
    • View Profile
replace Exif-Data by CSV-List
« Reply #1 on: January 05, 2024, 12:56:25 PM »
Hello,

can anyone tell me how I replace (wrong) exif coordinates by (correct) csv-data. When I just load the csv data as reference, metashape still keeps the exif header. Thank you!

Kind regards
Andreas

tazzo

  • Full Member
  • ***
  • Posts: 166
    • View Profile
Re: replace Exif-Data by CSV-List
« Reply #2 on: January 05, 2024, 06:35:39 PM »
You can use exif-tool to replace images metadata

AndreasMueller

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: replace Exif-Data by CSV-List
« Reply #3 on: January 08, 2024, 11:12:30 AM »
I think I found the problem: When i delete the metadata and load the csv as reference, Metashape doesn´t take those data as new metadata. It is like I´ve never loaded the CSV. I think the software doesn´t work proper anymore on my computer
« Last Edit: January 08, 2024, 01:12:11 PM by AndreasMueller »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15397
    • View Profile
Re: replace Exif-Data by CSV-List
« Reply #4 on: January 12, 2024, 04:33:19 PM »
Hello Andreas,

When loading camera locations from the CSV file please make sure that "character-separated values"  file type is selected in the Open file dialog and that the labels column contain the image filenames corresponding to the cameras.
Best regards,
Alexey Pasumansky,
Agisoft LLC

AndreasMueller

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: replace Exif-Data by CSV-List
« Reply #5 on: January 17, 2024, 11:20:17 AM »
Hi Alexey,

it looks like that:

Should be okay as far as I know.

Thanks and best regards
Andreas

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15397
    • View Profile
Re: replace Exif-Data by CSV-List
« Reply #6 on: January 17, 2024, 01:13:51 PM »
Hello Andreas,

Yes, all looks fine.

If it doesn't work, please check that there are no "space" symbols next to the comma delimiter in the csv file and that the image filenames for the cameras added to the project correspond to the names in the Label column of CSV dialog. According to the screenshot "label" column is #51 - if it is an accident, switch it back to #1.
Best regards,
Alexey Pasumansky,
Agisoft LLC

AndreasMueller

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: replace Exif-Data by CSV-List
« Reply #7 on: January 17, 2024, 02:09:41 PM »
Hi Alexey,

I tried an older dataset whtich worked with an older verion of Metashape and it also doesn´t work with the new version. But a collegue of mine just found out, that when open the list in the console (Chunk.import reference) it does work. So it seems that the button on the UI doesn´t trigger any function.

Kind regards
Andreas

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15397
    • View Profile
Re: replace Exif-Data by CSV-List
« Reply #8 on: January 17, 2024, 03:02:52 PM »
Hello Andreas,

Is it correct, that the camera label information is present in Column #51 of the CSV file?

What arguments are used for importReference command that works?
Best regards,
Alexey Pasumansky,
Agisoft LLC

AndreasMueller

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: replace Exif-Data by CSV-List
« Reply #9 on: January 18, 2024, 02:16:53 PM »
Hello Alexey,

now it is getting really strange - the #51 was a mistake. Of course it is #1. Then it works for that dataset. First: Sorry for that confusion.

The strange thing is, that my colleague, who works on the same (server)computer, has the same issue with correct labeling (s. attached image). The command he used was:

doc = Metashape.app.document
 
chunk = doc.chunk
 
path = r'\\<PATH>\reference_file.txt'
 
cols = r'nxyzabc[XYZ]'
 
delimiter = ','
 
skip_rows = 1
 
chunk.importReference(path= path, columns= cols, delimiter= delimiter, skip_rows= skip_rows)


For his test project, it again worked only when he uses the command or when he copied the coordinate-list to the desktop, it also worked. But there is no issue with the file path.

Kind regards
Andreas