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

Pages: [1]
1
Python and Java API / Re: Exporting Undistorted Cameras
« on: December 12, 2014, 09:34:42 PM »
The images can be viewed directly in the PhotoScan window.

I will reprocess the images into a new sparse cloud and sent the project file and source images. Thank you for your help.

2
Python and Java API / Re: Exporting Undistorted Cameras
« on: December 12, 2014, 10:21:55 AM »
1) It is not a path export problem. I'm aware that it right now it's exporting the photos to the original directory of the photos with a suffix tacked on in an awkward way. However, PhotoScan is either not undistorting the images, or is exporting the wrong (original) images.

2)

3
Python and Java API / Re: Exporting Undistorted Cameras
« on: December 09, 2014, 08:31:45 AM »
Hello, sorry for unclear thread. My problems are two:

1) My script does not export the undistorted photos. But PhotoScan is doing the undistort, because the model that you make with the improved cameras does not have severe distortion any more.

2) When undistorting through the GUI, PhotoScan is unable to read the images.

4
Python and Java API / Exporting Undistorted Cameras
« on: December 06, 2014, 03:14:55 AM »
[coderemoved]

Hello, all. I found this script in an old thread on the forums and have been trying to edit it to make it work. When I try using it, my Photoscan client lags for a few minutes, prints that it's done, and exports the UNDISTORTED photos.

When I try and export undistorted cameras through the GUI, the console reports that it is unable to open the photos:
Code: [Select]
Undistorting photos...
Can't open image: [image path removed]
...
Finished processing in 0.002 sec (exit code 1)

Does anyone have a solution? Thanks! Programmatic method preferred, but at this point all information is appreciated.

5
Thank you for your excellent support as always.

Aleksei.

6
Python and Java API / Setting Ground Control Coord Mode to WGS-84?
« on: July 23, 2014, 12:53:35 AM »
I would like to be able to automatically set my PhotoScan Document to WGS-84.

How I do this through the GUI:
Ground Control Pane -> Settings -> Coordinate Mode --> WGS-84 (Defaults to local coordinates).

What is the command to do this in Python?

Thanks.

7
Hello Alexey,

importpath1 has a path that leads to a directory  filled with geotagged photos.



This is the total output.

As an aside, can you tell me what is wrong with my processing steps?

Code: [Select]
chunk = PhotoScan.Chunk()
chunk.matchPhotos(accuracy=align_accuracy, preselection="ground control")
chunk.alignPhotos()
chunk.buildDenseCloud(quality=cloud_quality)
chunk.buildModel(surface="height field", source="dense", interpolation="enabled", faces="medium")
chunk.buildTexture(mapping=texture_mapping, blending=texture_blending, color_correction=False, size=texture_resx, count=1)

Log:
Code: [Select]
Stuff Imported!
System Variables Assigned!
User Variables Assigned!
Initialization Complete!
------------------------
FEEDBACK: Block 1 Begins
PROGRESS: Existing environment has been cleared!
PROGRESS: New environment has been created!
FILE LOADED: C:\Program Files\Agisoft\Projects\Python Testing\photos\IMG_4060_geotag.JPG
PROGRESS: Asset photo imported!
FILE LOADED: C:\Program Files\Agisoft\Projects\Python Testing\photos\IMG_4061_geotag.JPG
PROGRESS: Asset photo imported!
FILE LOADED: C:\Program Files\Agisoft\Projects\Python Testing\photos\IMG_4062_geotag.JPG
PROGRESS: Asset photo imported!
FILE LOADED: C:\Program Files\Agisoft\Projects\Python Testing\photos\IMG_4063_geotag.JPG
PROGRESS: Asset photo imported!
FILE LOADED: C:\Program Files\Agisoft\Projects\Python Testing\photos\IMG_4064_geotag.JPG
PROGRESS: Asset photo imported!
FILE LOADED: C:\Program Files\Agisoft\Projects\Python Testing\photos\IMG_4065_geotag.JPG
PROGRESS: Asset photo imported!
FILE LOADED: C:\Program Files\Agisoft\Projects\Python Testing\photos\IMG_4066_geotag.JPG
PROGRESS: Asset photo imported!
FILE LOADED: C:\Program Files\Agisoft\Projects\Python Testing\photos\IMG_4067_geotag.JPG
PROGRESS: Asset photo imported!
FILE LOADED: C:\Program Files\Agisoft\Projects\Python Testing\photos\IMG_4068_geotag.JPG
PROGRESS: Asset photo imported!
FILE LOADED: C:\Program Files\Agisoft\Projects\Python Testing\photos\IMG_4069_geotag.JPG
PROGRESS: Asset photo imported!
FILE LOADED: C:\Program Files\Agisoft\Projects\Python Testing\photos\IMG_4070_geotag.JPG
PROGRESS: Asset photo imported!
FILE LOADED: C:\Program Files\Agisoft\Projects\Python Testing\photos\IMG_4071_geotag.JPG
PROGRESS: Asset photo imported!
FEEDBACK: Number of photos imported -  12
Detecting points...
photo 1: 39967 points
photo 2: 39972 points
photo 3: 39947 points
photo 4: 39995 points
photo 5: 39946 points
photo 6: 39958 points
photo 7: 39955 points
photo 8: 39962 points
photo 9: 39956 points
photo 10: 39996 points
photo 11: 39979 points
photo 12: 39987 points
points detected in 25.441 sec
Selecting pairs...
103593 matches found in 2.45 sec
66 of 66 pairs selected in 0.043 sec
Matching points...
1362253 matches found in 57.978 sec
setting point indices... 70202 done in 0.02 sec
removed 10803 multiple projections
removed 18 points
generated 70184 tie points, 4.47289 average projections
finished matching in 86.011 sec
Finished processing in 86.026 sec (exit code 1)
Optimizing point cloud...
weights: 0.4 cameras, 800 markers, 4000 scalebars, 40 projections
not enough data for optimization
finished SBA in 0 seconds
Finished processing in 0.001 sec (exit code 1)
initializing...
selected 0 cameras from 0 in 0.001 sec
Loading photos...
Reconstructing depth...
finished depth reconstruction in 0 seconds
Device 1 performance: 0 million samples/sec (CPU)
Generating dense point cloud...
selected 0 cameras in 0.006 sec
Finished processing in 0.023 sec (exit code 0)
Generating mesh...
Finished processing in 0.001 sec (exit code 0)
Finished processing in 0 sec (exit code 0)
PROGRESS: Photo processing complete!
Saving project...
saved project in 0.327 sec
Finished processing in 0.327 sec (exit code 1)
PROGRESS: Save complete! Saved to C:\Program Files\Agisoft\Projects\Python Testing\test.psz
Export complete
>>>

The variables are set to standard presets, and PhotoScan "processes" the photos, but I can't see any processing in the document afterwards.

I know that there is enough data because when processing via the GUI I can create a model.

Thanks.


8
Python and Java API / build mesh method
« on: July 08, 2014, 06:31:48 AM »
I don't see a function in the API to build a mesh. It looks like buildDepth() used to be the same but has since been removed? Anyone know the solution?

Thanks.

9
Python and Java API / open directory of photos from predefined path
« on: July 07, 2014, 10:48:15 PM »
Code: [Select]
importpath1 = glob.glob(importpath1)
listlen1 = len(importpath1)
x = 0
while (x < listlen1):
cam = PhotoScan.Camera()
cam.open(importpath1[x])
pic = doc.chunks.add()
doc.activeChunk.cameras.add(cam)
print("FILE LOADED: " + importpath1[x])
x = x + 1
print("PROGRESS: Asset photos imported!")
Error: Executes print command for every photo, but does not load the name of the .jpg (just loads blank).

Thanks for the help.

Pages: [1]