Skip to content

Conversation

@bahmanabbassi
Copy link
Owner

Update lineament vectorization to fit straight segments to skeleton paths, eliminating zigzag artifacts in exported shapefiles.

The previous raster-to-vector conversion using bwboundaries on thinned binary images resulted in pixel-level zigzag artifacts. This change introduces a new skeletonPathsToFittedLines helper function that:

  1. Skeletonizes and cleans the binary lineament map.
  2. Breaks the skeleton at branchpoints to isolate individual paths.
  3. For each path, it performs a PCA-based line fit to determine straight endpoints.
  4. These straight segments are then mapped to world coordinates and stored in the Shape structures.
    This ensures that the Shape, Shape_Deep, and Shape_Shallow outputs represent lineaments as geometrically straight lines.

Open in Cursor Open in Web

Co-authored-by: bahman.abbassi <bahman.abbassi@uqat.ca>
@cursor
Copy link

cursor bot commented Oct 12, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants