Forum

Author Topic: Python API improvements  (Read 4169 times)

jedfrechette

  • Full Member
  • ***
  • Posts: 132
  • Lidar Guys
    • View Profile
    • www.lidarguys.com
Python API improvements
« on: February 05, 2013, 12:15:47 AM »
Over the last few days I've been working on integrating PhotoScan with our existing laser scanning and photogrametry workflows. In general I'm impressed and things have gone quite smoothly, however, there are a number of improvements to the Python API that would make things even better. Some of these might be considered bugs but rather than making separate threads, I've consolidated my suggestions below, in no particular order.

  • Use a different hyperref level when generating the PDF documentation so that bookmarks are usable for finding subclasses of PhotoScan. An index with more than 1 entry might be useful too.
  • EXIF data does not seem to be accessible from Python without installing a third party library.
  • A convenience attribute such as PhotoScan.Camera.markers would be useful for getting a list of markers that project on to a specific image without looping over all markers in a chunk.
  • Depending on the values of center_principal_point and square_pixels, the image produced by PhotoScan.Image.undistort may have a different camera matrix than the source image. It would be useful for the method to return the new matrix in addition to the undistorted image. The values for cx an cy are fairly obvious, while the values of fx and fy are not.
  • Specifying a hint for the PhotoScan.Application.get* methods dealing with files and directories doesn't seem to have any effect. The hint should probably be used as the title for the dialog window that pops up.
  • When using the PhotoScan.Application.get* methods for opening and saving files it should be possible to specify a list of file extensions that can be used to filter the list of files in the file selector dialog.
  • On Windows using the PhotoScan.Application.get* methods for opening and saving files and directories always seems to start in PhotoScan's installation directory. On Linux previously accessed directory locations do seem to be remembered correctly.
  • Additional data entry widgets, e.g. dropdown lists, check boxes, radio buttons etc. would be nice to have. TraitsUI does this nicely http://code.enthought.com/projects/traits/
  • Make it possible to add scripts to custom menus and toolbars so they appear as full-fledged tools.
Jed