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 - marcel.d

Pages: [1] 2
1
Hey, it almost looks like the bounding box is too small to contain the dense cloud.
Maybe it will work as expected if you enlarge the bounding box before generating the dense cloud?

Cheers
Marcel

2
General / Re: Depth maps incomplete for some images
« on: May 22, 2024, 06:18:25 PM »
Beware that my solution [point_cloud.renderDepth()] generates an image which looks like depth, but is not.

While a true depth image (like the ones that can be exported from Metashape) represents the depth along the Z axis going thru the camera plane (all rays are parallel), the images generated with [point_cloud.renderDepth()] show the distances starting from the camera center (all rays intersect).

The above statement applies to Metashape v.2.0.2. I did not test it for any later version.

3
Bug Reports / Re: Imported point cloud incomplete
« on: May 22, 2024, 03:59:12 PM »
Hi Egor,

Thank you very much!

Your workaround seems to work well and is a lot more reliable than my method of adding extra points outside the ROI.

Here is the code in case anyone has the same problem:

Code: [Select]
chunk.importPointCloud(
    path=str(cloud_path),
    format=Metashape.PointCloudFormat.PointCloudFormatLAZ,
    crs=chunk.crs,
    precision=0.001,
    calculate_normals=False,
)
new_cloud = chunk.point_cloud
new_cloud.restorePoints()
doc.save()

Kind regards,
Marcel

4
Bug Reports / Re: Imported point cloud incomplete
« on: May 22, 2024, 11:50:16 AM »
Hey again,

So far I have not found a satisfactory solution, so please let me know your thoughts.

What I have as of now is a workaround:

Add 4 points to the point cloud and place them ~1km away from the actual points in the corners of a rectangle containing all the relevant points. Then import the cloud normally.

Metashape still removes 1-2 points upon import, but luckily they are one of the external (extra) points. Manually delete the other extra points.

This is by no means a reliable way of doing what we need, but at least we learn that the geometry of the imported cloud influences the "selection" of the valid points that are kept.

If there is a way of telling Metashape to treat all imported points as "valid", please let me know of it because it would solve our issue.

Thanks,
Marcel

5
Python and Java API / Re: [Request] Proper Python Documentation
« on: May 21, 2024, 02:27:40 PM »
Thank you, PolarNick!

I confirm that after installing the latest python wheel (Metashape 2.1.1), all the functionality I was asking about is indeed there. Writing code for Metashape just became a lot more fun.

Thank you, Agisoft Team!

6
Python and Java API / Re: [Request] Proper Python Documentation
« on: May 21, 2024, 12:58:10 PM »
Hi specyfick,

Thank you for your reply and sorry that I am getting back to you only now.

I find it really interesting that this works for you and am rather confused as to why it does not work for me.

Here is what I did in the VSCode Terminal from inside the virtual environment that I use with Metashape:

Code: [Select]
python -m pip uninstall Metashape
python -m pip install PATH/TO/Metashape-2.0.2-cp37.cp38.cp39.cp310.cp311-none-win_amd64.whl

Nothing changed for me. Maybe I missed some detail?

When you say "Visual Studio Code Console", you do mean the integrated Terminal, right?


7
Bug Reports / Imported point cloud incomplete
« on: May 21, 2024, 12:30:41 PM »
Hello,

As part of a workflow we need to import very small point clouds into Metashape (10-100 points). The clouds are in the same projected crs as the rest of the project.

A) When importing a LAZ with 10 points, only 8 are shown in Metashape.

This is what the doc.xml file for the dense_cloud shows:

Code: [Select]
      <totalCount>10</totalCount>
      <validCount>8</validCount>

Here is the original point cloud (left) next to the point cloud exported from metashape (right):



You can see that 2 points in the lower left corner are missing.

It gets weirder:

B) When converting the LAZ to OBJ before importing, also 8 points are imported, but one of them is different from A.

C) Also, when pretending that local coordinates are used, 9/10 points are imported, but of course at a very wrong location.

D) When importing the points in the .pts format, 9/10 points are imported (again different from the ones in C).

E) LAS leads to the same results as LAZ. I did not try the PLY or E57 file formats.

I tried varying the number of neighbors used for normals calcuation but, "0", "1" and the default "28" all led to the same results.

I really need all 10 points. What can I do?

Thanks,
Marcel

8
Python and Java API / [Request] Proper Python Documentation
« on: February 14, 2024, 06:34:45 PM »
Dear Agisoft,

Thank you for the powerful Python API.

While the API itself is great, its documentation is not usable.

Finding anything in the PDF document with over 200 pages is super slow and only feasible when you already know the function name.
This issue (along with other vital points)  has already been raised in 2022 (https://www.agisoft.com/forum/index.php?topic=14910), but the problem has not been fixed yet.
There are better formats for documentation (e.g. https://numpy.org/doc/stable/reference/index.html), why do we get stuck with a PDF?
PDFs are nice for paper-printing, but that is not how most of us use software documentation.

Furthermore, writing code in any IDE but PyCharm or a notebook is like not using an IDE at all, because code completion, linting and checking do not work.

Again, thanks for the great API and please advise when we can expect its documentation to be at the same level.

Cheers,
Marcel

PS Here is what I mean with linting not working in e.g. VSCode:


9
General / Re: Depth maps incomplete for some images
« on: January 15, 2024, 01:08:34 AM »
Hey, I ended up regenerating the depth maps with
Code: [Select]
point_cloud.renderDepth() for the relevant cameras.

10
General / Re: Hardware: better choice for Metashape
« on: January 15, 2024, 01:04:55 AM »
My 2 cents: you most likely need NVIDIA GPU. To convince yourself, try running your normal processing tasks with the GPU disabled and compare to the time it takes with GPU enabled. I assume most tasks will take way longer.

Is it possible for you to set up a desktop machine/workstation where the processing is happening and only get a cheap+portable laptop to access this machine remotely? This could be a more affordable and easier to maintain option in the long run.

Good luck!

11
General / Re: Depth maps incomplete for some images
« on: January 05, 2024, 05:38:56 PM »
Thanks for your input Tazzo!

Your expectation about optimizing processing time and quality sounds plausible.
But there is no occlusion in the first depth map. At least nothing can be seen in the point cloud or the RGB images.

Even though the depth maps are just intermediate products, we would like to use them.
Unless there is a better suggestion of how to generate them, we will probably sample distances from cameras to the point cloud. Maybe just for missing depth data? Let you know how that works out.

Cheers,
Marcel

12
General / Depth maps incomplete for some images
« on: January 04, 2024, 03:23:58 PM »
Hi,

I am processing an aerial dataset with very high overlap. Everything works great. Except some generated depth maps are incomplete. The example in the attachment demonstrates it well:



Two images with plenty of overlap. On the left a big chunk of the depth map is missing, on the right it is complete (including the overlapping part).

A feature appearing in both images is highlighted.

Any ideas what is going on?
A. Is Metashape deciding not to reconstruct every depth map because it can create the dense point cloud from other images?
B. Or are parts of depth maps not passing the depth filtering (mild filterin in this case).
C. Something else?

What do I do if I want to have all depth maps generated?
If the issue is option A, I could try to separate the project into "staggered" chunks, where chunk 1 would contain images 1,4,7,10,..., chunk 2: images 2,5,8,11,..., chunk 3:images 3,6,9,12,...  Thus forcing Metashape to generate more depth maps because of lower overlap?
If it is option B, I could disable filtering...

I look forward to some pointers.

Thanks,
Marcel

13
Python and Java API / Re: importRerference questions
« on: November 29, 2023, 02:03:52 PM »
Dear Alexey,

thank you for your suggestion and sorry for the late reply. We decided against the use of spaces within the string and instead rearranged the columns, so the "useless" columns come at the end and the string "nxyzXYZ" works great.

Also, while playing with file formats for the images, we ran into the issue where importReference does not work if the file ending is lacking in the CSV file (like in this post: https://www.agisoft.com/forum/index.php?topic=11165.0).

Kind regards,
Marcel

14
Python and Java API / Re: importRerference questions
« on: August 31, 2023, 04:43:19 PM »
Hi,

is there a character we can use to tell Metashape to skip certain columns from an imported csv?
e.g. consider a file with these columns:

Code: [Select]
label,x,y,z,skip_col,x_accuracy,y_accuracy,z_accuracy
Will the following code work?

Code: [Select]
chunk.importReference(path, delimiter=",", columns="nxyzsXYZ")
Notice the "s" in the "nxyzsXYZ" (because I assume s=skip).
Of course we can rearrange the columns before importing, but a skip-column character seems more elegant and these kinds of files can be easily imported in the GUI. - so why not CLI?

Thanks,
Marcel

15
Python and Java API / Re: Renaming .psx project and the .files folder
« on: August 08, 2023, 02:25:12 PM »
Hey, I did not try it myself, but maybe this could work:

Code: [Select]
prom pathlib import Path

# open project and do the processing
doc = Metashape.app.document
doc.open("path/to/initial_name.psx")
# ...

# save to disk
doc.save()

# rename file and folder
Path("path/to/initial_name.psx").rename("path/to/updated_name.psx")
Path("path/to/initial_name.files").rename("path/to/updated_name.files")

# reopen the file and continue processing
doc.open("path/to/updated_name.psx")
# ...

Or maybe even this could work?

Code: [Select]
# open project and do the processing
doc = Metashape.app.document
doc.open("path/to/initial_name.psx")
# ...

# save to disk with new name
doc.save("path/to/updated_name.psx")


Let me know if you try any of the approaches.

Pages: [1] 2