Forum

Author Topic: filtering photo for high qualitty run  (Read 6623 times)

ronan

  • Newbie
  • *
  • Posts: 10
    • View Profile
filtering photo for high qualitty run
« on: July 24, 2017, 01:53:56 AM »
Hi,

When running in batch, i want to run a first low quality dem,
and then before running a high quality run I like to remove all photo which are not fully inside a selected polygon define from a shapefile.

using photoscan module, I found the way to get the foot print of the camera on my low quality DEM.
now I like to disable for my high quality run all photo where the foot print does not intersect my predefined shapefile polygon.
 
I understand you can import shapefile with  chunk.importShapes
but then I do not know how to create a polygon from my 4 foot print corners, and test its intersection with the polygon of my shapefile.
Is there any photoscan module which has the same function as the shapely module?

Thanks for your help
Ronan

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15232
    • View Profile
Re: filtering photo for high qualitty run
« Reply #1 on: July 24, 2017, 11:26:05 AM »
Hello Ronan,

In the following thread you can find the script that creates shape for each camera footprint:
http://www.agisoft.com/forum/index.php?topic=6662.msg33020#msg33020

So you may need to create the script that is generating the shape footprints, checking if they are inside the "master shape" and disable the cameras that have the footprints outside the area of interest.
Best regards,
Alexey Pasumansky,
Agisoft LLC

ronan

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: filtering photo for high qualitty run
« Reply #2 on: July 24, 2017, 06:28:33 PM »
Hi Alexey,
thanks for the reply.
is there any tools within the photoscan environment that can be used to deal with shape/contour/polygon?
For example in other project i have been using shapely.
Thanks
Ronan

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15232
    • View Profile
Re: filtering photo for high qualitty run
« Reply #3 on: July 24, 2017, 07:09:41 PM »
Hello Ronan,

The vertices of the shapes are stored as a list - each element is vector with the coordinate information.

You can try to install additional Python module for PhotoScan Python using pip. Which OS you are using?
Best regards,
Alexey Pasumansky,
Agisoft LLC

ronan

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: filtering photo for high qualitty run
« Reply #4 on: July 24, 2017, 07:32:02 PM »
that would be interesting
I am on xubuntu 16.04
how do you use pip in the photoscan env.
Cheers,
Ronan

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15232
    • View Profile
Re: filtering photo for high qualitty run
« Reply #5 on: July 24, 2017, 07:44:44 PM »
Hello Ronan,

you can use the following:
Code: [Select]
photoscan-pro/python/bin/python3.5 -m pip install module_name
Best regards,
Alexey Pasumansky,
Agisoft LLC

ronan

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: filtering photo for high qualitty run
« Reply #6 on: July 24, 2017, 07:48:33 PM »
thanks
I have the following error when running pip

photoscan-pro/python/bin/python3.5 -m pip install numpy
Traceback (most recent call last):
  File "/home/ronan/Agisoft/photoscan-pro/python/lib/python3.5/runpy.py", line 174, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/home/ronan/Agisoft/photoscan-pro/python/lib/python3.5/runpy.py", line 133, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/home/ronan/Agisoft/photoscan-pro/python/lib/python3.5/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/home/ronan/Agisoft/photoscan-pro/python/lib/python3.5/site-packages/pip/__init__.py", line 16, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/home/ronan/Agisoft/photoscan-pro/python/lib/python3.5/site-packages/pip/vcs/subversion.py", line 9, in <module>
    from pip.index import Link
  File "/home/ronan/Agisoft/photoscan-pro/python/lib/python3.5/site-packages/pip/index.py", line 30, in <module>
    from pip.wheel import Wheel, wheel_ext
  File "/home/ronan/Agisoft/photoscan-pro/python/lib/python3.5/site-packages/pip/wheel.py", line 39, in <module>
    from pip._vendor.distlib.scripts import ScriptMaker
  File "/home/ronan/Agisoft/photoscan-pro/python/lib/python3.5/site-packages/pip/_vendor/distlib/scripts.py", line 14, in <module>
    from .compat import sysconfig, detect_encoding, ZipFile
  File "/home/ronan/Agisoft/photoscan-pro/python/lib/python3.5/site-packages/pip/_vendor/distlib/compat.py", line 66, in <module>
    from urllib.request import (urlopen, urlretrieve, Request, url2pathname,
ImportError: cannot import name 'HTTPSHandler

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15232
    • View Profile
Re: filtering photo for high qualitty run
« Reply #7 on: August 23, 2017, 02:26:54 PM »
Hello ronan,

It seems that you might need to install libssl 0.9.8 before using pip install in PhotoScan 1.3:

Code: [Select]
wget http://snapshot.debian.org/archive/debian/20110406T213352Z/pool/main/o/openssl098/libssl0.9.8_0.9.8o-7_amd64.deb
sudo dpkg -i libssl0.9.8_0.9.8o-7_amd64.deb
« Last Edit: January 18, 2018, 06:28:47 PM by Alexey Pasumansky »
Best regards,
Alexey Pasumansky,
Agisoft LLC