Forum

Author Topic: Dealing with water - best way to edit mesh quantitatively?  (Read 11977 times)

andyroo

  • Sr. Member
  • ****
  • Posts: 440
    • View Profile
Dealing with water - best way to edit mesh quantitatively?
« on: June 05, 2012, 10:14:54 PM »
I am trying to figure out the best way to deal with the noise introduced by water in PS. I am producing orthos and DSMs along a river corridor with two reservoirs, so there is water in every photo. Masking isn't an option. In much of the water-covered area, the vertex density is very high, with z values +/- 20-30 meters from the actual water surface/ground elevations.

I think that my biggest problem is that I am not sure what the best program would be where I could export the mesh from PS, process the data, then import it back to a mesh. Ideally, with the program, I would be able to run spatial algorithms on the mesh to smooth it, or to completely delete areas where the standard deviations or other calculated values (by vertex) exceed a given threshold.

When I have dealt with noisy areas in spatial data before, I apply a z-score filter to a moving kernel within the point cloud or grid, where for a given kernel:

  z = |x - ?|/?

where

x   is the value of the cell at the center of the kernel
?   is the mean value of the cells within the kernel
?   is the standard deviation of the cells within the kernel, and
z   is the z-score for the cell at the center of the kernel.

If a cell (or point) exceeds a given z-score (usually 2.5 - 3), I exclude it and interpolate the surface from neighboring points. Where I have areas that are particularly noisy, this technique doesn't work, but the standard deviation becomes so large that I can filter the points by excluding the points where the standard deviation exceeds a threshold. For example, in the noisy water data, the standard deviation is about 2x that of the forested riverbanks because the noise from water goes both above and below the surface.

So to remove noise in water areas, what program could I use to apply the above method, or is there a better way?

 I am used to processing in CARIS and ArcGIS, but I am happy to use another program if I need to. Ideally I will be able to work with 10M+ vertices. Meshlab seems like I could potentially figure out how to do that with filters, but it starts to bog down and crash quite a bit when vertices approach more than about 2M, and I don't think it uses GPU very well.

I have a dual quad core machine with 48GB RAM and 2 x NVidia GTX 560 Ti.

Thank you for any insight or suggestions.

Andy

FoodMan

  • Sr. Member
  • ****
  • Posts: 477
    • View Profile
Re: Dealing with water - best way to edit mesh quantitatively?
« Reply #1 on: June 06, 2012, 08:43:05 AM »
I'd go for 3DCoat... import your mesh into the voxel room, and from there very easily clean the mesh.. then just re-export it..

the good thing with 3DCoat voxels is that you won't have to deal with polygons, because upon import you mesh will be voxelized, but when done, you can re-export to a polygon mesh..

... and it can handle large files easy.. I just used it with a 20 mil. polys mesh..

my 0.1 c
f/

andyroo

  • Sr. Member
  • ****
  • Posts: 440
    • View Profile
Re: Dealing with water - best way to edit mesh quantitatively?
« Reply #2 on: June 06, 2012, 06:49:57 PM »
Thanks for the reply, FoodMan,

I looked at 3DCoat, and it looks like a neat program, but I didn't see any quantitative editing tools.

Voxler might work for editing, but it only imports/exports geometry of PLY files. Has anyone used that with PhotoScan before?

The demo doesn't let me save or export, so I can't test if the exported PLY files will work with PhotoScan.

Thanks for any help.

Andy
« Last Edit: June 07, 2012, 01:21:30 AM by andyroo »

FoodMan

  • Sr. Member
  • ****
  • Posts: 477
    • View Profile
Re: Dealing with water - best way to edit mesh quantitatively?
« Reply #3 on: June 07, 2012, 08:38:02 AM »
hello... well then what you could do is to use Meshlab to convert PLY >> OBJ. and OBJ. >> PLY

f/

andyroo

  • Sr. Member
  • ****
  • Posts: 440
    • View Profile
Re: Dealing with water - best way to edit mesh quantitatively?
« Reply #4 on: June 08, 2012, 08:32:04 PM »
It looks like Meshlab is going to be the ticket - I can easily select (mostly) water vertices by conditional selection of the RGB values. But now I have to figure out how to write a filter that calculates a mean z value for x neigboring points (or all points within a given distance on x,y axes) as well as a stDev, and assigns them to point attributes.

Am not finding good forum or help files. Any ideas? I'll plug through it though regardless. Thanks for feedback.

Wishgranter

  • Hero Member
  • *****
  • Posts: 1202
    • View Profile
    • Museum of Historic Buildings
Re: Dealing with water - best way to edit mesh quantitatively?
« Reply #5 on: June 09, 2012, 06:13:57 PM »
BEST will be if you do PREprocess , mask the area of river in pshop ( can copy the mask layer ) and then use in Pscan. if proper done ( precise editing) you get levels on riverside...... don?t complicate tjhe whole proces with POST processing...... Yes if hunderts of photos it can be timeconsuming but when get the process in hand it will be faster and faster......
« Last Edit: June 09, 2012, 11:41:42 PM by Wishgranter »
----------------
www.mhb.sk

andyroo

  • Sr. Member
  • ****
  • Posts: 440
    • View Profile
Re: Dealing with water - best way to edit mesh quantitatively?
« Reply #6 on: June 14, 2012, 11:27:12 PM »
@Wishgranter:

Each flight generates ~1000 photos. Every photo has water. I am trying to do a flight every two weeks. Masking is not feasible. I am trying to automate everything from blur detection to surface generation, with the only manual thing being GCPs.

Meshlab is looking promising for noise filtering on the DSM, but I need to wrap my head around filters in meshlab so I can write one that defines attributes for vertices based on calculated values.

Wishgranter

  • Hero Member
  • *****
  • Posts: 1202
    • View Profile
    • Museum of Historic Buildings
Re: Dealing with water - best way to edit mesh quantitatively?
« Reply #7 on: June 15, 2012, 08:42:13 PM »
Yes over 100+ is unreasonable to work with that. Possible way is to edit in Geomagic or even easier  with MUDBOX and repair the data.... if want can help with that.....
----------------
www.mhb.sk

toxicmag

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: Dealing with water - best way to edit mesh quantitatively?
« Reply #8 on: November 28, 2016, 04:49:37 PM »
Hello andyroo,

i found your post a couple of years later...  :D

What was your solution those days?


Greetings

Alex
#multirotor #VTOL #Trinity #Quantum-Systems #a6000 #a7R #RedEdge #ALTUM #RX1II