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

[Hotfix] - Fix Hue Classify Calculation in Color Detection #20

Merged
merged 1 commit into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/ninshiki_cpp/node/ninshiki_cpp_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ class NinshikiCppNode
cv::Mat received_frame;
cv::Mat hsv_frame;

int count = 0;

ConfigGrpc config_grpc;
std::string path;

Expand Down
4 changes: 2 additions & 2 deletions src/ninshiki_cpp/detector/color_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ void ColorDetector::configure_color_setting(utils::Color color)

cv::Mat ColorDetector::classify(cv::Mat input)
{
int h_min = (min_hue * 255) / 360;
int h_max = (max_hue * 255) / 360;
int h_min = (min_hue * 255) / 100;
int h_max = (max_hue * 255) / 100;

int s_min = (min_saturation * 255) / 100;
int s_max = (max_saturation * 255) / 100;
Expand Down
2 changes: 1 addition & 1 deletion src/ninshiki_cpp_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int main(int argc, char ** argv)

int gpu = 0;
int myriad = 0;
int frequency = 16;
int frequency = 96;

std::shared_ptr<ninshiki_cpp::detector::DnnDetector>dnn_detector = nullptr;
std::shared_ptr<ninshiki_cpp::detector::ColorDetector>color_detector = nullptr;
Expand Down
Loading