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

adds overloads for faster toImage and addLayerToImage #366

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rooshm
Copy link

@rooshm rooshm commented Jul 15, 2022

Addresses discussion in issue #359.

Overload created by use of boolean isAlpha, with the faster path available for images without transparency, when isAlpha is true, the slow path is used.

static bool addLayerFromImage(const cv::Mat& image, const std::string& layer,
                                grid_map::GridMap& gridMap, bool isAlpha, const float lowerValue,
                                const float upperValue, const double alphaThreshold);
static bool toImage(const grid_map::GridMap& gridMap, const std::string& layer,
                      const int encoding, bool isAlpha, const float lowerValue, const float upperValue,
                      cv::Mat& image);

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.

None yet

1 participant