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

Pages: [1] 2
1
General / Metashape Height Conversion
« on: October 12, 2020, 05:38:56 AM »
Metashape Version 1.6.5 build 11249 (64 bit)
Camera System Hasselblad A6D

AOI Flown at 6500ft ASL

Exif in image under heading GPS looks like this;
Lattitude 34; 26 ;44.0313...
Longitude 115; 57;19.709 ...
Altitude 2044

I am experiencing the following behaviour for photos imported into Metashape under Model > Add Photos;

Longitude 115.95 ...
Latitude -34.44 ...
Altitude (m) 56.92

I am confused as to how the altitude has been changed from 2044 to 56.92

Regards
Bn

2
Python and Java API / Reference Settings - Measurement Accuracy
« on: February 12, 2020, 02:24:06 AM »
Metashape 1.6.x

Hello,

Is there a way to set a default value in Reference Settings > Measurement Accuracy > Camera Accuracy (m) in python script.

It appears to have a default of 10 and I would like to set it to another value.

Regards
Ben

3
Python and Java API / Re: How to solve Export Raster file size exceeded
« on: February 11, 2020, 01:42:35 AM »
Thank You
Regards Ben

4
Python and Java API / How to solve Export Raster file size exceeded
« on: February 10, 2020, 06:09:47 AM »
Hello,

Version 1.6.x

I have a script that worked in 1.5 but is throwing an error in 1.6

The working 1.5 script looked like this;

Code: [Select]
v_blockw = 10000
v_blockh = 10000

...

chunk.exportOrthomosaic(output_path +'/ORTHO_TILE/'+ project_name + "_Ortho_EPSG" + v_to_epsg + "_ver_" + version + ".tif", image_format=Metashape.ImageFormatTIFF, projection=v_projection, blockw=v_blockw, blockh=v_blockh)

and the 1.6 script;

Code: [Select]
v_blockw = 10000
v_blockh = 10000

...

chunk.exportRaster(output_path +'/ORTHO_TILE/'+ project_name + "_Ortho_EPSG" + v_to_epsg + "_ver_" + version + ".tif", image_format=Metashape.ImageFormatTIFF, projection=v_projection, block_width=v_blockw, block_height=v_blockh, source_data=Metashape.OrthomosaicData)

Throws the following error
Code: [Select]
ExportRaster: image_format = TIFF, path = h:\SILREC_201912\mtn0618-ii/ORTHO_TILE/mtn0618-ii_Ortho_EPSG28350_ver_i.tif, projection = GDA94 / MGA zone 50
generating 40857 x 40495 raster in 1 x 1 tiles
libtiff error: Maximum TIFF file size exceeded
Traceback (most recent call last):
  File "U:\SCRIPTS\METASHAPE\metashape_A6D_Camera_Feedback_1.6-ver2.py", line 224, in <module>
    chunk.exportRaster(output_path +'/ORTHO_TILE/'+ project_name + "_Ortho_EPSG" + v_to_epsg + "_ver_" + version + ".tif", image_format=Metashape.ImageFormatTIFF, projection=v_projection, block_width=v_blockw, block_height=v_blockh, source_data=Metashape.OrthomosaicData)
RuntimeError: TIFFWriteTile: unexpected error: d:\folder_name/OrhtoName_Ortho_EPSG28350_ver_i.tif

The error indicates that the tiff image is too big 40857 x 40495, but I assume I have directed the script to output 10000 x 10000 tiles.

Can anyone see what the error could be?

Regards
Ben


5
Hi Alexey,

Problem solved.

Thank You
Ben

6
Hello

Metashape Version 1.6

I have a script that I ran in 1.5 but has stopped working.

The problem is related to projection.

Previously I had the following;

Code: [Select]
v_projection=Metashape.CoordinateSystem('EPSG::28350')
and when I wanted to export a component of my project I could do this;

Code: [Select]
chunk.exportRaster(output_path +'/DEM/'+ project_name + "_DEM_EPSG" + v_to_epsg + "_ver_" + version + ".tif",image_format=Metashape.ImageFormatTIFF, [b]projection=v_projection[/b], source_data=Metashape.ElevationData)
or

Code: [Select]
chunk.exportPoints(output_path + "/RGB_POINT_CLOUD/input.laz", [b]projection=v_projection[/b], source_data=Metashape.DenseCloudData, format=Metashape.PointsFormatLAZ)
But it no longer works.

I was advised to look at an example at
https://www.agisoft.com/forum/index.php?topic=11767.msg52733#msg52733

But I donot know how to apply the EPSG to the example;

Code: [Select]
projection = Metashape.OrthoProjection()
projection.type = Metashape.OrthoProjection.Type.Planar
#projection.matrix = proj #the matrix that is calculated based on markers
projection=Metashape.CoordinateSystem('EPSG::28350')

Previous Version
Code: [Select]
exportPoints(path[, source ], binary=True, precision=6, normals=True, colors=True,
raster_transform=RasterTransformNone, colors_rgb_8bit=True[, comment ][,
format ][, image_format ][, projection][, shift ][, region ][, blockw ][, blockh ][,
classes ][, progress ])

Current Version 1.6
Code: [Select]
exportPoints(path=’‘, source_data=DenseCloudData, binary=True, save_normals=True,
save_colors=True, save_classes=True, save_confidence=True,
raster_transform=RasterTransformNone, colors_rgb_8bit=True, comment=’‘,
save_comment=True, format=PointsFormatNone, image_
format=ImageFormatJPEG[, crs ][, shift ][, region ], block_width=1000,
block_height=1000, split_in_blocks=False[, classes ], save_images=False[, viewpoint
], subdivide_task=True[, progress ])
Regards
Ben

7
Python and Java API / Re: exportRaster Syntax for DEM
« on: February 05, 2020, 01:56:24 AM »
Alex
Thank You for your assistance.

class Metashape.DataSource
Data source in [PointCloudData, DenseCloudData, DepthMapsData, ModelData, TiledModelData, Elevation-
Data, OrthomosaicData, ImagesData]

Ben

8
Python and Java API / Re: exportRaster Syntax for DEM
« on: February 04, 2020, 06:20:37 AM »

REMOVED POST

9
Python and Java API / exportRaster Syntax for DEM
« on: February 04, 2020, 05:46:04 AM »
Hello,

I have upgraded my Metashape version to 1.6.

Scripts that I have been using require updating, I have been able to find some of the changes through the change log for 1.6 Python Scripting.

But I am having trouble with the following;

In 1.5 the following ran without error;

Code: [Select]
chunk.exportDem(output_path +'/DEM/'+ project_name + "_DEM_EPSG" + v_to_epsg + "_ver_" + version + ".tif",image_format=Metashape.ImageFormatTIFF, projection=v_projection)

But in 1.6 I have attempted to apply the change as follows;

Code: [Select]
chunk.exportRaster(output_path +'/DEM/'+ project_name + "_DEM_EPSG" + v_to_epsg + "_ver_" + version + ".tif",image_format=Metashape.ImageFormatTIFF, projection=v_projection, source_data=DEMdata)

But the error message returning is;

NameError: name 'DEMdata' is not defined.

The change log says the following on page 33;

source_data (DataSource) – Selects between DEM and orthomosaic.

I have attempted to use the word DEM and get same error.

Does anyone know what the syntax is?

Ben

10
General / Dense Cloud Quality
« on: February 28, 2019, 02:34:13 AM »
Hello,

When I use these settings;

PhotoScan.UltraQuality
PhotoScan.HighQuality
PhotoScan.MediumQuality
PhotoScan.LowQuality
PhotoScan.LowestQuality

My understanding is the source image is used at original size (UltraQuality), down to reduced sizes dependent on setting used.

Is this process for the Dense Cloud production only?

Does the original high res image get used to produce the DEM and Ortho, or is it the reduced quality image used?

Regards
Ben

11
Python and Java API / buildDenseCloud throws error in 1.4
« on: July 02, 2018, 08:58:07 AM »
Hello,

After upgrading to 1.4 from 1.3 the following line in a script does not work;

chunk.buildDenseCloud(quality=PhotoScan.HighQuality, filter=PhotoScan.NoFiltering)

I get the following error;
Traceback (most recent call last):
  File "U:\PhotoScan_Scripts\SANDBOX\photoscan_process_DJI_AND_A6D_p4p_for_orthophoto_1-4.py", line 154, in <module>
    chunk.buildDenseCloud(quality=PhotoScan.HighQuality, filter=PhotoScan.NoFiltering)
TypeError: 'filter' is an invalid keyword argument for this function

Regards
Ben

12
Python and Java API / Re: Export Point Classes
« on: February 15, 2018, 08:41:06 AM »
Figured it out and yes this will export point classes required.

13
Python and Java API / Export Point Classes
« on: February 15, 2018, 04:48:52 AM »
Hi,

To export only specific point classes is the below the correct method;

Code: [Select]
chunk.exportPoints(mypath, source=PhotoScan.DenseCloudData, format=PhotoScan.PointsFormatLAS, projection=v_projection, blockw=1000, blockh=1000, classes=[1,2])
Ben

14
Python and Java API / Re: 'PhotoScan' has no attribute 'pointCloudData'
« on: September 26, 2017, 03:01:21 AM »
Thank You for the clarification

15
Python and Java API / Clarification of ModelData and Elevation-Data
« on: September 22, 2017, 06:18:16 AM »
Version 1.3.3 build 4827 (64 bit)
Win 10

Hello,

When using buildOrthomosaic() surface

does modelData use the surface from buildModel()
and does Elevation-Data use the surface from buildDem()

I have also found that Elevation-Data throws an error and ElevationData does not

The manual states;

class PhotoScan.DataSource
Data source in [PointCloudData, DenseCloudData, DepthMapsData, ModelData, TiledModelData, Elevation-Data, OrthomosaicData]

Ben

Pages: [1] 2