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 - SamC-E

Pages: [1]
1
Hi,

Does anyone know what how to do the input for creating a scalebar?

I have been attempting this and having looked on the forums and in the literature I haven't be able to find a suitable example to help, I know the command 'chunk.addScalebar(scalebar=?)', I have successfully detected the markers through the script but it gets stuck at creating the scalebar as I don't know the form to call the markers with.

Here's my piece of script for this:
Code: [Select]
#Marker Detection
#Detect Markers
print("---Detecting Markers---")
chunk.detectMarkers(PhotoScan.TargetType.CircularTarget12bit, 50)

ab = chunk.addScalebar(scalebar= chunk.Markers[1], chunk.Markers[9])
ab.reference.distance = 0.4243

bc = chunk.addScalebar(scalebar= chunk.Markers[9], chunk.markers[4])
bc.reference.distance = 0.4243

cd = chunk.addScalebar(scalebar= chunk.Markers[4], chunk.markers[8])
cd.reference.distance = 0.4243

da = chunk.addScalebar(scalebar= chunk.Markers[8], chunk.markers[1])
da.reference.distance = 0.4243

ac = chunk.addScalebar(scalebar= chunk.Markers[1], chunk.markers[4])
ac.reference.distance = 0.60

bd = chunk.addScalebar(scalebar= chunk.Markers[9], chunk.markers[8])
bd.reference.distance = 0.60

chunk.markers[1].reference.location = PhotoScan.Vector((0,0,0.3))
chunk.markers[9].reference.location = PhotoScan.Vector((0.3,0,0))
chunk.markers[4].reference.location = PhotoScan.Vector((0,0,-0.3))
chunk.markers[8].reference.location = PhotoScan.Vector((-0.3,0,0))

I would also like to check that for 4 markers in a diamond shape around the origin/centre(0,0,0) that the reference locations are correct as I have not been able to test this part due to the script not reaching it yet.

Any help would be fantastic!
Sam

2
Python and Java API / Python Script for Basic Full Process Chain
« on: April 14, 2015, 05:56:42 AM »
Hello,

Firstly I have only been using python for a couple of weeks now so I am not anywhere near what you would call fully python literate but I will probably be able to understand any responses I get and I am running Agisoft on a Ubuntu system.

Basically I have been trying to create a python script and have found only one response (http://www.agisoft.com/forum/index.php?topic=1881.msg10014#msg10014) about a script that can progress through the Agisoft processing but this response was too complex for my needs and my attempts to adapt it so far have failed.
I currently do the process manually but I need to automate it to the greatest extent I can, below I define the basic manual process I carry out for clarity:

- Add Folder
- Align Photos [Accuracy(preferably able to choose different settings), Pair preselection(Disabled), Advanced (Default)]
- Build Dense Cloud [Quality & Depth Filtering(preferably able to choose different settings)]
- Build Mesh [Surface Type(Arbitrary), Source Data(Dense Cloud), Face Count(preferably able to choose different settings),  Advanced(Default)]
- Build Texture [All default settings]
- Save Project as desired
- Export Model as Wavefront OBJ

I'm sure/hope someone out there has a link to a post I have missed, a script or the skeleton of a script that has this functionality, or the ability to quite quickly guide me onto the right path.
Any help anyone could offer would be greatly appreciated as the literature and forums have left me a bit stumped.

Regards
Sam

Pages: [1]