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

Pages: [1]
1
Python and Java API / Render image from set locations.
« on: September 10, 2018, 07:04:54 PM »
I'm looking for a way to render thumbnails of a mesh from 4 set locations.
The 3d Meshes will have +Z facing up so would like to have 4 locations (1,0,0), (-1,0,0), (0,1,0), (0,-1,0) all with the cameras facing 0,0,0

Any idea on the matrix math to snap a camera to these locations and facing?
Also is there a way to set the resolution of the render or is it fixed to the sensor size of one of the camera?

Thanks.

2
Python and Java API / Limiting Poly count
« on: July 20, 2018, 07:01:48 PM »
I was wondering if there is a way though python to set a may poly count when constructing the mesh.
I want to set a high cap level so the poly count can go up to that but not over, also not forcing the mesh to be always that high which I think what happens if I use the custom setting.

I'm using this call currently:
Code: [Select]
chunk.buildModel(surface=PhotoScan.Arbitrary, interpolation=PhotoScan.EnabledInterpolation, face_count=PhotoScan.HighFaceCount)

3
Python and Java API / Render image constrained to bounding box
« on: April 25, 2018, 06:21:30 PM »
As part of a python batch script I'd like to render a image of the completed mesh with the camera facing down -X (Front) and -Z (Top) and zoomed in to the bounding box so the mesh is centered and fills the frame .

I'm using the "renderImage" command which works but am not sure how to figure out the camera transform to position the camera as described.

Does anyone know or can anyone point me at a example of how to  calculate the camera transform and sensor calibration?
My mesh is always centered at world 0 on X,Y. Z can vary with the object's height.

4
Python and Java API / Export texture with alpha
« on: March 15, 2018, 11:46:42 PM »
I'm looking to export a obj+ material and want to write the alpha to the texture.
in the UI there is a option to enable this but there doesn't seem to be a option in script using this the exportModel command.
I did find that ExportTexture has the the option though.

So would I need to export the model and texture in 2 separate calls to do this?

Thanks.

5
Python and Java API / Camera import naming inconsistant
« on: March 02, 2018, 08:41:16 PM »
I'm writing a script to import cameras from a folder and I found the naming in the file is not the same as if I import the cameras from the UI. Using this code
Code: [Select]
for photo in image_list:
if ("tif" or "tiff") in photo.lower():
photo_list.append(path_photos + "\\" + photo)
print ("photo_list - " + str(','.join(photo_list)))
chunk.addPhotos(photo_list)
I get camera labels of "Camera1, Camera2, Camera3,..." but if I import the same cameras using the UI I get "Camera1.tiff, Camera2.tiff, Camera3.tiff..."
This is causing a issue with alignment as I am importing the cameras to speed alignment but the label difference is causing it to fail.
Anyone know how to have the "addPhotos()" command keep the file extention?
I verified by printing out the list that the file extension are included in the list.

6
Python and Java API / Reset File
« on: March 01, 2018, 09:40:31 PM »
I'm trying to generate and save file by looking though a list and need to clear/reset the file at the end so I can load in a new image set and save as a new file. Basically the same process the "New" button in the top left does but can't seem to find this ability anywhere in python.

Anyone know if it's possible and what the command for this?

Thanks

7
General / Network Licences
« on: February 23, 2018, 09:48:33 PM »
I'm trying to test out networking on a few computer and am having some network issues. I found a old post saying
Quote
PhotoScan instance run in server mode only doesn't require the license  activation  - only processing nodes and client application run in GUI mode (to perform some changes to the project) require activation.
but I'm getting:
Quote
Network processing is disabled in the demo mode. Please activate your copy first.
when launching with the command "Photoscan --node --dispatch <ip>

So am I missing something?

I was able to launch in server mode fine.

Pages: [1]