Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Field Boundary Detection Features to MapReader #532

Open
1 of 11 tasks
DGalexander opened this issue Nov 20, 2024 · 0 comments
Open
1 of 11 tasks

Add Field Boundary Detection Features to MapReader #532

DGalexander opened this issue Nov 20, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request new feature

Comments

@DGalexander
Copy link
Collaborator

DGalexander commented Nov 20, 2024

Add Field Boundary Detection Features to MapReader

Description

This feature request is to integrate a workflow for detecting field boundaries in historical maps into the MapReader open-source project. The workflow includes geospatial masking, text masking, combined masking, and Hough transform-based line detection.


Feature Details

Objective

Integrate a series of new functions into the mapreader->load->images.py subpackage to enable field boundary detection in historical maps.

Features to Add

  1. Geospatial Masking:

    • Use OS Data Hub API for geospatial masking.
    • Split vector/raster data into manageable tiles.
  2. Text Masking:

    • Implement text masking using existing outputs (or pre-generated text mask files) taking the BBbox for the mask.
  3. Line Masking

    • Use cv2 to mask contour lines
  4. Combined Masking:

    • Create a combined mask that integrates geospatial and text masking layers.
    • Export results as GeoTIFF and shapefiles.
  5. Hough Transform for Line Detection:

    • Use probabilistic Hough Transform to extract linear features like boundaries.

Proposed Branching Strategy

  1. Branch Name: feature/field-boundary-detection
  2. Development Path:
    • Create a dev branch for integration.
    • Use smaller feature branches for modular development:
      • feature/geospatial-masking
      • feature/text-mask
      • feature/line-mask
      • feature/combined-mask
      • feature/hough-transform
    • Merge feature branches into dev.
    • Conduct testing before merging dev into main.

Tasks

  • Set up feature branch structure as described.
  • Set up Notebook with functions / classes
  • Test Notebook with sample data
  • Test on patches and images
  • Integrate geospatial masking functions into mapreader->load->images.py.
  • Integrate text masking functions into mapreader->load->images.py.
  • Add combined masking logic and exporting functions.
  • Add line detection functions using Hough Transform.
  • Add visualization utilities for overlaying features.
  • Write tests for all new functions.
  • Update documentation for new functionalities.

References

  1. geospatial_masking.py
  2. historic_wall_inference.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new feature
Projects
Status: Upcoming
Development

No branches or pull requests

1 participant