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

Pages: [1] 2 3 ... 6
1
General / Re: Different Results
« on: September 22, 2023, 11:55:20 AM »
For those who found this topic on google - why this is not always possible to have reproducible results in an algorithm:

1) If the algorithm is single-threaded - it is enough to fix the seed for the random values generator, so that the random sequence is the same from run to run (on the same computer).

2) If the algorithm is multi-threaded, you can't easily mitigate possible differences in threads execution speed. In general, you can only mitigate it with algorithm speed degradation - f.e. falling back to single-threaded implementation. And the possible difference in threads' execution speed leads to different results.

2
Something like that:

Code: [Select]
for chunk in PhotoScan.app.document.chunks:
    if chunk.label == "My Custom Chunk Name":
        chunk.importModel('Path/0.obj')
        chunk.model.removeComponents(100000)

Or like that (if you want to make chosen chunk to be active):

Code: [Select]
for chunk in PhotoScan.app.document.chunks:
    if chunk.label == "My Custom Chunk Name":
        PhotScan.app.document.chunk = chunk

PhotoScan.app.document.chunk.importModel('Path/0.obj')
PhotoScan.app.document.chunk.model.removeComponents(100000)

3
Yes, that's possible too :)

This is example of how to check all chunks' labels and then, if label equal to desired name - make it active, so that all Metashape.app.document.chunk accesses were addressed to it:

Code: [Select]
for chunk in Metashape.app.document.chunks:
    if chunk.label == "My Custom Chunk Name":
        Metashape.app.document.chunk = chunk

Probably you meant to name a chunk from GUI - but for the sake of completeness - this is how to change the currently active chunk name from Python:

Code: [Select]
Metashape.app.document.chunk.label = "My Custom Chunk Name"

P.S. script was adapted from https://www.agisoft.com/forum/index.php?topic=7815.0 (googled with "metashape python make chunk active")

4
Quote
Although I am having problem doing this for multiple chunks in the Workspace.  :(
How do I get this to select each chunk to be active so that the script applies the actions?

You can use for-loop over all chunks (like here). And after that use chunk.model like this:


...
        stats = chunk.model.statistics()
...
        chunk.model.removeComponents(faces_threshold)
...

6
Feature Requests / Re: Iterative Closest Point Algorithm
« on: July 06, 2023, 02:21:24 PM »
Also note that there are tooltips - just hover mouse above parameter fields, or you can read them here

7
Feature Requests / Re: Iterative Closest Point Algorithm
« on: July 06, 2023, 12:22:27 PM »
You can read about these optional parameters here and here

8
Feature Requests / Re: Iterative Closest Point Algorithm
« on: July 05, 2023, 07:01:52 PM »
Hi mattabao,

please try updated version, now it should work.

9
General / Re: Issue with combined rgd decoding in metashape
« on: July 03, 2023, 12:42:13 PM »
Nice!

10
General / Re: Issue with combined rgd decoding in metashape
« on: June 30, 2023, 01:16:32 PM »
Hi, just a guess:

1) you store RGB in 24-bit integer, so may be you should change TYPE from F to something like U?

2) or you can continue to use TYPE F but output value after reinterpreting 32 bits of your RGB integer as float, and outputing it as float - see example file here - https://pointclouds.org/documentation/tutorials/pcd_file_format.html

Also, I googled with "pcd rgb color" and looks like second solution should work - https://stackoverflow.com/questions/51501188/unpacking-rgb-values-of-a-point-cloud-from-pcd-file

11
General / Re: Error 403 using google maps as basemap
« on: June 07, 2023, 02:14:32 PM »
Hi Paulo,

try to change User-Agent field to Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36

12
General / Re: Error 403 using google maps as basemap
« on: June 07, 2023, 01:33:29 PM »
Also basemap became a bit more detailed if in Edit Basemap specify bigger Max zoom value - for example 21 (instead of 18)

13
General / Re: Error 403 using google maps as basemap
« on: June 07, 2023, 01:28:34 PM »
Problem solved, it is enough to open dialog Add Basemap (or Edit Basemap) like in tutorial https://agisoft.freshdesk.com/support/solutions/articles/31000169660-configure-custom-basemap

And in section HTTP Headers add line with Name = User-Agent and Value = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36

14
General / Error 403 using google maps as basemap
« on: June 07, 2023, 01:24:58 PM »
Hi, I wanted to use google satellite maps as basemap instead of the default one and found these two tutorials:

1) https://agisoft.freshdesk.com/support/solutions/articles/31000169660-configure-custom-basemap
2) https://www.youtube.com/watch?v=-WYJ1cdtmDI

I followed the first one using URL from the youtube video:
Code: [Select]
http://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}
and everything was working fine, but sometimes google maps basemap isn't shown and there is a error in console:

Code: [Select]
Error: Error transferring http://mt1.google.com/vt/lyrs=s&x=1&y=1&z=1 - server replied: Forbidden (status code: 403)
But if I open this link in browser - image of small basemap tile opens.

How can I fix this?

15
Python and Java API / Re: import depth maps
« on: December 15, 2022, 04:11:03 PM »
Just for those who will google this post - see https://www.agisoft.com/forum/index.php?topic=14397.msg63342#msg63342

Pages: [1] 2 3 ... 6