Skip to content

Feature: Compute Euclidean Distance Transforms of Binary Obstacle Maps#34

Open
mattking-smith wants to merge 7 commits intoborglab:masterfrom
mattking-smith:feature_computeEDTinCpp
Open

Feature: Compute Euclidean Distance Transforms of Binary Obstacle Maps#34
mattking-smith wants to merge 7 commits intoborglab:masterfrom
mattking-smith:feature_computeEDTinCpp

Conversation

@mattking-smith
Copy link
Copy Markdown
Collaborator

Purpose

Compute the Euclidean Distance Transform (EDT) of Binary Obstacle maps in 2/3D in C++. This alleviates the need for external libraries like MATLAB and Python to compute EDT of binary images with functions like: bwdist and scipy.ndimage.distance_transform_edt.

Details

  • The C++ algorithm implements the Felzenszwalb & Huttenlocher Algorithm to determine EDT of binary obstacles
  • Introduced namespace dt (distance transform) under gpmp2
  • Wrote unit tests with analytic cases for single and multidimensional signed distance fields
  • Validated EDT implementation against existing tests

…amespace, which removed dependency on `bwdist` and `scipy` implementation of Euclidean Distance Transforms for building signed distance fields for creating factors.
…F can be tested and replaced into existing hard-coded (pre-existing) sdf
@mattking-smith
Copy link
Copy Markdown
Collaborator Author

This PR is associated with issue #27

@mattking-smith mattking-smith requested a review from dellaert April 26, 2026 21:13
@mattking-smith mattking-smith linked an issue Apr 26, 2026 that may be closed by this pull request
@mattking-smith
Copy link
Copy Markdown
Collaborator Author

@dellaert I am not sure what is up with the CI failing to build GTSAM here on the server side. Is this happening on some new update to GTSAM?

However, these failures are not due to the change set introduced in this PR.

@dellaert
Copy link
Copy Markdown
Member

Hmmm, right. Interestingly enough, these failures are probably the result from the Gaussian process factor PR, but all checks for that passed.

Could you ask an AI to update the workflows to match the flags that we have in GTSAM? Make sure it's c++17 etc? I think this repo is pretty old with respect to develop. I'd do it, but I'm a bit short on time and quota :-).

@mattking-smith
Copy link
Copy Markdown
Collaborator Author

Hmmm, right. Interestingly enough, these failures are probably the result from the Gaussian process factor PR, but all checks for that passed.

Could you ask an AI to update the workflows to match the flags that we have in GTSAM? Make sure it's c++17 etc? I think this repo is pretty old with respect to develop. I'd do it, but I'm a bit short on time and quota :-).

I'll look into it when I get the chance

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.

Add bwdist Function in C++

2 participants