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

Pages: [1]
1
Please, can you share python module to check too?

Thank you again

If anyone still have issues with vertical datum out of range error, please check updated 2.2.1 build 20221 pre-release.

https://download.agisoft.com/metashape-pro_2_2_1_x64.msi
https://download.agisoft.com/metashape-pro_2_2_1.dmg
https://download.agisoft.com/metashape-pro_2_2_1_amd64.tar.gz

In case the problem persists, please share the project to support@agisoft.com so that we can reproduce the issue.

2
General / Re: Batch Export Point Cloud Vertical Datum out of range error
« on: February 15, 2025, 03:37:01 PM »
Hello Alexey,

We have the same problem using a compound CRS and API since version 2.2.0.
We have added the geoids to our Metashape.Document, but we don't know if we are handling the new Metashape.Geoid object well with this type of CRS.
Thanks in advance

3
Python and Java API / Re: Export shapes to gpkg file
« on: March 20, 2024, 02:48:49 PM »
Hello Alexey,

Sorry for the delay in my reply and thank you for yours.

With a polygon created with the drawing tool in the metashape GUI, no error appears and I can export to .gpkg.

We have upgraded to version 2.0.2 and now it works without problem, even with the same geometry imported before (not the one drawn in the GUI).

Thanks again

4
Python and Java API / Export shapes to gpkg file
« on: February 10, 2024, 07:03:18 PM »
Dear Metashape developers,

We need to export a geometry in a GeoPackage file, but executing code:
Code: [Select]
layer = chunk.shapes.groups[0]
chunk.exportShapes(
     path=os.path.join(output_path, 'roi.gpkg'),
     save_polygons=True,
     groups=[layer.key],
     format=Metashape.ShapesFormatGeoPackage,
     crs=chunk.crs
)

We get error: OSError: SQL logic error (1)

But we do not get any error using the SHP format:

Code: [Select]
layer = chunk.shapes.groups[0]
chunk.exportShapes(
    path=os.path.join(output_path, 'roi.shp'),
    save_polygons=True,
    groups=[layer.key],
    format=Metashape.ShapesFormatSHP,
    crs=chunk.crs
)

Please, what is the solution to get our geometry exported in GPKG format?

Thank you for your time

5
Hi,

We have successfully used the definition of a composed CRS (a horizontal projected CRS and a vertical CRS which respects a specific model of geoid) according to the proj library, in the Metashape API (I mean EPSG::CodeForHorizontalCrs+CodeForVerticalCrs).

We have tried to define this composed CRS in the GUI without success, as the results are different. To do so, we edited the projected CRS from the list of CRSs available in the interface, and selected:
Geographic CS: The one that uses the same datum but not projected.
Vertical CS: The CRS that defines the model of geoid that we want to use (previous download of the file in the metashape geoids folder).
Projection: the same projection used by the original projected CRS.
Units: those used by the original projected CRS .

Based on this experience, we would like to know if there is a way to select a composed CRS in the GUI according to the proj definition, avoiding the need to use the API, and why our definition in the interface does not return an equivalent result.

Thank you for any idea that can help us!

6
Python and Java API / Re: Own preselection pairs in matching
« on: September 28, 2017, 08:50:46 PM »
Hi again,

Thank you Yoann, but I need to avoid this image pairs before building the sparse point cloud.

I have been testing the matchPhotos() function and the results are the same when I use the parameter pairs() and when I don't use it. I explain:
To get the image pairs tuple list I do the matching process in a common project and I save the list of image pairs created. Then I edit the list removing the image pairs which I don't want to create. Finally I restart the entire project using my edited list in the matching process and I get image pairs which I don't want to create AGAIN. Why does it happen?

The edited list which I use in the pairs() parameter is like this:
[(<Camera 'IMG_170606_100743_0218_REG.TIF'>, <Camera 'IMG_170606_100748_0221_NIR.TIF'>),
(<Camera 'IMG_170606_100743_0218_REG.TIF'>, <Camera 'IMG_170606_100745_0219_REG.TIF'>),
(<Camera 'IMG_170606_100743_0218_REG.TIF'>, <Camera 'IMG_170606_100746_0220_REG.TIF'>),
(<Camera 'IMG_170606_100743_0218_REG.TIF'>, <Camera 'IMG_170606_100745_0219_GRE.TIF'>),...]

And the used code:
Code: [Select]
chu.matchPhotos(accuracy=PhotoScan.HighestAccuracy, preselection=PhotoScan.Preselection.NoPreselection, generic_preselection=False, reference_preselection=False, keypoint_limit=40000, tiepoint_limit=4000, pairs=matchesCam1List)I have tried with True for generic and reference preselection too, and not writing the parameter "preselection" because I supposed it is obselete truly (The API document say:
• preselection (PhotoScan.Preselection) – Image pair preselection method (obsolete)), but it dosen't work for anything.

Am I doing it correctly?

Any idea?

Thank's anyway  ;)

7
Python and Java API / Re: exportMatches using Python Script API?
« on: August 23, 2017, 01:41:00 PM »
Thank you so much Alexey

8
Hi,

Quite interesting the implementation of this feature.

We wait impatient  ;)

9
Python and Java API / Own preselection pairs in matching
« on: August 16, 2017, 05:53:35 PM »
Hi,

Is it possible to fix the image pairs where PhotoScan will look for matches in the matching process? I mean, Can I give a list of image pairs where I want to find matches?

I have photos taken from an aircraft but their positions are very near between some of them, so i don't want to get matches between this images.

Can I do that?

How it works the parameter "pairs" for the matching process? How is the sintaxis of the list (pairs of images)? Or is it just to fix a list of images, not a image pairs?

Thank you for your time. Any idea will be welcome

10
Python and Java API / Re: exportMatches using Python Script API?
« on: August 16, 2017, 05:32:16 PM »
Yes it is

"chunk.exportMatches(matchesPath,format=MatchesFormatORIMA,precision=4,export_points=True,export_markers=False,use_labels=True)" ends with: NameError: name 'MatchesFormatORIMA' is not defined

"chunk.exportMatches(matchesPath,format=PhotoScan.MatchesFormatORIMA,precision=4,export_points=True,export_markers=False,use_labels=True)" ends with: Agisoft Crash Reporter
This is the beginning:
ARB_texture_non_power_of_two: Yes
ARB_vertex_buffer_object: Yes
OpenGLMaxTextureSize: 16384
OpenGLRenderer: GeForce GTX 960M/PCIe/SSE2
OpenGLStereo: No
OpenGLVendor: NVIDIA Corporation
OpenGLVersion: 4.5.0 NVIDIA 369.09
ProductName: PhotoScan Pro
System: Windows 64bit
SystemMemory: 15.9 GB
Throttleable: 1
URL:
Vendor: Agisoft
Version: 1.3.2.4205

With ...
Everything what i have test doesn't work for me

Thank you Alexey

11
Python and Java API / Re: exportMatches using Python Script API?
« on: August 16, 2017, 02:15:19 PM »
Hi,

Please, can you show me the script to export matches in an especific format (ORIMA)?

I don't know how to use parameter "format".
"chunk.exportMatches(matchesPath)" works for me, but i want to do something like: "chunk.exportMatches(matchesPath,format=PhotoScan.MatchesFormatORIMA,precision=4,export_points=True,export_markers=False,use_labels=True)", and it doesn't work...

Thank you for your time

12
Maybe is later for you, but I get it and for me it works:

app = PhotoScan.Application()
doc = PhotoScan.app.document
chu=doc.chunk
chu.estimateImageQuality()
for image in chu.cameras:
    if float(image.photo.meta['Image/Quality'])<0.5:
        image.enabled = False
        print ('DISABLE %s' %(image))

Pages: [1]