Forum

Author Topic: Meet Talus... plus some questions  (Read 5694 times)

nickc

  • Newbie
  • *
  • Posts: 25
    • View Profile
Meet Talus... plus some questions
« on: January 08, 2015, 06:44:33 PM »
Hello everyone

I would like you to meet Talus...who has many talents.  :)
One of which is providing us with very accurate camera array.

The Shoe image provided below is one of our first tests and the results are exciting.





As you can imagine, having a robot means we are trying to automate as much of our pipeline as possible. I've been putting together a bunch scripts to interact with various other aspects of our pipeline (most of which are proprietary). Eventually we would like to have a single click to photograph & process all of our data but for now we are really happy to just see things up and running properly.

I do have a few questions regarding the python API...I've been hitting some walls. The Script seems to get as far as chunk.matchPhotos() but then fails when it gets into photo alignment. If anyone has ideas on ways I can improve this I would very much appreciate it.

I am using Agisoft PhotoScan Professional Edition version 1.1.0 build 2004 (64)

Here is my current script...:

Code: [Select]
import os
import PhotoScan

# Define: Home Directory
Home = "C:\\raw\\tiff\\"
os.chdir(Home)
print ("home: " + Home)

# Set Application Objects
doc = PhotoScan.app.document
print ("Script Started")

# Define Chunk
chunk = PhotoScan.app.document.addChunk()
chunk.label = "MainChunk"

# Find Images
ImageFiles = []
for photo in os.listdir (Home):
if photo.endswith('.tif'):
ImageFiles.append(photo)
print (ImageFiles)

# Load Image Files into Chunk Camera
chunk.addPhotos(ImageFiles)
chunk.importMasks(path='',method='alpha')
camera = chunk.cameras[0]

# Match Photos
chunk.matchPhotos()

# Align Photos
chunk.photoAlign()

# Build Dense Cloud
chunk.buildDenseCloud()

#Build Model
chunk.buildModel()

# Build UVs
chunk.buildUV()

# Build Texture
chunk.buildTexture()
doc.save()




Anyways thanks everyone...and special thanks to the agisoft team for being so responsive.
Take Care!

-nick-
« Last Edit: January 08, 2015, 06:50:24 PM by nickc »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Meet Talus... plus some questions
« Reply #1 on: January 08, 2015, 06:50:17 PM »
Hello Nick,

After chunk.matchPhotos() you need to use chunk.alignCameras(), otherwise you do not have any estimated camera positions, unless you have used importCameras option, but in the latter case you'll need to use chunk.buildPoints() function.
Best regards,
Alexey Pasumansky,
Agisoft LLC

nickc

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Meet Talus... plus some questions
« Reply #2 on: January 08, 2015, 10:28:27 PM »
Awesome that worked!

i was using chunk.alightPhotos() before and that didnt work...whats the difference?

nickc

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Meet Talus... plus some questions
« Reply #3 on: January 08, 2015, 10:31:45 PM »
Also...it seems that i'm dropping some camera data thats held in the .tif file somewhere? The cameras are stacking up on each other.

edit - Ah... i noticed i was loading the masks but not actually using them. all good now. thanks again!
« Last Edit: January 09, 2015, 01:26:56 AM by nickc »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Meet Talus... plus some questions
« Reply #4 on: January 11, 2015, 02:58:29 PM »
Hello Nick,

There's no .alignPhotos() method in Python API of PhotoScan Pro 1.1.0.
Best regards,
Alexey Pasumansky,
Agisoft LLC

nickc

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Meet Talus... plus some questions
« Reply #5 on: January 12, 2015, 05:29:12 PM »
Ah! thanks!

Kiesel

  • Sr. Member
  • ****
  • Posts: 332
    • View Profile
Re: Meet Talus... plus some questions
« Reply #6 on: January 12, 2015, 10:43:56 PM »
Hello Nick,

interesting construction - your Talus!

Do you have tried it also the other way around with fixed camera and moved object by your robot? I think this would also be good for camera calibration, moved target =>  known camera positions.

Karsten

nickc

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Meet Talus... plus some questions
« Reply #7 on: January 12, 2015, 11:24:21 PM »
@ keisel - thanks! This is certainly a work in progress. It is still an option to move the product over the camera but the set up isn't just used as a photogrammetry platform so it needed to be flexible enough to photograph a large range of product. (lots of shapes and sizes)