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

Pages: [1]
1
General / Combining images from different elevation
« on: October 18, 2018, 12:48:01 PM »
Hi,

If I use the same drone but fly att different elevation over the same area giving me images with different ground resolution. What resolution will I end up having on the finished Orthomosaic?

If I do the same thing but the different elevation flights are next to each other but I still want to render them together. For example, first part of the area has the ground resolution of 2cm and the second part of the area has a ground resolution of 5 cm. What end resolution will my orthomosaic end up having?

Hope someone can shed som light to this.

2
Python and Java API / Batch Process
« on: September 26, 2018, 11:29:37 AM »
I am trying to create a batch process using python that automatically does the following things after that the project has been align, the correct coordinate system is set, sparse cloud optimized and any gound control oints has been pointed out. The project is also saved.

Build Dense Cloud
Build Mesh
Build DEM
Build Orthomosaic
Export DEM
Export Orthomosaic
Classify Ground Points
Build DEM (From only ground points)
Generate Report
Save Project
Decimate Mesh
Build Texture
Export model

As the project is already saved in a specified location this part is not correct:
project_path = "D:\\Processed\\"
project_name = "20171118LFF1a7RATX82_section"

The project_path should be read from the actual project path and the project_name from the already saved project name.

The have a if statement that is connected to the projects coordinate system. We want the filenames to have the coordinatesystem in text in the later exported files
Something like:

if PhotoScan.CoordinateSystem("EPSG::4326")
coordinatesystemtext = WSG 84
else if PhotoScan.CoordinateSystem("EPSG::4322")
coordinatesystemtext = WGS 72



Code: [Select]
import PhotoScan

doc = PhotoScan.app.document

#Set variables (Should be from already saved file)
[i]project_path = "D:\\Processed\\"
project_name = "20171118LFF1a7RATX82_section"[/i]

#build dense cloud
chunk.buildDenseCloud(quality = PhotoScan.High, filter = PhotoScan.AggressiveFiltering)

#build mesh
chunk.buildModel(surface = PhotoScan.HeightField, interpolation = PhotoScan.EnabledInterpolation, face_count=PhotoScan.MediumFaceCount )

#Build DEM
chunk.buildDem(source=PhotoScan.DenseCloudData, interpolation=PhotoScan.EnabledInterpolation)

#Build Ortho
chunk.buildOrthomosaic(surface=PhotoScan.ElevationData, blending=PhotoScan.MosaicBlending, color_correction=False)

chunk.exportDem(project_path + "DEM " + project_name + coordinatesystemtext + ".tif", image_format=PhotoScan.ImageFormatTIFF, format = PhotoScan.RasterFormatTiles, nodata=-32767, write_kml=False, write_world=True)

chunk.exportOrthomosaic(project_path + "Orthomosaic " + project_name + coordinatesystemtext + ".tif", image_format=PhotoScan.ImageFormatTIFF, format = PhotoScan.RasterFormatTiles, raster_transform=PhotoScan.RasterTransformNone, write_kml=False, write_world=True)

# MISSING Classify Ground Points

# MISSING Build DEM (From only ground points)

chunk.exportDem(project_path + "DTM " + project_name + coordinatesystemtext + ".tif", image_format=PhotoScan.ImageFormatTIFF, format = PhotoScan.RasterFormatTiles, nodata=-32767, write_kml=False, write_world=True)

# Missing Generate Report

#Save Project
doc.save()

# MISSING Decimate Mesh

# MISSING Build Texture

# MISSING Export model

print("Finished")

3
Python and Java API / Re: Python send email
« on: October 26, 2017, 09:56:33 AM »
Could you elaborate?

If I would like to add it to this row, red text

msg['Subject'] = "Dator: " + socket.gethostname() + " - Photoscan Align Finished" + doc.host?????

4
Python and Java API / Python send email
« on: October 20, 2017, 03:00:50 PM »
We have this python below as the last step in our batch processes to let us know when it is finisged. I am now trying to implement more information from PhotoScan in that email. I would like that the email could include the name of the actual project. I cant really figure out how to implement this.


import smtplib
import PhotoScan

from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText


import socket
namn = socket.gethostname()

 
fromaddr = "*****@***.com"
toaddr = "****@***.***"
doc = PhotoScan.app.document
msg = MIMEMultipart()
msg['From'] = fromaddr
msg['To'] = toaddr
msg['Subject'] = "Dator: " + socket.gethostname() + " - Photoscan Align Finished"
 
body = "Hej, " + socket.gethostname() + "is now finished with Align."
msg.attach(MIMEText(body, 'plain'))
 
server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login(fromaddr, "**********")
text = msg.as_string()
server.sendmail(fromaddr, toaddr, text)
server.quit()

Pages: [1]