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

Pages: [1]
Python and Java API / return code from batch run
« on: June 09, 2017, 08:02:00 PM »
when I submit a photoscan-pro (1.3.0) batch run to our HPC cluster via slurm, the job always finishes with a failed status because Photoscan returns a non-zero return code.

if I run from the command line I see:

[mmanning@ln001 monument]$ singularity exec --writable -B /global/scratch/mmanning/monument/:/scratch/  /global/scratch/groups/dh/photoscan13.img  /scratch/
Activation successful
saved project in 0.058408 sec
[mmanning@ln001 monument]$

is there any way to turn off these status statements and just get a return code of 0 when successful or an error code when it is not?

General / Re: Agisoft PhotoScan 1.3.0 pre-release
« on: January 14, 2017, 12:24:20 AM »
Hello MManning,

According to the log the texture is built. But you need to save the project in PSX format to build orthomosaic (it's not connected anyhow to the texture).

ok,  after reading the docs I understand the difference between a psz and psx a little bit better however Im not clear, when using the python sdk, how to save to each format.

- It seems from the photoscan python api document that seems to create a .psz by default, is that true?

- if I just name the file with the project extension ("project.psx"  ) will photoscan save to the correct (project vs archive) format?

- is Model.saveTexture("project.psx") preferred way to save saving before building the orthomosaic?

- is it true that archive (psz) format is the best format for holding the full set of information (images, settings, etc)  for long term?

Again, thanks for your help and patience.

General / Re: Agisoft PhotoScan 1.3.0 pre-release
« on: January 13, 2017, 08:53:49 PM »
Hi Alexey
thanks for the response. When I add in the buildUV step before the buildTexture:

doc ="...")
chunk = doc.chunk
chunk.buildTexture( color_correction=True )
chunk.buildOrthomosaic( surface=PhotoScan.DataSource.ModelData )

I get an error :

'blending textures... *********************************** frames quality estimated in 1.23499 sec', '*********************************** done in 13.5811 sec', 'postprocessing atlas... done in 0.011684 sec', 'BuildOrthomosaic: projection type = Planar, blending mode = Mesh, surface = Mosaic, resolution = 0', 'Please save project in PSX format before processing', 'Traceback (most recent call last):', '  File "/global/home/users/mmanning/actest/", line 10, in <module>', '    chunk.buildOrthomosaic( surface=PhotoScan.DataSource.ModelData ) ', 'RuntimeError: Empty frame path'

Im not sure what to do with this, I see only one reference to a PSX in the 1.3 ref documentation. Do I need to export the model into a PSX then run build texture? Is the "Empty frame path" message related or something different?

Thank you for your assistance, still learning Photoscan.


General / Re: Agisoft PhotoScan 1.3.0 pre-release
« on: January 12, 2017, 10:26:17 PM »
I am trying to duplicate the processing of images in batch mode that my researcher does via the UI. She follows this path:

- load images
- build dense cloud
- build mesh (buildModel)
- build texture
- build orthomosaic[/right][/right]

However when I hit the buildTexture step in my batch process I get this error:
RuntimeError: Missing uv coordinates

In the example in the Photoscan 1.3 docs it show that buildUV step is before buildTexture. Is this a requirement for buildTexture? My researcher says that she does not perform a buildUV-type step in the UI that she is aware of.

Any ideas on what option I might be missing on my build steps?


General / Re: Agisoft PhotoScan 1.3.0 pre-release
« on: December 06, 2016, 08:07:51 PM »
with the command line feature of v1.3 it would be nice to submit the PS model build to a GPU node on a cluster. the issue is that when you submit a job to a cluster you dont know which GPU node will be assigned the job. Since I cant install the license on every GPU node, I get a license error as the result of my run. ( the PS install itself is in a container which is executed on the node). Does anyone know of options to allow for this type of processing?


Python and Java API / Re: photoscan dense cloud viewer in ipython notebook
« on: December 06, 2016, 12:44:07 AM »
the ipython notebook I am creating is more of a batch workflow. I write the batch script in one cell then run it ( -r in the next then rinse and repeat. Between these script executions I would like to view the current  model or points cloud that I am building.

Can you tell me how you load the image into matplotlib? which format are you exporting then loading? Can you show both the points cloud and the model in 3D?  Apologies for being slow on the uptake...

I have:

Code: [Select]
%matplotlib notebook

from IPython.display import set_matplotlib_formats
import matplotlib.pyplot as plt

set_matplotlib_formats('pdf', 'svg')
from IPython.display import Image, SVG

import matplotlib.image as mpimg
import matplotlib.pyplot as plt


OSError: cannot identify image file 'actest/model.obj'[/quote][/code]

Mayavi requires VTK (as I understand) which is currently not installed on my server. Meshlab's last release was in Apr2014 but maybe that is an option. Blender is nice but I dont see how to embed it into a notebook, looks like I need to upload image to the site.  Also noticed that Anaconda comes with a yt module that seems to provide visualizations but, again. Im stuck on the load step..

Appreciate any examples you might provide.


General / render in matplotlib
« on: November 30, 2016, 10:03:15 AM »
Is it possible to load an exported Photoscan model or point cloud into matplotlib? It seems that Matplotlib reads SVG format for 3D data.

Python and Java API / photoscan dense cloud viewer in ipython notebook
« on: November 29, 2016, 02:56:04 AM »
I am wondering if other developers using the Photoscan 1.3 version from an ipython notebook have attempted to view the point cloud inside the notebook. I looked for a viewer which I could use in ipython and  which could read one of Photoscan's output formats. Was hoping that Plotly might work. Has anyone had success with something similar?

Thanks for your help.

General / Re: Agisoft PhotoScan 1.3.0 pre-release
« on: October 25, 2016, 09:30:38 PM »
Hello Alexey
In the new 1.3 pre-release I am able to run the following steps in interactive mode:

root@li641-212:/opt/test# -i
Agisoft PhotoScan Python Interactive Console (Version 1.3.0 build 3075)
Type exit() and press Enter to exit
>>> import PhotoScan
>>> doc =
>>> chunk =
>>> chunk.addPhotos(["/scratch/age_43.png", "/scratch/page_44.png"])

but when I put those steps into a file and run them I receive a seg fault:

root@li641-212:/opt/test# -r
Segmentation fault

Can you advise how I might diagnose the issue?

Thank you for your help

General / Re: Agisoft PhotoScan 1.3.0 pre-release
« on: October 17, 2016, 11:45:06 PM »
Is it possible to install the trial license for PhotoScan-Pro 1.3 Linux on the command line?

# -r
Error checking out license
No license for product (-1)
Segmentation fault

Thanks for your help.

General / Re: Agisoft PhotoScan 1.3.0 pre-release
« on: October 13, 2016, 02:11:48 AM »
The 1.3 python reference doc does not contain information on running from the command line. Pretty significant gap. How is the venv sourced? Perhaps a simple hello world example? Is this in the works?

If I am running on a cloud node, how do I enter a temp license key?


Pages: [1]