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

Pages: [1]
1
General / Re: Automatic GCP identification
« on: November 26, 2012, 03:33:41 AM »
I tried to use small automated markers in a laboratory experiment (resolution about 1mm), but it failed as the number printed next to marker was identified as the center of the marker rather than the actual marker center. I tested it now in a large experimental setup (larger targets and the resolution is about 5 mm), and these were correctly identified.

Please make the size of the number proportional with the marker size or at least variable.

2
Python and Java API / Re: [pro] timeline through api
« on: August 20, 2012, 05:47:44 PM »
Hi Nico,

Is this a suggestion or a question? You are not really clear on that. Nevertheless, it is already part of the api. I use the following code (based on the documentation), I hope it is usefull for others.

# first load a document, 'photoScanFile' is set to a .psz file in my case
document = PhotoScan.Document()
document.open(photoScanFile)


# set frame for the first (0) chunk, i is desired frame (in my case this is part of a loop):
i = 2
document.chunks[0].frame = i


# The first frame is always frame 0
first_frame = 0
# the last name is the number of frames
last_frame = document.chunks[0].frame_count

The loop I use if for exporting all frames, it looks like this:

    for i in range(0,document.chunks[0].frame_count):
        # export file names
        outputDEM = '%s/DEM_%04i.tif' % (outputDir, i+1)
        outputOrtho = '%s/Ortho_%04i.tif' % (outputDir, i+1)
       
        # set current frame
        document.chunks[0].frame = i   
       
        # export dem and orthophoto
        document.chunks[0].exportDem(outputDEM, format='tif', region=exportRegion, dx=gridSize, dy=gridSize)
        document.chunks[0].exportOrthophoto(outputOrtho, format='tif', region=exportRegion, dx=gridSize, dy=gridSize)

Pages: [1]