Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - awilson

Pages: [1]
1
In 1.4, the filtering parameter is passed to buildDepthMaps(), but I just noticed that there's not output related to filtering (that I saw) from that call, but when I run buildDenseCloud() it prints "filtering depth maps..."

Where is the filtering happening? From the output, it looks like it only happens in the DenseCloud step, in which case it would be really cool if we could re-run that function with different filtering without having to re-build the depth maps (i.e. move the parameter from buildDepthMaps() to buildDenseCloud() )

2
Python and Java API / A way to force non-read-only open?
« on: June 29, 2017, 08:19:15 PM »
I'm having a problem where a process will occasionally crash while I'm running it. When I try to re-run it, I run document.open( filename ), but it will only open read-only because it thinks the file is still in use. Is there any way to force it to open editable, or to switch a read-only document to editable after opening, via the API?

3
Python and Java API / How to print/handle progress
« on: June 15, 2017, 04:07:28 AM »
Lots of processes take an optional argument like:

progress (Callable[[float], None]) – Progress callback.

I was trying to implement it like this:

Code: [Select]
class ProgressPrinter( object ):
  def __init__( self, name ):
    self.name = name
  def __call__( self, percent ):
    print("%s Progress: %f%"%(self.name, percent))
    sys.stdout.flush()

But that gives me an error:

Code: [Select]
RuntimeError: incomplete format
I thought that was everything needed for something to be recognized as callable. Does anyone have a working example of how to handle the progress?

Thank you!

4
Python and Java API / How to merge two .psx files
« on: June 15, 2017, 04:02:36 AM »
I'm trying to do the equivalent of File->Append... to merge two files. I thought it would be something like:

Code: [Select]
doc = PhotoScan.app.document
doc.open(filepath1)
doc2 = PhotoScan.Document()
doc2.open(filepath2)
doc.append( doc2 )

but that gives me the error:

TypeError: object is not a sequence

Can someone point out what I'm doing wrong? Thank you!

5
General / Is 1 core reserved / gpu really necessary?
« on: September 23, 2016, 08:37:58 PM »
I know the recommendation is to reserve one core per gpu enabled. How much of a requirement is that at higher gpu counts? I may have access to a beefy gpu cluster (hundreds of gpus) that would be nice to use for my dense cloud computation. It seems like a handful of cores should be able to schedule out tasks for them, if that's the purpose of reserving the cores. But I certainly won't have hundreds of cores that I can reserve.

It looks like a lot of people have tried this in the past, from browsing the forums, but nobody ever posts the results of their tests.

6
General / Difference between multi-frame chunk and multiple chunks?
« on: September 23, 2016, 08:10:07 PM »
Right now my workflow has always been to use multi-frame chunks for several captures from the same cameras - I'll align the first frame and then process all of the frames.

I'd like better control in the UI (ability to label each frame, easily jump to a specific one, etc), so I'm considering moving to a separate chunk for each capture. I believe that it will be the same, except that I'll need to export cameras after aligning the first chunk and then import those cameras into each of the other chunks.

Are there any other differences in how they're treated internally that I should be aware of before moving to individual chunks?

7
Python and Java API / A way to open a non-blocking UI?
« on: September 23, 2016, 12:15:45 AM »
I have to loop over a bunch of different chunks and run expensive tasks in a script. I'd like a way to see which one I'm on, so I was hoping to open a little PyQt widget that displays the current chunk and a progress bar. Unfortunately, once I launch my gui, it seems like it blocks the drawing of both agisoft and my ui.  Here's the abbreviated version of what I'm running:

Code: [Select]
class MyWidget (QtGui.QWidget):
  # Define the behavior here
  def setCurrentChunk( self, chunkNumber ):
    # Do some stuff

def doIt():
  win = MyWidget()
  win.show()
  for i in range(0,4):
    win.setCurrentChunk( i )
    print("Running %d"%i)
    time.sleep(5)

Unfortunately, my window updates sporadically and the print statements don't show up in the agisoft console until after the whole loop is done.

I know python isn't truly threaded, but is there a way that you've found to launch a gui that won't block draws? I really don't want to have to write a separate program that communicates over sockets just for a progress bar.

Thanks!

8
Python and Java API / Environment variable for scripts path?
« on: September 21, 2016, 08:43:06 PM »
Is there an environment variable I can set that will point to my scripts, rather than putting them in /AppData/Local/AgiSoft/PhotoScan Pro/scripts? I'd like to have my scripts live on a network-mounted drive so I can access them from multiple machines and not have to manage copying the files to each computer every time I make a change.

Thanks!

Pages: [1]