RingFilt
A state machine based filtering program that fits a surface to the one-ring or two-ring of triangles around each point and filters away points & triangles according to the specified filter.
Note: The Ring filtering state machine always assumes that we need at least the 2-ring for filtering. Which implies we need a 3-ring before we can safely delete any vertices. This has the side effect of reordering vertices and triangles on output to satisfy this 2-ring property. For instance, You may notice re-ordered meshes drawing all interior vertices first and then vertices on the border later.
Note: All Filters have been modified to support LOW / HIGH thresholding, if those flags are specified (-zsplit and -zsub).
Filter Flags
Types of supported filters
-fnon
Run
DO NOTHING filter
- Pass thru filter, does no filtering, except for re-order side-effect mentioned above
-f1r
Run Simple Average Height Filter on 1-Ring of each vertex
- Computes best fit z-value as average of neighbors in 1-ring
-f2r
Run Simple Average Height Filter on 2-Ring of each vertex
- Computes best fit z-value as average of neighbors in both 1-ring and 2-ring
-fl1r
Run Plane Fitting (Linear Least Squares) Filter on 1-ring of each vertex
- Computes best fit plane to data points in 1-ring
- Needs at least 3 data points to compute best fit plane
- Reverts to -f1r filter if there are not enough data points
- best-fit z-value as computed from planar equation for current x,y
- z = Ax + By + C
-fq2r
Run Quadratic Surface Fitting (Linear Least Squares) filter on 2-ring of each vertex
- Computes best fit quadratic surface thru data points in 1-ring and 2-ring
- Needs at least 6 data points to compute best fit surface
- Reverts to -fl1r filter if there are not enough data points
- best-fit z-value as computed from quadratic equation for current x,y
- z = Ax^2 + By^2 + Cxy + Dx + Ey + F
-flhi1r
Run LOW / HIGH isolated filter on 1-ring filter of each vertex
- If point is LOW and all neighbors in 1-ring are HIGH, mark as filtered
- If point is HIGH and all neighbors in 1-ring are LOW, mark as filtered
- In both cases, best fit z-value is computed as simple average of neighbors z-values
- Need to specify valid -zsplit and -zsub flags to make this filter do any useful work
-flhi2r
Run LOW / HIGH isolated filter on 2-ring filter of each vertex
- If point is LOW and all neighbors in 1-ring and 2-ring are HIGH, mark as filtered
- If point is HIGH and all neighbors in 1-ring and 2-ring are LOW, mark as filtered
- In both cases, best fit z-value is computed as simple average of neighbors z-values
- Need to specify valid -zsplit and -zsub flags to make this filter do any useful work
Filter Modifier Flags
Modifiers to supported filters
-fpmin
Run Local Minima Filter variation (works with -f1r, -f2r, -fl1r, -fq2r flags)
- If z-value is below best-fit z-value, it gets filtered
-fpmax
Run Local Maxima Filter varation (works with -f1r, -f2r, -fl1r, -fq2r flags)
- if z-value is above best-fit z-value, it gets filtered
-fpvar
Run Variance Filter varation
default (works with -f1r, -f2r, -fl1r, -fq2r flags)
- if variance of best-fit z-value is outside the variance range [minSigma, maxSigma] it gets filtered
-sigmin {floatVal}
Min Variance Value for variance filters, (variances smaller than this get filtered away) defaults to 0.0 if not specified.
-sigmax {floatVal}
Max Variance Value for variance filters, (variances larger than this get filtered away) defaults to 3.0 if not specified.
Disposal Policy Flags
Controls what to do with a vertex if it is marked as filtered
-replace
Replace any filtered vertices with the computed best-fit z-value
-delete
Delete filtered vertices (also deletes all incident triangles on deleted vertex)
Low / High Thresholding
-zsplit {floatVal}
threshold value,
- if (zVal <= threhold) then the current vertex belongs to the LOW group
- otherwise it belongs to HIGH group
-zsub {floatVal}
Value to subtract from high group before filtering operations
Input / Output Files
Note: Both of these flags need to be specified for this app to work properly.
-i {filename}
Input file to read and filter
-o {filename}
Output file to write out
Input File Formats
Note: Unlike other tools, at least one of these must be specified for this app to work properly.
-isma
Use Streaming Mesh ASCII
-ismb
Use Streaming Mesh Binary
-ismc
Use Streaming Mesh Compressed
-ismd
Use Streaming Mesh Compressed (???)
-iply
Use Stanford's PLY format
-ijrs
Use Jonathon's Shewchuk's .ele and .node format
-ioff
Use OFF file format
Output File Formats
Note: Unlike other tools, at least one of these must be specified for this app to work properly.
Streaming Point Formats
-ospa
Use Streaming
POINT ASCII
- All triangle commands are suppressed when writing to this format
- You get a point cloud, which needs to be spatially finalized (via spfinalize)
-ospb
Use Streaming
POINT Binary
- All triangle commands are suppressed when writing to this format
- You get a point cloud, which needs to be spatially finalized (via spfinalize)
Streaming Mesh Formats
-osma
Use Streaming Mesh ASCII
-osmb
Use Streaming Mesh Binary
-osmc
Use Streaming Mesh Compressed
Miscellaneous Flags
-compact
Turn on compaction (i.e. prereadaspre wrapper)
-vcompact
Turn on compaction (i.e. prereadaspre wrapper)
-bbox
Compute Min/Max Bounding Box
-b
Bit Rate for Compressed formats on output
-bits {intVal}
Bit Rate for Compressed formats on output
-delay_read {intVal}
Number of triangles to buffer on reading
-dry
??? (Write Flag)
-utf
Use Triangle Finalize (
- Eliminates stand-a-lone finalize commands on output to ASCII output file formats (IE .sma).
-h
Help, Show example usage for "RingFilt"
--
ChristianStith - 17 Jun 2008
to top