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

Pages: 1 2 [3] 4 5 ... 9
31
Python and Java API / catching "out of disk space" errors in pyhon API
« on: January 02, 2022, 04:29:50 PM »
Hi there,

I have a reconstruction that has been failing a few times in a row. I ended up setting up a script that logged free disk space during the process and I think this is what is failing: my computer is running out of space and Metashape crashes... however there is nothing in the python script log or shell output that would indicate this.
This is the tail of the shell output

Code: [Select]
Found 1 GPUs in 0.00085 sec (CUDA: 0.000152 sec, OpenCL: 0.000681 sec)
Using device: NVIDIA GeForce RTX 3090, 82 compute units, free memory: 23820/24267 MB, compute capability 8.6
  driver/runtime CUDA: 11040/8000
  max work group size 1024
  max work item sizes [1024, 1024, 64]
8920568 matches found in 55.5983 sec
matches combined in 1.01701 sec
filtered 1043774 out of 4918130 matches (21.223%) in 1.83047 sec
saved matches in 0.018059 sec
loaded matching data in 0.001176 sec
loaded matching partition in 0.012572 sec
loaded keypoint partition in 0.000253 sec
loaded matches in 11.8576 sec
setting point indices... 168390005 done in 22.7045 sec
generated 168390005 tie points, 3.75358 average projections
removed 5084558 multiple indices
removed 67880 tracks
removing stationary tracks...

So my question is this: in order to verify my hypothesis that disk space is killing this process, Is there are way in the Python API that I can catch an "out of space" error that is not being thrown to the shell console?

Cheers!

32
Python and Java API / Re: Dense cloud classes to vertex colors
« on: December 22, 2021, 04:30:04 PM »
Thanks Alexey!

I have a solution actually for my purposes... the code is really messy for now but and in different files but these are the steps:
1. classify points
2. export point classes as separate PLY files
3. load PLY files in open3D and create vector field
4. replace each point with geometry (cube or sphere) at same coordinates in vector field, preserving color
5. merge vertices, repeat for each class and merge as single OBJ file

This is not 100% perfect but fulfills my needs of exporting the point cloud classes as colored segmentation maps!

33
Python and Java API / Re: Dense cloud classes to vertex colors
« on: December 15, 2021, 05:22:05 PM »
OK I guess this is a pretty singular request  ;D

I will work on my own implementation in open3D :)

34
Python and Java API / Re: Dense cloud classes to vertex colors
« on: December 14, 2021, 12:59:14 PM »
To clarify: what I am looking for is something analogue to "colorize model" with source data = Dense Cloud, but using "Dense Cloud Classes" instead.


35
Python and Java API / Dense cloud classes to vertex colors
« on: December 13, 2021, 05:10:27 PM »
Hi guys,
I realise this workflow may sound a little exotic, but here goes... I need to find a way to convert the "classes" of my dense clouds to vertex colors of my mesh, or at least colorize my mesh based on these classes.

On way to do this would be to export the mesh, export the dense point cloud in segments based on classes, calculate distances and colorize based on proximity... but this is clunky and slow, and I was wondering whether someone might have a workflow to do this directly in Metashape...?

Cheers,

36
Python and Java API / Re: place markers in corners of bounding box
« on: October 23, 2021, 08:30:31 PM »
Hi Alexey,

This is exactly what I am trying to do, indeed! And that's where I'm getting stuck:I don't understand how to switch the coordinate system before importing an object and then set it back... I've been over all the API documentation and I think I just don't understand that bit  ;D

37
Python and Java API / Re: place markers in corners of bounding box
« on: October 23, 2021, 11:31:41 AM »
Quick follow-up question: I'm trying to use these corner positions to import some geometry... is there a quick and easy way to import, for example, a cube.obj model that I have so that it is directly centered with it's 0,0,0 in the position of corner1 for example? Or do I need to create a whole new chunk with new coordinates?

38
Python and Java API / Re: place markers in corners of bounding box
« on: October 22, 2021, 11:16:43 PM »
Awesome, thanks Alexey!

39
Python and Java API / place markers in corners of bounding box
« on: October 22, 2021, 08:10:40 PM »
Hey there,

I'm trying to do something that should be simple, but I'm messing up and I can't figure out where...

The objective is this: to automatically place a marker in the corners of the bounding box, in order to export the GPS coordinates of the 8 corners.


My basic idea is this code below:

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

size = chunk.region.size

corner0 = [chunk.region.center[0]-(0.5*chunk.region.size[0]),chunk.region.center[1]-(0.5*chunk.region.size[1]),chunk.region.center[2]-(0.5*chunk.region.size[2])]

chunk.addMarker(corner0)


I get the region size & center, then find a corner by removing half the size on each axis from the center... but this fails and places markers somewhere outside of my map. I have a feeling I'm doing something stupid here but I can't figure this out!

Any help would be much appreciated!

Cheers,
Stephan

40
General / Re: Change Photoscan default opening view?
« on: October 08, 2021, 10:06:24 AM »
Woops sorry never mind, this option is not in the first panel of settings  :-X

I will make sure to ask stupid questions AFTER morning coffee in the future  ;D

41
General / Re: Change Photoscan default opening view?
« on: October 08, 2021, 09:59:35 AM »
Hey guys,
It seems this option is no longer in the "Advanced" section of the preference window, at least not on Linux. Does anyone know where I can find it now?
Cheers,

42
Feature Requests / Re: Custom point classes?
« on: October 03, 2019, 03:34:28 PM »
Hi Alexey,

I would like to be able to do data tagging direclty in photoscan and export point clouds with classes for machine learning applications.


Cheers,

43
Feature Requests / Re: Iterative Closest Point Algorithm
« on: October 03, 2019, 03:31:13 PM »
Hi there!

You can import Open3D to the photoscan python envirnomlent and use the ICP algorithm in there to compute the transformations that you need, then apply them directly in photoscan to your chunks.

Cheers,
Stephan

44
Python and Java API / Re: import depth maps
« on: October 03, 2019, 03:28:42 PM »
Hi guys,

Nobody has any ideas of how to do this ?

Cheers,
Stephan

45
Python and Java API / Re: Using "sequential" preselection in the python API
« on: September 26, 2019, 05:18:13 PM »
Ah I see, excellent!

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