Commit a9eebb91 authored by manuele's avatar manuele

warning fixes

parent 59099ecb
......@@ -87,7 +87,7 @@ int main(int argc, char *argv[])
string out_image_path = parser.get<string>("out_image_path");
bool is_grayscale = parser.get<bool>("is_grayscale");
float threshold = parser.get<float>("threshold");
int step = parser.get<float>("step");
int step = parser.get<int>("step");
int min_rows, min_cols, max_rows, max_cols;
string min_window_size = parser.get<string>("min_window_size");
......
......@@ -26,12 +26,14 @@ using cv::imread;
#include <opencv2/core/utility.hpp>
using cv::CommandLineParser;
using cv::FileStorage;
#include <opencv2/core/utility.hpp>
#include <ctime> // std::time
#include <cstdlib> // std::rand, std::srand
#include <opencv2/xobjdetect.hpp>
using cv::xobjdetect::ICFDetectorParams;
using cv::xobjdetect::ICFDetector;
using cv::xobjdetect::WaldBoost;
......@@ -160,16 +162,12 @@ int main(int argc, char *argv[])
if((int)((params.bg_per_image * bg_filenames.size()) + pos_filenames.size()) >max_samples_allowed)
{
std::cout<<std::endl<<"ERROR: exceeded maximum number of samples "<<std::endl<<std::endl;
std::cout<<"exceeded maximum number of samples (pos + neg) with "<<features_size<<" features is: "<<max_samples_allowed<<std::endl<<std::endl;
CV_Assert(false);
CV_Error_(1, ("exceeded maximum number of samples. Maximum number of samples with %d features is %d\n",features_size,max_samples_allowed ));
}
if(params.feature_count >max_features_allowed)
{
std::cout<<std::endl<<"ERROR: exceeded maximum number of features"<<std::endl<<std::endl;
std::cout<<"maximum number of features with "<<samples_size<<" samples is: "<<max_features_allowed<<std::endl<<std::endl;
CV_Assert(false);
CV_Error_(1, ("exceeded maximum number of features. Maximum number of features with %d samples is %d\n",samples_size,max_features_allowed ));
}
std::cout<<pos_filenames.size()<<std::endl;
......
......@@ -199,7 +199,7 @@ Detect objects on image.
.. ocv:function:: void ICFDetector::detect(const Mat& image, vector<Rect>& objects, float scaleFactor, Size minSize, Size maxSize, float threshold, int slidingStep, std::vector<float>& values)
.. ocv:function:: detect(const Mat& img, std::vector<Rect>& objects, float minScaleFactor, float maxScaleFactor, float factorStep, float threshold, int slidingStep, std::vector<float>& values);
.. ocv:function:: detect(const Mat& img, std::vector<Rect>& objects, float minScaleFactor, float maxScaleFactor, float factorStep, float threshold, int slidingStep, std::vector<float>& values)
:param image: image for detection
:param objects: output array of bounding boxes
......
......@@ -166,7 +166,7 @@ struct CV_EXPORTS ICFDetectorParams
bool use_fast_log;
ICFDetectorParams(): feature_count(UINT_MAX), weak_count(100),
model_n_rows(56), model_n_cols(56), bg_per_image(5), alpha(0.02), is_grayscale(false), use_fast_log(false)
model_n_rows(56), model_n_cols(56), bg_per_image(5), alpha(0.02f), is_grayscale(false), use_fast_log(false)
{}
};
......
......@@ -256,8 +256,7 @@ void ICFDetector::detect(const Mat& img, vector<Rect>& objects,
if(factorStep <= 0)
{
CV_Error(CV_StsBadArg, "factorStep must be > 0");
CV_Assert(false);
CV_Error_(CV_StsBadArg, ("factorStep must be > 0"));
}
objects.clear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment