Skip to content

Commit

Permalink
Merge pull request #20 from ichiro-its/hotfix/fix-hue-classify
Browse files Browse the repository at this point in the history
[Hotfix] - Fix Hue Classify Calculation in Color Detection
  • Loading branch information
borednuna authored Jun 29, 2024
2 parents 104ff14 + 5668d5f commit 440d272
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
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

0 comments on commit 440d272

Please sign in to comment.