Forum

Author Topic: Is it posible use APM data flash log with loadReference()  (Read 4244 times)

andrey.d

  • Newbie
  • *
  • Posts: 26
    • View Profile
Is it posible use APM data flash log with loadReference()
« on: December 13, 2016, 04:10:12 AM »
Hi,

Is it posible use APM data flash log with loadReference()?
Code: [Select]
chunk.loadReference(APM_flight_log_file, format=PhotoScan.ReferenceFormatCSV, delimiter=",")
As I see it not work.


Thanks.

Andrew

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Is it posible use APM data flash log with loadReference()
« Reply #1 on: December 13, 2016, 09:52:00 AM »
Hello Andrew,

Can you post an example with several lines of this file?
Best regards,
Alexey Pasumansky,
Agisoft LLC

andrey.d

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Is it posible use APM data flash log with loadReference()
« Reply #2 on: December 13, 2016, 10:05:08 AM »
Sure.

In GUI mode I can use APM Dataflash logs
(http://ardupilot.org/copter/docs/common-downloading-and-analyzing-data-logs-in-mission-planner.html#common-downloading-and-analyzing-data-logs-in-mission-planner)

But in PhotoScan API are next reference format:
class PhotoScan.ReferenceFormat
Reference format in [ReferenceFormatXML, ReferenceFormatTEL, ReferenceFormatCSV, ReferenceFormatMavinci,
ReferenceFormatBramor]

This code for 1.3 ver.
In 1.2 format should be text constant as I see in doc.

Code: [Select]
log_file="C:\\vulc\\vulc.log"
images_list = glob.glob('C:\\vulc\\*.jpg')

doc = PhotoScan.app.document

doc.open(project_path)
chunk = PhotoScan.app.document.addChunk()
chunk.addPhotos(images_list)

camera = chunk.cameras[0]
#camera.photo.meta["Exif/FocalLength"]
chunk.loadReference(log_file, format=PhotoScan.ReferenceFormatCSV, delimiter=",")
chunk.matchPhotos(accuracy=PhotoScan.HighAccuracy, preselection=PhotoScan.GenericPreselection)

chunk.alignCameras()
chunk.buildDenseCloud(quality=PhotoScan.MediumQuality)
chunk.buildModel(surface=PhotoScan.Arbitrary, interpolation=PhotoScan.EnabledInterpolation)
chunk.buildUV(mapping=PhotoScan.GenericMapping)
chunk.buildTexture(blending=PhotoScan.MosaicBlending, size=4096)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Is it posible use APM data flash log with loadReference()
« Reply #3 on: December 13, 2016, 12:08:44 PM »
Hello Andrew,

I can't find any file sample for the log on the page, can you send me a direct download link? Also you've mentioned that you can load the data from GUI, which option do you use? If you are loading it via Import CSV dialog, can you post a screenshot?
Best regards,
Alexey Pasumansky,
Agisoft LLC

andrey.d

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Is it posible use APM data flash log with loadReference()
« Reply #4 on: December 15, 2016, 02:34:06 AM »
I am just using Import button in Reference Pane.
Find APM dataflash log attached.
It not clear cvs files, but there are a section with cvs data with file name and coordinates.
PhotoScan can use it directly via GUI - find screenshot of result iattached too.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Is it posible use APM data flash log with loadReference()
« Reply #5 on: December 15, 2016, 09:19:55 AM »
Hello Andrew,

*.log option is related to C-Astral Bramor log. On the screenshot I see that the input file was not treated properly, as it is in a different from C-Astral log.
Best regards,
Alexey Pasumansky,
Agisoft LLC

andrey.d

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Is it posible use APM data flash log with loadReference()
« Reply #6 on: December 15, 2016, 10:43:51 AM »
Sorry.
I see

Thanks

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Is it posible use APM data flash log with loadReference()
« Reply #7 on: December 15, 2016, 11:07:59 AM »
We'll see if such kind of input data can be added to supported formats in future.
Best regards,
Alexey Pasumansky,
Agisoft LLC