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

Adding Color namespace and replacing cv::viz references from non-visualizer classes #5

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

sarika93
Copy link
Member

@sarika93 sarika93 commented Feb 17, 2025

Summary of Change

  • Adding ColorUtils.h to the utils directory with a Color namespace that can be referenced instead of cv::viz.
  • Updating all non-visualizer scripts to use the new Color namespace instead of cv::viz.

Reason for change

A number of non-visualizer scripts make use of cv::viz to access it's Color values. However, cv::viz is a heavy dependency to include for that alone.

As the visualizer and cv::viz dependency are being removed easy cross-compiling (see issue here), these cv::viz references must be removed. As having the Color values are necessary for several classes (e.g. Mesh, MeshOptimization), a replacement must be added to maintain that functionality.

cv::viz is a heavy component to include as a mandatory dependency for Color
values only, hence the reason for this inclusion.
*/
namespace Color {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: Creating a Color class that extends from cv::Scalar might be slightly cleaner by avoiding re-purposing Scalar. Happy to leave it as is though.

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.

4 participants