Forum

Author Topic: import marker coordinates  (Read 8841 times)

viper_0711

  • Newbie
  • *
  • Posts: 23
    • View Profile
import marker coordinates
« on: May 01, 2015, 06:26:16 PM »
hi

I'm trying to python the process of detecting markers of coded targets, and then import the predefined coordinates of markers exported from previous sessions of GUI (same markers)
the following code runs and detect markers works but then it doesn't seem to assign coordinates values to the markers. (where i successfully did so from GUI)

        chunk.detectMarkers()    
   chunk.loadReference( markerFile, "csv")
   chunk.updateTransform()   

where #markerFile is the full path of the CSV .txt


secondly, chunk.detectMarkers( type = TargetCircular12bit, tolerance=50 ) gives me errors so i stick with default without parameters but i hope i can have it


any insights appreciated!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15471
    • View Profile
Re: import marker coordinates
« Reply #1 on: May 02, 2015, 10:42:09 AM »
Hello viper_0711,

I assume tha the problem is related to the fact that exported coordinate values are in the Estimated columns, while imprort CSV function tries to load the data from Source columns.
Best regards,
Alexey Pasumansky,
Agisoft LLC

viper_0711

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: import marker coordinates
« Reply #2 on: May 02, 2015, 12:11:29 PM »
Thanks
So what is the proper code that does what import marker locations does like in GUI button next to the export?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15471
    • View Profile
Re: import marker coordinates
« Reply #3 on: May 03, 2015, 12:05:50 PM »
Hello viper_0711,

At the moment .loadReference() function doesn't allow to specify the column indices for the corresponding values, so there are two workarounds:
- remove source columns or exchange them with the estimated coordinates columns,
- create a Python script that will read lines from the exported CSV file and load the coordinates from the user-defined columns.
Best regards,
Alexey Pasumansky,
Agisoft LLC