Skip to content

Commit

Permalink
fix: v4.4.2, fix bug in droptype recognition
Browse files Browse the repository at this point in the history
  • Loading branch information
KumoSiunaus committed Jun 5, 2022
1 parent 9b9b2a7 commit 23d4c6f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/result.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "recognize.hpp"

using dict = nlohmann::ordered_json;
extern void show_img(cv::Mat src);
// extern void show_img(cv::Mat src);

namespace penguin
{ // result
Expand All @@ -25,7 +25,7 @@ const double DROP_AREA_X_PROP = 0.21;
const double DROP_AREA_Y_PROP = 0.2;
const double DROP_AREA_HEIGHT_PROP = 0.8;
const double ITEM_DIAMETER_PROP = 0.524;
const double W_H_PROP = 6.5;
const double W_H_PROP = 7;

enum DroptypeFlags
{
Expand Down Expand Up @@ -837,7 +837,14 @@ class Widget_Droptype : public WidgetWithCandidate<DroptypeFlags, int>
Widget_DroptypeText _text {this};
void _get_items_count()
{
_items_count = static_cast<int>(round(width / (height * W_H_PROP)));
if (server == "CN")
{
_items_count = static_cast<int>(round(width / (height * W_H_PROP)));
}
else
{
_items_count = static_cast<int>(round(width / (height * 7.5)));
}
}
void _get_candidates()
{
Expand Down

0 comments on commit 23d4c6f

Please sign in to comment.