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

Pages: [1]
General / Any way to disable exporting .prj file?
« on: April 04, 2024, 11:53:52 AM »
Latest version (2.1.1) Updated orthomosaic and DEM exporter to save .prj file when Write World file option is enabled.

Is there any way i can disable this and have the old behaviour to get only the Orthophoto and the World file without getting the .prj file?

I updated Metashape from 2.1.0 to v.2.1.1 and processed a small project.

When i try to export the Orthomosaic in .tiff format with .jpg compression and Save Alpha Channel selected it fails.

Is this a bug? Did something changed in the latest version?
With all previous versions exporting geotiff + jpg compression + Save Alpha Channel worked fine.

The error i get in the console is:
2024-04-04 11:06:26 Saving project...
2024-04-04 11:06:26 saved project in 0.021 sec
2024-04-04 11:06:26 Finished processing in 0.021 sec (exit code 1)
2024-04-04 11:07:12 ExportOrthomosaic: path = E:/01. Active Projects/01. ANAX Projects/03. TOPOGRAFIKA/Tzoumelekas - (Drosia)/- Deliverables/Orthophoto - tif/Tzoumeleka.tif, image_format = TIFF, projection = GGRS87 / Greek Grid, resolution_x = 0.02, resolution_y = 0.02, save_world = on, white_background = off
2024-04-04 11:07:12 Exporting orthomosaic...
2024-04-04 11:07:12 generating 14794 x 18116 raster in 1 x 1 tiles
2024-04-04 11:07:12 libtiff error: Bogus input colorspace
2024-04-04 11:07:12 Finished processing in 0.399 sec (exit code 0)
2024-04-04 11:07:12 Error: TIFFWriteTile: unexpected error: E:/01. Active Projects/01. ANAX Projects/03. TOPOGRAFIKA/Tzoumelekas - (Drosia)/- Deliverables/Orthophoto - tif/Tzoumeleka.tif

Since i upgraded to v.2.1.0 when i try to Align the images taken from Wingtra One GenII drone (fixed wing) i get the following message.

"Found oblique cameras without specified capture distance. Continue?"

All photos are Nadir but because Wingtra One is a fixed wing drone i understand that during turns there can be some pictures that have a rotation in Omega and Phi that are more than 200 and that makes Metashape to report that there are oblique images. Is this the case?
If i ignore the message and process them i do not see any problems or is there something i do not see?

Is it ok to process the images by ignoring this message?

Hello all.

I processed some data in different chunks and merged them together. The merged chunk has all the initial photos x3 times. So from initial 2057 photos the merged chunk has 6171 photos.

I try to use the "Remove duplicated photos" script found on Agisoft - Github but i get an error:

Error: type object 'datetime.datetime' has no attribute 'datetime'

how can i fix that?

Code: [Select]
import datetime
import Metashape

Script for removing duplicated photos, Metashape (v 1.8)
Matjaz Mori, CPA, May 2022
The script will remove all duplicated photos (photos referenced to the same file) from Metashape project.

compatible_major_version = "2.1"
found_major_version = ".".join('.')[:2])
if found_major_version != compatible_major_version:
    raise Exception("Incompatible Metashape version: {} != {}".format(found_major_version, compatible_major_version))

def remove_duplicated_photos():
    print (

    doc =
    chunk = doc.chunk
    lenght = len(chunk.cameras)

    message = 'Removing duplicates...'
    print (message)

    paths = set()
    photos = list()
    for camera in list(chunk.cameras):
        if not camera.type == Metashape.Camera.Type.Regular: #skip camera track, if any

        if in paths:

    lenght_after = len(chunk.cameras)
    nr_removed = lenght-lenght_after
    message_end = 'Success, ' + str(nr_removed) + ' cameras removed.'
    print (message_end)

label = "Scripts/Remove duplicated photos", remove_duplicated_photos)
print("To execute this script press {}".format(label))

Python and Java API / Delete Points Outside of Bounding Box
« on: October 25, 2023, 10:12:02 AM »
I was using Metashape v1.8.2 and now i upgraded to v.2.0.3

I had a script to delete all points (tie points) that are Outside of the bounding box.
In the new version this script runs without giving me any error but it actually does nothing at all and it does not delete any points.

I do not know about scripting and i would like someone to help me convert this script to run properly in v.2.0.3

Code: [Select]
import Metashape
def main():
doc =
for i in range(len(doc.chunks)):
chunk = doc.chunks[i]
R = chunk.region.rot #Bounding box rotation matrix
C = #Bounding box center vertor
size = chunk.region.size

if not (chunk.point_cloud and chunk.enabled):
elif not len(chunk.point_cloud.points):
for point in chunk.point_cloud.points:

if point.valid:
v = point.coord
v.size = 3
v_c = v - C
v_r = R.t() * v_c

if abs(v_r.x) > abs(size.x / 2.):
point.valid = False
elif abs(v_r.y) > abs(size.y / 2.):
point.valid = False
elif abs(v_r.z) > abs(size.z / 2.):
point.valid = False

print("Script finished. Points outside the region were removed.")"Scripts/Delete Points Outside Bounding Box", main)

General / Oblique Camera 12mm on Wingtra Gen II
« on: February 08, 2022, 12:58:48 PM »
I have Wingtra Gen II drone equipped with an Oblique Sony a6100(wide lens).

The pictures does not contain any info about Focal Length and F-Stop in exif. (all numbers are 0 when imported in Agisoft)

The camera specs state that it has 12mm lense, APS-C sensor. The focal Length is 12mm (18mm equivalent for 35mm). F-Stop is set at 4.5 in the lenses ring (no software option in camera menus).

So the questions are:
1) In Camera Calibration settings what should i choose? Is it Frame or Fish Eye?
2) Can i add this numbers (specs) in Agisoft myself and how? If yes should i add the 12mm or the 18mm equivalent to 35mm?

Python and Java API / Photoscan Module is deprecated WARNING
« on: December 01, 2021, 05:46:19 PM »
When i open the program i get the following Warning (in RED) in the console.

2021-12-01 16:36:25 Agisoft Photogrammetric Kit for TOPCON Version: 1.7.5 build 13229 (64 bit)
2021-12-01 16:36:25 Platform: Windows
2021-12-01 16:36:25 CPU: AMD Ryzen 7 2700X Eight-Core Processor (desktop)
2021-12-01 16:36:25 CPU family: 23 model: 8 signature: 800F82h
2021-12-01 16:36:25 RAM: 63.9 GB
2021-12-01 16:36:25 OpenGL Vendor: NVIDIA Corporation
2021-12-01 16:36:25 OpenGL Renderer: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2
2021-12-01 16:36:25 OpenGL Version: 4.6.0 NVIDIA 496.76
2021-12-01 16:36:25 Maximum Texture Size: 32768
2021-12-01 16:36:25 Quad Buffered Stereo: not enabled
2021-12-01 16:36:25 ARB_vertex_buffer_object: supported
2021-12-01 16:36:25 ARB_texture_non_power_of_two: supported
2021-12-01 16:36:25 To execute this script press Custom menu/Add reference altitude
2021-12-01 16:36:25 To execute this script press Custom menu/Align model or dense point cloud
2021-12-01 16:36:25 To execute this script press Custom menu/Color Model with Altitude
2021-12-01 16:36:25 To execute this script press Custom menu/Color Model with Overlap
2021-12-01 16:36:25 To execute this script press AI tools/Detect objects
2021-12-01 16:36:25 To execute this script press Custom menu/Masking by color
2021-12-01 16:36:25 To execute this script press Custom menu/Read RelativeAltitude from DJI metadata
2021-12-01 16:36:25 Warning: PhotoScan module is deprecated, use Metashape module instead
2021-12-01 16:36:33 imported  auto_gamma_correction
2021-12-01 16:36:33 imported  buffer_by_markers
2021-12-01 16:36:33 imported  chunk_region_setter
2021-12-01 16:36:33 imported  crs_uploader
2021-12-01 16:36:33 imported  expimp_by_marker
2021-12-01 16:36:33 imported  export_by_shapes
2021-12-01 16:36:33 imported  fast_layout
2021-12-01 16:36:33 imported  gnss_post_processing
2021-12-01 16:36:33 imported  image_channel_mixer
2021-12-01 16:36:33 imported  gnss_processing
2021-12-01 16:36:33 imported  make_masks_from_shapes
2021-12-01 16:36:33 imported  mesh_creator
2021-12-01 16:36:33 imported  shape_worker
2021-12-01 16:36:33 imported  plugins_configurator
2021-12-01 16:36:33 imported  quality_estimator
2021-12-01 16:36:33 imported  remove_image_duplicates
2021-12-01 16:36:33 imported  set_altitudes_for_shape
2021-12-01 16:36:33 imported  shape_worker
2021-12-01 16:36:33 imported  tab_meta_creator
2021-12-01 16:36:33 To execute this script press Custom menu/Split in chunks

If i remember correctly (it's months now) it started after installing a collection of scripts from Geoscan (
Most scripts from Geoscan (but not all) work fine but a few do not work. All my other scripts from the community work fine.

Why is that and how can i fix it?

General / Backup settings before format?
« on: November 30, 2021, 04:40:28 PM »
I would like to Format my PC.

I have made some changes in Preferences (enable some options, keyboard shortcuts etc, etc) and added some Tweaks in Agisoft. Is there a file that Agisoft saves all these information that i can copy to make a backup so when i format my pc and reinstall Metashape to just transfer this file and all my settings are OK in my new installation?

General / Project file size - Orthophoto
« on: September 29, 2021, 12:19:08 PM »
I would like to ask about the file size of an Agisoft project.

I have noticed that when creating an Orthophoto in a project, the file size of the project gets way too big.
I calculated that the orthophoto itself it takes about 3.2 times bigger in size than the file size of the photos used.

For example:
1) I used 3.220 photos in a project. Their total file size is about 56.3 GB.
2) After i create an Orthomosaic the project's file size skyrockets. The total filesize of the project is 196GB out of which the Orthomosaic is 177GB. (the rest 19GB are the point clouds, Dems etc)

The orthomosaic folder alone is 3.14 times bigger than the photos used. So for this project i need about 196+56 = 252 GB + exports = 270 GB of drive space

The same logic carries on all the projects i make. Currently i have about 50TB of drive space on my PC for all my projects + another 50TB external for backups.
Now i run a project with 7.700 photos that are about 140GB and i expect to have an Orthomosaic folder about 450GB. If i consider point clouds, dems etc i will need about 700GB Drive space to save this project.

Why is that happening?
How Agisoft is tilling the photos to create the orthomosaic?
Can i do something to optimize drive space or it's just how it works?

General / Delete original chunks after Merge?
« on: August 20, 2021, 11:22:46 AM »
I have made some flights with a drone in 2 different days and i processed them in 2 chunks (about 4000 pics in each chunk).

Both chunks are georeferenced with cm accuracy  and i want to merge them together.

The question is:

After i do the Merge can i delete the 2 original chunks (to save space on HDD) and leave only the Merged one in the project?

Feature Requests / Possibility to create TIN model
« on: October 13, 2020, 02:25:11 PM »
It would be nice to have the option to create a TIN model and export it as .dxf for use in other programs.

Hello all,

I'm trying to draw some Polylines to use them as Break lines in Dense Point cloud view AND/OR Mesh Model view.

The problem is that i cannot manipulate the camera as in normal view. The only operation i can do in the camera while drawing a polyline is to Zoom In/Out (with the scroll wheel) and pan the camera Left&Right (Right Click). Any other button just stops the drawing operation.

This is a big problem because i cannot Rotate the camera and thus i cannot have a clear view on the points i want to draw.

Please fix that behavior and allow camera manipulation while Drawing tool is active.

General / Create contour by Shape or by Selection?
« on: June 22, 2020, 02:21:57 PM »
Hello all.

i can create Contour Lines in a project just fine BUT I would like to create Contour Lines only in a small area from a project and i cannot seem to find a way to do that.

I tried to create a Polygon area and set the boundary type and then create the Contour Lines but the lines generated are from all the area covered by the project and not in the selected area.

Is there an easy solution to that (kind of generate by selection or something)? AND/OR is there any script available that can do just that? I'm not good at scripting so if there is a ready script available it would be much appreciated.

Thank you in advance for your help.

Feature Requests / Quick menu for Filter by Class
« on: March 05, 2020, 03:44:27 PM »
Can we please have a button (maybe drop down) in toolbar for quick Selection by Class when we have classified point clouds?

Now it is a big hustle to navigate the menus to turn individual point classes ON/OFF.

I made a suggestion in the pic below.

Pages: [1]