Skip to content

Commit

Permalink
CV_PI
Browse files Browse the repository at this point in the history
  • Loading branch information
albertopasqualetto committed Jul 8, 2024
1 parent 184e120 commit bd77933
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/detection.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Author: Michele Sprocatti

#define _USE_MATH_DEFINES

#include <opencv2/opencv.hpp>
#include <iostream>
#include <opencv2/features2d.hpp>
Expand All @@ -11,7 +9,6 @@
#include "detection.h"
#include "util.h"
#include "minimapConstants.h"
#include "math.h"

using namespace cv;
using namespace std;
Expand Down Expand Up @@ -154,7 +151,7 @@ Category classifyBall(const Mat& img, double radius)
gray.at<uchar>(i,j) = 0;
//imshow("gray", gray);
//cout << img.rows << "," << img.cols << endl;
int numberOfBackgroundPixels = 4 * pow(radius, 2) - M_PI * pow(radius, 2);
int numberOfBackgroundPixels = 4 * pow(radius, 2) - CV_PI * pow(radius, 2);
//cout << numberOfBackgroundPixels << endl;
const int channel[] = {0};
int histSize = 20;
Expand Down

0 comments on commit bd77933

Please sign in to comment.