Forum

Author Topic: Retrieving Chunk information  (Read 4613 times)

Andreas Balbi

  • Newbie
  • *
  • Posts: 3
    • View Profile
Retrieving Chunk information
« on: March 31, 2016, 02:05:59 PM »
Hi,
I am trying to retrieve, via python, all the information you get right clicking a chunk and choosing "show info".

I was able to get almost all, but I couldn't find:
- matching time
- alignment time
and, about the dense, the info in:
Dense point cloud>reconstruction parameters>processing time

Where do I get these info? In PhotoScan.app.document.chunk.meta? And how do I inspect the information in chunk.meta? metaData objects do not seem to be iterable.


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Retrieving Chunk information
« Reply #1 on: March 31, 2016, 02:14:20 PM »
Hello Andreas,

You can access alignment, matching and dense cloud generation time via meta of the corresponding elements
Code: [Select]
chunk.meta["align/duration"]
chunk.point_cloud.meta["match/duration"]
chunk.dense_cloud.meta["dense_cloud/duration"]
Best regards,
Alexey Pasumansky,
Agisoft LLC

Andreas Balbi

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Retrieving Chunk information
« Reply #2 on: March 31, 2016, 03:29:33 PM »
It works!

Just one little correction:
Alignment duration, at least in version 1.2.3, is retrievable by

Code: [Select]
chunk.point_cloud.meta["align/duration"]and not by
Code: [Select]
chunk.meta["align/duration"]
Thanks Alexey!
My best regards,
A.
« Last Edit: March 31, 2016, 03:41:09 PM by Andreas Balbi »

Martin_idk

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Retrieving Chunk information
« Reply #3 on: July 13, 2016, 01:45:35 PM »
Thank you for that information, that helped me, too.

Where do I get these info? In PhotoScan.app.document.chunk.meta? And how do I inspect the information in chunk.meta? metaData objects do not seem to be iterable.

Im also interestet what other informations can be retrieved from chunk.meta. Is there any way to look in it?

Im especially interested in the RMS Reprojection Error and the amount of points in the sparse cloud.

Best Reguards

Martin

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Retrieving Chunk information
« Reply #4 on: July 13, 2016, 01:49:58 PM »
Hello Martin,

RMS reprojection error is not stored in any meta data, so you need to calculate it by yourself.

Number of points in the sparse cloud can be extracted using len(chunk.point_cloud.points) command (if chunk variable contains the link to the chunk of interest).
Best regards,
Alexey Pasumansky,
Agisoft LLC

Martin_idk

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Retrieving Chunk information
« Reply #5 on: July 13, 2016, 04:00:53 PM »
Thanks a lot Alexey!

simon_29

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Retrieving Chunk information
« Reply #6 on: July 15, 2016, 05:07:35 PM »
Hi,
 
I would like to know if there were a command to check if a camera is not aligned in a chunk. I could not find anything in the python reference pdf ( version 1.2.5).

Thank you in advance !

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Retrieving Chunk information
« Reply #7 on: July 15, 2016, 05:11:58 PM »
Hello simon_29,

Code: [Select]
if camera.transform:
      print("Camera is aligned")
else:
      print("Camera is not aligned")
Best regards,
Alexey Pasumansky,
Agisoft LLC

simon_29

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Retrieving Chunk information
« Reply #8 on: July 15, 2016, 06:01:50 PM »
Thanks !