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.


Messages - awilson

Pages: [1] 2
1
Ah, that makes sense. Thanks for clarifying!

2
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() )

3
Python and Java API / Re: A way to force non-read-only open?
« on: July 03, 2017, 09:53:07 PM »
Awesome, thanks!

4
Python and Java API / Re: A way to force non-read-only open?
« on: July 03, 2017, 08:28:54 PM »
It looks like I can do this to get it to run:

Code: [Select]
if os.path.exists( '/tmp/my_locked_file.files/lock' ):
  os.remove( '/tmp/my_locked_file.files/lock' )
doc.open( '/tmp/my_locked_file.psx' )

Is that safe, as long as I'm sure the lock is accidental? Am I setting myself up for some sort of trouble down the line by just removing that file?

5
Python and Java API / Re: the marker's est
« on: July 03, 2017, 08:25:47 PM »
I think this should work for you. I'm not sure the difference in calculation between X and X_est, but this gives me the values that match X_est in my scene:

Code: [Select]
for marker in chunk.markers:
  p = marker.position
  p.size = 4
  p.w = 1
  T = chunk.transform.matrix
  p_t = T * p
  p_t.size = 3
  proj = chunk.crs
  p_est = proj.project(p_t)

6
Python and Java API / Re: A way to force non-read-only open?
« on: June 30, 2017, 08:56:05 PM »
That seems to be running into the same issue. The file is locked, but I want to open it and be able to make changes to it. I tried this code after your last comment:

Code: [Select]
import PhotoScan

newDoc = PhotoScan.Document()
newDoc.open('/tmp/my_locked_file.psx')

PhotoScan.app.quit()

And I see:
Document.open(): The document is opened in read-only mode because it is already in use.

Essentially, I want a way to do whatever happens when the GUI asks "Are you sure you want to edit this file?" and I say yes.

7
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?

8
Python and Java API / Re: How to print/handle progress
« on: June 29, 2017, 08:02:43 PM »
 :-[

Well that's embarrassing. Thanks for catching that, this is working fine now that I've gotten out of my own way.

9
Python and Java API / Re: How to print/handle progress
« on: June 29, 2017, 04:00:21 AM »
Any guidance on this? I'm running reconstructions via the command line, so I don't have the benefits of the gui progress bar. It would be REALLY nice to be able to know where I am in the current stage. Thanks!

10
Python and Java API / Re: How to merge two .psx files
« on: June 15, 2017, 07:25:56 PM »
I figured it out - the documentation shows the chunks parameter as optional, but then it's trying to parse None as a list, I believe. Regardless, this code works:

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

11
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!

12
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!

13
General / Re: Is 1 core reserved / gpu really necessary?
« on: September 27, 2016, 11:37:20 PM »
For sure. In tests with 2 gpus it seems like turning off all of the cpus performs better than just pulling one core per gpu (at least, for the dense cloud generation), so we'll do that. I'm working on getting access to the cluster, and will update if I can get any results.

14
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.

15
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?

Pages: [1] 2