Forum

Author Topic: baseline filters (overlap optimisation)  (Read 3462 times)

frank.stremke

  • Full Member
  • ***
  • Posts: 206
    • View Profile
baseline filters (overlap optimisation)
« on: April 11, 2014, 12:31:12 PM »
hi
iam using a kit for my aerials with an intervallometer
this works quite good but sometimes I have to stop or walk slower or faster because of the wind changes or obstacles on the ground. also the wind directions change
in the end I have way to many images on some parts of my modell and just about enough on others
is there any way I can get rid of images photoscan does not need or are even bad for the modell since the baseline of the stereopirs would be to small.
any ideas .... iam talking about setzs of 600 to 1100 images here and I can not select them manualy so usualy I use more or les all but of course this takes very much computer time and if there is a function like this I might as well use it.
thanks
a lot
frank

Marcel

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
Re: baseline filters (overlap optimisation)
« Reply #1 on: April 11, 2014, 01:26:41 PM »
Agisoft has a phyton script that selects redundant cameras (based on camera position). You do need Photoscan Professional to run script however.

frank.stremke

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: baseline filters (overlap optimisation)
« Reply #2 on: April 11, 2014, 01:30:57 PM »
I have the professional but where to find the script?
edit
ok I just found the directory and there are so many scipts so which one to use is there any documentation on the scipts maybe there is a lot of usefull stuff there which is not usable for me since I don't know what they do
frank
« Last Edit: April 11, 2014, 01:36:00 PM by frank.stremke »

frank.stremke

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: baseline filters (overlap optimisation)
« Reply #3 on: April 13, 2014, 01:39:15 PM »
hi
anyone could please point me out which pyton script to use for the above mentioned fuction
thanks a lot
frank

wojtek

  • Full Member
  • ***
  • Posts: 152
    • View Profile
Re: baseline filters (overlap optimisation)
« Reply #4 on: April 13, 2014, 02:23:06 PM »
Hello Frank,

You need to email agisoft's support to receive it.

frank.stremke

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: baseline filters (overlap optimisation)
« Reply #5 on: April 13, 2014, 04:07:24 PM »
thank you for that after rereading the above reply it makes sense now ....
yours
frank

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 11775
    • View Profile
Re: baseline filters (overlap optimisation)
« Reply #6 on: April 13, 2014, 10:54:44 PM »
Hello Frank,

I think that we have the script that disables/removes cameras that are too close, taking into account their coordinates estimated during Align Photos stage. I'll check it and let you know tomorrow.
Best regards,
Alexey Pasumansky,
AgiSoft LLC

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 11775
    • View Profile
Re: baseline filters (overlap optimisation)
« Reply #7 on: April 14, 2014, 11:49:57 AM »
Hello Frank,

Could you please try the following script on your data.

You can use argument field for better results. It is some kind of tolerance and is 50 by default, lower values mean more strict criterion, but I do not recommend to go under 5-10 units:

Code: [Select]
import sys
import PhotoScan

doc = PhotoScan.app.document
chunk = doc.activeChunk

arg = 50 #tolerance by default

if len(sys.argv) > 1:   
arg = int(sys.argv[1])

print("Script started.")

camera_list = list(chunk.cameras)

for camera in list(camera_list): #removing from list NA and disabled cameras
if not (camera.transform and camera.enabled):
camera_list.remove(camera)

dist = list()
for i in range(0, len(camera_list)):
icamera = camera_list[i]
for j in range(i + 1, len(camera_list)):

jcamera = camera_list[j]

stereobase = (icamera.center - jcamera.center).norm()
dist.append(stereobase)

dist.sort()
mediana = dist[len(dist) // 2]

for i in range(0, len(camera_list)):
icamera = camera_list[i]
if not icamera.enabled:
continue

for j in range(i + 1, len(camera_list)):

jcamera = camera_list[j]
stereobase = (icamera.center - jcamera.center).norm()

if stereobase < mediana / arg:
jcamera.enabled = False
continue

print("Script finished.")
Best regards,
Alexey Pasumansky,
AgiSoft LLC

frank.stremke

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: baseline filters (overlap optimisation)
« Reply #8 on: April 14, 2014, 01:49:05 PM »
thanks a lot!!!!
 will try it today
so I presume I paste the code into e textfile and run it by selecting the file in ps
will try and report back here of the results...

frank