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 - Yoann Courtois

Pages: 1 2 [3] 4 5 ... 22
31
Python and Java API / Re: Duplicate element keys not allowed
« on: April 28, 2020, 07:58:04 PM »
Please don't blame me but the error happened with 1.5.0 :S !

32
Python and Java API / Re: Duplicate element keys not allowed
« on: April 28, 2020, 06:44:59 PM »
No, we still are on 1.5 version.

Wa are planning to switch to 1.6 but there have been lots of API change so. I was wondering if it can fix this problem, but it occure maybe twice a year so ...

We will soon make the most to go on 1.6.

Regards

33
Python and Java API / Re: Duplicate element keys not allowed
« on: April 28, 2020, 04:56:18 PM »
Hey Alexey,

Has something been done regarding this issue ?

Regards

34
Python and Java API / Re: Marker pixel error
« on: April 17, 2020, 05:19:29 PM »
"camera.project" always work.
But when the marker.position is actually behind the camera, it's not possible to get a reprojection of the marker in the camera system.
So when it happens, camera.project return None, which is actually a true result.

But same image is visible in GUI marker panel when looking at marker info. Error on this image is of course huge (actually bigger than the image size), but it still exist.
I may like to reproduce this error with my script

35
Python and Java API / Marker pixel error
« on: April 17, 2020, 04:48:39 PM »
Hey !

I'm trying to work around marker pixel error. I've seen many posts which detailled how to calculate it :
Code: [Select]
            proj = marker.projections[camera].coord
            reproj = camera.project(marker.position)
            error = (proj - reproj).norm()

However, when some mis-detection appear, it's some time not possible to project marker.position on image and reproj return None.

I'm questionning myself how GUI is able to get a pixel error on those images ("show detail" on the marker)

Hope it's clear.
Regards

36
Python and Java API / Re: Script from archive doesn't save project
« on: March 20, 2020, 07:03:54 PM »
Hello Alexey,

Our scripts currently run on Metashape 1.5.0
We are planning to update towards 1.6 soon but during last year not many updates were looking indipensable for us.

doc.save() seems to save the project, but actually not. Or it is saving but without any update (then are done ground classification, dem and ortho building, etc.)

I guess the crazyest thing in this story, is that I actually succeed to fix the problem, with the following code ...

Code: [Select]
           __project_path = "directory/project.psx"
           __archive_path = "directory/archive.psz"

            doc = Metashape.app.document
            doc.open(path=__archive_path, ignore_lock=True)
            doc.save(path=__project_path)
            doc.clear()

            doc = Metashape.app.document
            doc.open(path=__project_path, ignore_lock=True)
            chunk = doc.chunk
            doc.save()

It's strange, and this code looks horrible, but it works... An idea about where is the difference ?

Regards


37
Python and Java API / Script from archive doesn't save project
« on: March 19, 2020, 07:11:17 PM »
Hey !

Something really crazy appeared in my script.
Indeed, sometimes I have to start from old project which has been stored as an archive (*.psz)
So I open the archive file and then save it into a project file (*.psx) in order to work inside.

But after the following piece of code, no more savings are effective (using doc.save())
But ... how ?!?!

Code: [Select]
           __project_path = "directory/project.psx"
           __archive_path = "directory/archive.psz"

            doc = Metashape.app.document
            doc.open(path=__archive_path, ignore_lock=True)
            chunk = doc.chunk
            doc.save(path=__project_path)

Regards

38
May I have some help about that ?

39
Hello Alexey,

Thanks for your reply,
After some investigations, it looks those steps don't affect dense_cloud "locked" transformation :
-> dense_cloud.transform is already a diagonal matrix
-> dense_cloud.crs is <CoordinateSystem 'Local Coordinates'>, but set to None doesn't change anything.

I was able to find a workaround by saving chunk.transform.matrix before and after updateTransform() command.
Then, I apply :
Code: [Select]
chunk.dense_cloud.transform = Metashape.Matrix().Diag([1,1,1,1]) * previous_chunk_transform_matrix * new_chunk_transform_matrix.inv()The dense cloud take the right new location, but then following treatments don't work correctly anymore (like dense_cloud classification, etc...)

Looking forwards to your help.
Regards

40
Python and Java API / Update transform with import data (dense cloud)
« on: February 14, 2020, 08:00:47 PM »
Dear Agisoft team,

Within an automated workflow, we would need to update the transformation of a chunk, including a imported dense cloud.
However, even if the point cloud import is done before the transformation, basic stuff (images + tie points) are transformed but the dense cloud remain at the imported coordinates.

Is it possible to include all 3D datas in updateTransform() command ? Or may it exist any solution to transform the dense cloud together with the rest of the chunk ?

P.S. I know it is impossible to "optimize" a dense cloud. What I would need is only apply a basic Helmert transform on this cloud.

Regards

41
Python and Java API / Re: Fail to load calibration
« on: November 04, 2019, 11:58:01 AM »
Ok, after some debug and retry, I guess some old code meddled in my work.
This code indeed works well in 1.5.0 too.

Thanks for your help.
Regards

42
Python and Java API / Re: Fail to load calibration
« on: October 31, 2019, 05:36:42 PM »
Hello Alexey,

I'm currently using Metashape 1.5.0, but regarding change log, nothing changed until 1.5.5.
I'm gonna upgrade on 1.6.0 when it will be released, but most of my code will need changes at that point !

Trying "format=Metashape.CalibrationFormatXML" return me an AttributeError: module 'Metashape' has no attribute 'CalibrationFormatXML'

43
Python and Java API / Re: Fail to load calibration
« on: October 31, 2019, 04:18:14 PM »
It's indeed a fisheye type calibration file.
my_calib.load() return also False ...

44
Python and Java API / Fail to load calibration
« on: October 31, 2019, 02:30:00 PM »
Hello !

I struggle with personal calibration loading. Here is my code :

Code: [Select]
chunk=Metashape.app.document.chunk

# importing cameras from only one sensor

my_sensor = chunk.sensors[0]
my_sensor.type = Metashape.Sensor.Type.Fisheye
my_sensor.user_calib = Metashape.Calibration()
my_sensor.calibration.load("my_path/my_calibration.xml", format='xml')
It return False ...

I've checked everything (file existence, sensor name, sensor type, etc.).
I've able to set my_sensor.fixed = True, but not able to load my calibration ...

Thanks for your help

45
Python and Java API / Re: Set the height in camera.reference.location
« on: October 01, 2019, 05:20:27 PM »
Hi Alexey,

Thanks for your reply.
I have tried almost same code before. When I try your code sample I got an error (image 1)

I guess the most crazy thing is that I got different results from camera.reference.location and from reference panel (image 2)

Regards

Pages: 1 2 [3] 4 5 ... 22