Forum

Author Topic: GUI vs Python  (Read 3687 times)

n@sk

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
GUI vs Python
« on: December 15, 2016, 06:17:57 PM »
http://www.agisoft.com/forum/index.php?topic=3873.msg20210#msg20210
http://www.agisoft.com/forum/index.php?topic=5510.msg26916#msg26916
http://www.agisoft.com/forum/index.php?topic=5128.msg25420#msg25420
http://www.agisoft.com/forum/index.php?topic=2653.msg28298#msg28298

The question is related to all the above, and perhaps some more, that remain without an answer as far as I am concerned.

GUI:Gradual Selection=X is not the same as buildPoints(error=X) which is also not the same as GUI:Align Photos, which uses an adaptive threshold instead of a fixed value X for 'Estimating Camera Location'.

What's the point of automating a process in Python if it is different from the one that we would normally use within the GUI?
Especially when there is not even access to the corresponding GUI process from the API.

We need to be able to automate what GUIPhotoScan does with PhotoScanPython and not reinvent the wheel.

Please let me know if I am missing something

thanks
« Last Edit: December 20, 2016, 05:57:00 PM by n@sk »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13642
    • View Profile
Re: GUI vs Python
« Reply #1 on: December 15, 2016, 07:08:32 PM »
Hello n@sk,

Apart from the gradual selection that is not currently accessible from Python directly, can you provide example for our internal studies about the difference of the produced results via API and GUI: the project data and workflow + script that can be compared?

As for the Convert equivalent, I've fixed the link to the corresponding thread: http://www.agisoft.com/forum/index.php?topic=3206
Best regards,
Alexey Pasumansky,
Agisoft LLC

n@sk

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: GUI vs Python
« Reply #2 on: December 15, 2016, 09:09:23 PM »
Hello Alexey,

Thanks for the prompt response.

The 'convert issue' link was mentioned in another post
http://www.agisoft.com/forum/index.php?topic=5128.msg25426#msg25426
but it was broken so I couldn't confirm that it's not relevant.

In any case, reflecting the corresponding Python commands at the command line when running GUI processes would be useful.

My problem comes with the following process:

With unknown exterior camera orientation
chunk.matchPhotos {Detecting points...}
and
chunk.alignCameras {'Estimating camera locations...' performing '3 sigma filtering...'}
do a great job producing a decent sparse point cloud
      
I am happy to use the scripts that you have provided in the past in order to extract the Gradual Selection parameters and filter them outside of PhotoScan.

However, in order to automate the full process this doesn't help much.
Copying from the guide about noisy points and reprojection error:
'it may be useful to remove them before building geometry' (I assume they affect the depth search space for dense matching)
Indeed, filtering the reprojection error in the GUI usually works as desired.

I understand that all matches ,even filtered ones, are kept within the database which means that chunk.buildPoints(error=X) {'coordinates applied...'} will 'resuscitate' some of them and is by no means equivalent to Gradual Selection:Reprojection Error as others have mentioned in the forum.
Even though this might be a better option, defining the threshold is a bit of a pain.
This is even more annoying when the exterior camera orientation is known which means that no chunk.alignCameras() hence no '3 sigma filtering...' has been used before buildPoints()

I suppose it all comes down to this:
Could you please implement Gradual Selection (including Reconstruction Uncertainty) in Python or make buildPoints() a bit more flexible?

thanks

n@sk

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: GUI vs Python
« Reply #3 on: December 15, 2016, 11:43:26 PM »
Please also do something about the Gradual Selection Slider.

What's the point of the text box where I can type in any value smaller than the slider step if it defaults to the slider step without a notification?
I assume that those values are calculated on the fly with a predefined number of bins, but If there are indeed points with smaller errors I need to recalculate, otherwise I assume that my wish was granted.

You can at least add a note in the documentation.

thanks

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13642
    • View Profile
Re: GUI vs Python
« Reply #4 on: December 20, 2016, 04:33:36 PM »
Hello n@sk,

The issue with the text input to the gradual selection dialog will be fixed in the next version update.

Also we'll implement gradual selection criteria for the sparse cloud points via Python, it will work as in example below (not available in build 3149 yet):
Code: [Select]
f = PhotoScan.PointCloud.Filter()
f.init(chunk, PhotoScan.PointCloud.Filter.ReconstructionUncertainty)
f.selectPoints(10.1)
Best regards,
Alexey Pasumansky,
Agisoft LLC

n@sk

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: GUI vs Python
« Reply #5 on: December 20, 2016, 05:56:20 PM »
Thank you Alexey,
Your prompt responses and solutions are highly appreciated!

One last suggestion for your consideration if I may.
On the same note of being able to automate exactly what we would manually do in the GUI
please consider separating the selection of lens distortion parameters during optimisation
from optimizeCameras(fit_k1k2k3...)  to optimizeCameras(fit_k1,fit_k2,fit_k3...)
as not all three of them are always significant, unless of course this test is performed in the background

thanks again

« Last Edit: December 20, 2016, 09:35:24 PM by n@sk »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13642
    • View Profile
Re: GUI vs Python
« Reply #6 on: December 21, 2016, 06:11:08 PM »
Hello n@sk,

Ok, thanks for suggestion, we'll also check that.
Best regards,
Alexey Pasumansky,
Agisoft LLC