fixed compilation error and warnings under ubuntu

pull/13383/head
Andrey Morozov 15 years ago
parent 3a8df6034f
commit 680dc71bc5
  1. 2
      modules/gpu/include/opencv2/gpu/gpu.hpp
  2. 5
      modules/gpu/src/color.cpp
  3. 3
      modules/gpu/src/error.cpp
  4. 7
      modules/gpu/src/hog.cpp

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

@ -351,8 +351,7 @@ namespace
case CV_XYZ2BGR: case CV_XYZ2RGB: case CV_XYZ2BGR: case CV_XYZ2RGB:
{ {
typedef void (*func_t)(const DevMem2D& src, int srccn, const DevMem2D& dst, int dstcn, typedef void (*func_t)(const DevMem2D& src, int srccn, const DevMem2D& dst, int dstcn, const void* coeffs, cudaStream_t stream);
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}; 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; if (dcn <= 0) dcn = 3;
@ -392,7 +391,7 @@ namespace
dst.create(sz, CV_MAKETYPE(depth, dcn)); 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); funcs[depth](src, scn, dst, dcn, coeffs_i, stream);
break; break;

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

@ -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++) for (size_t i = 0; i < level_scale.size(); i++)
{ {
double scale = level_scale[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; GpuMat smaller_img;
if (sz == img.size()) 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); 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++) for (size_t j = 0; j < locations.size(); j++)
all_candidates.push_back(Rect(Point2d(locations[j]) * scale, all_candidates.push_back(Rect(Point2d((CvPoint)locations[j]) * scale, scaled_win_size));
scaled_win_size));
} }
found_locations.assign(all_candidates.begin(), all_candidates.end()); found_locations.assign(all_candidates.begin(), all_candidates.end());

Loading…
Cancel
Save