fixed compilation error and warnings under ubuntu

This commit is contained in:
Andrey Morozov
2010-11-20 14:41:28 +00:00
parent 3a8df6034f
commit 680dc71bc5
4 changed files with 11 additions and 10 deletions

View File

@@ -313,7 +313,7 @@ void cv::gpu::HOGDescriptor::detectMultiScale(const GpuMat& img, vector<Rect>& f
for (size_t i = 0; i < level_scale.size(); i++)
{
double scale = level_scale[i];
Size sz = Size_<double>(img.size()) * (1.0/scale);
Size sz(img.cols/scale, img.rows/scale);
GpuMat smaller_img;
if (sz == img.size())
@@ -328,10 +328,9 @@ void cv::gpu::HOGDescriptor::detectMultiScale(const GpuMat& img, vector<Rect>& f
}
detect(smaller_img, locations, hit_threshold, win_stride, padding);
Size scaled_win_size = Size_<double>(win_size) * scale;
Size scaled_win_size(win_size.width * scale, win_size.height * scale);
for (size_t j = 0; j < locations.size(); j++)
all_candidates.push_back(Rect(Point2d(locations[j]) * scale,
scaled_win_size));
all_candidates.push_back(Rect(Point2d((CvPoint)locations[j]) * scale, scaled_win_size));
}
found_locations.assign(all_candidates.begin(), all_candidates.end());
@@ -1509,4 +1508,4 @@ std::vector<float> cv::gpu::HOGDescriptor::getPeopleDetector_64x128()
return vector<float>(detector, detector + sizeof(detector)/sizeof(detector[0]));
}
#endif
#endif