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

@ -829,9 +829,9 @@ namespace cv
// It queries current active device.
static bool checkIfGpuCallReasonable();
int preset;
int ndisp;
int winSize;
int preset;
// If avergeTexThreshold == 0 => post procesing is disabled
// If avergeTexThreshold != 0 then disparity is set 0 in each point (x,y) where for left image

View File

@ -351,8 +351,7 @@ namespace
case CV_XYZ2BGR: case CV_XYZ2RGB:
{
typedef void (*func_t)(const DevMem2D& src, int srccn, const DevMem2D& dst, int dstcn,
const void* coeffs, cudaStream_t stream);
typedef void (*func_t)(const DevMem2D& src, int srccn, const DevMem2D& dst, int dstcn, const void* coeffs, cudaStream_t stream);
static const func_t funcs[] = {color::XYZ2RGB_gpu_8u, 0, color::XYZ2RGB_gpu_16u, 0, 0, color::XYZ2RGB_gpu_32f};
if (dcn <= 0) dcn = 3;
@ -392,7 +391,7 @@ namespace
dst.create(sz, CV_MAKETYPE(depth, dcn));
const void* coeffs = depth == CV_32F ? (void*)coeffs_f : (void*)coeffs_i;
//const void* coeffs = depth == CV_32F ? (void*)coeffs_f : (void*)coeffs_i;
funcs[depth](src, scn, dst, dcn, coeffs_i, stream);
break;

View File

@ -67,7 +67,10 @@ namespace
error_entry( NPP_NOT_SUPPORTED_MODE_ERROR ),
error_entry( NPP_ROUND_MODE_NOT_SUPPORTED_ERROR ),
error_entry( NPP_RESIZE_NO_OPERATION_ERROR ),
#if defined (_MSC_VER)
error_entry( NPP_NOT_SUFFICIENT_COMPUTE_CAPABILITY ),
#endif
error_entry( NPP_BAD_ARG_ERROR ),
error_entry( NPP_LUT_NUMBER_OF_LEVELS_ERROR ),
error_entry( NPP_TEXTURE_BIND_ERROR ),
@ -153,4 +156,4 @@ namespace cv
}
}
#endif
#endif

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