Forum

Author Topic: Using Stereo Cameras with Photoscan  (Read 7421 times)

SK12345

  • Newbie
  • *
  • Posts: 9
    • View Profile
Using Stereo Cameras with Photoscan
« on: May 16, 2018, 02:56:12 PM »
Hello,

I am new to Photoscan and I'm looking for a way to use stereo image pairs in Photoscan. I am using a Stereolabs ZED camera with a baseline of 120mm. I am hoping for a way to create a scaled point cloud with the use of the known baseline.

I have found some suggestions for manually using scale bars, however I'm not sure how I can do this efficiently for a large data set.

I have a few hundred pairs of images named as "left_000XXX.png" and "right_000XXX.png" where XXX is the image number.

Any suggestions would be greatly appreciated!

Thanks!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15118
    • View Profile
Re: Using Stereo Cameras with Photoscan
« Reply #1 on: May 16, 2018, 06:35:58 PM »
Hello SK12345,

In the nearby thread there are some examples of the automatic scale bar creation using Python:
http://www.agisoft.com/forum/index.php?topic=9012.0

For your case you can try the following script:
Code: [Select]
import PhotoScan
chunk = PhotoScan.app.document.chunk
cameras = list(chunk.cameras)
while cameras:
    camera1 = cameras.pop(0)
    for camera2 in cameras:
        if camera1.label.rsplit("_", 1)[1] == camera2.label.rsplit("_", 1)[1]:
            cameras.remove(camera2)
            scalebar = chunk.addScalebar(camera1, camera2)
            scalebar.reference.distance = 0.12
            break
print("script finished")

Best regards,
Alexey Pasumansky,
Agisoft LLC

SK12345

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Using Stereo Cameras with Photoscan
« Reply #2 on: May 17, 2018, 05:15:54 AM »
Thank you for the help Alexey, much appreciated! The Python script worked perfectly.

One other question if you don't mind, I have potentially 10000 image pairs from each flight, however I usually cut it down to every Nth image for processing. Is there any better way to use Photoscan to choose the most suitable/good quality image pairs from a large set rather than taking every 20th image pair for example?

Thanks again!

l.chrobak

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Using Stereo Cameras with Photoscan
« Reply #3 on: January 28, 2019, 07:28:50 PM »
Is there a way to set the baseline for a large number of images in the the GUI (without using a script)?