Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin 2018-09-10 00:04:29 +03:00
commit dca657a2fd
107 changed files with 492 additions and 485 deletions

View File

@ -103,7 +103,7 @@ bool CalibProcessor::detectAndParseChAruco(const cv::Mat &frame)
return true; return true;
} }
#else #else
(void)frame; CV_UNUSED(frame);
#endif #endif
return false; return false;
} }

View File

@ -254,10 +254,12 @@ find_python(3.4 "${MIN_VER_PYTHON3}" PYTHON3_LIBRARY PYTHON3_INCLUDE_DIR
if(PYTHON_DEFAULT_EXECUTABLE) if(PYTHON_DEFAULT_EXECUTABLE)
set(PYTHON_DEFAULT_AVAILABLE "TRUE") set(PYTHON_DEFAULT_AVAILABLE "TRUE")
elseif(PYTHON2INTERP_FOUND) # Use Python 2 as default Python interpreter elseif(PYTHON2_EXECUTABLE AND PYTHON2INTERP_FOUND)
# Use Python 2 as default Python interpreter
set(PYTHON_DEFAULT_AVAILABLE "TRUE") set(PYTHON_DEFAULT_AVAILABLE "TRUE")
set(PYTHON_DEFAULT_EXECUTABLE "${PYTHON2_EXECUTABLE}") set(PYTHON_DEFAULT_EXECUTABLE "${PYTHON2_EXECUTABLE}")
elseif(PYTHON3INTERP_FOUND) # Use Python 3 as fallback Python interpreter (if there is no Python 2) elseif(PYTHON3_EXECUTABLE AND PYTHON3INTERP_FOUND)
# Use Python 3 as fallback Python interpreter (if there is no Python 2)
set(PYTHON_DEFAULT_AVAILABLE "TRUE") set(PYTHON_DEFAULT_AVAILABLE "TRUE")
set(PYTHON_DEFAULT_EXECUTABLE "${PYTHON3_EXECUTABLE}") set(PYTHON_DEFAULT_EXECUTABLE "${PYTHON3_EXECUTABLE}")
endif() endif()

View File

@ -390,9 +390,9 @@ void CirclesGridClusterFinder::rectifyPatternPoints(const std::vector<cv::Point2
void CirclesGridClusterFinder::parsePatternPoints(const std::vector<cv::Point2f> &patternPoints, const std::vector<cv::Point2f> &rectifiedPatternPoints, std::vector<cv::Point2f> &centers) void CirclesGridClusterFinder::parsePatternPoints(const std::vector<cv::Point2f> &patternPoints, const std::vector<cv::Point2f> &rectifiedPatternPoints, std::vector<cv::Point2f> &centers)
{ {
#ifndef HAVE_OPENCV_FLANN #ifndef HAVE_OPENCV_FLANN
(void)patternPoints; CV_UNUSED(patternPoints);
(void)rectifiedPatternPoints; CV_UNUSED(rectifiedPatternPoints);
(void)centers; CV_UNUSED(centers);
CV_Error(Error::StsNotImplemented, "The desired functionality requires flann module, which was disabled."); CV_Error(Error::StsNotImplemented, "The desired functionality requires flann module, which was disabled.");
#else #else
flann::LinearIndexParams flannIndexParams; flann::LinearIndexParams flannIndexParams;

View File

@ -127,8 +127,8 @@ struct RHO_HEST{
*/ */
virtual inline int ensureCapacity(unsigned N, double beta){ virtual inline int ensureCapacity(unsigned N, double beta){
(void)N; CV_UNUSED(N);
(void)beta; CV_UNUSED(beta);
return 1; return 1;
} }

View File

@ -3062,7 +3062,7 @@ public:
/** @brief Stores algorithm parameters in a file storage /** @brief Stores algorithm parameters in a file storage
*/ */
virtual void write(FileStorage& fs) const { (void)fs; } virtual void write(FileStorage& fs) const { CV_UNUSED(fs); }
/** @brief simplified API for language bindings /** @brief simplified API for language bindings
* @overload * @overload
@ -3071,7 +3071,7 @@ public:
/** @brief Reads algorithm parameters from a file storage /** @brief Reads algorithm parameters from a file storage
*/ */
CV_WRAP virtual void read(const FileNode& fn) { (void)fn; } CV_WRAP virtual void read(const FileNode& fn) { CV_UNUSED(fn); }
/** @brief Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read /** @brief Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
*/ */

View File

@ -276,8 +276,8 @@ namespace cv { namespace cuda { namespace device
static __device__ void reduce(Pointer smem, Reference val, unsigned int tid, Op op) static __device__ void reduce(Pointer smem, Reference val, unsigned int tid, Op op)
{ {
#if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 300 #if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 300
(void) smem; CV_UNUSED(smem);
(void) tid; CV_UNUSED(tid);
Unroll<N / 2, Pointer, Reference, Op>::loopShfl(val, op, N); Unroll<N / 2, Pointer, Reference, Op>::loopShfl(val, op, N);
#else #else

View File

@ -402,9 +402,9 @@ namespace cv { namespace cuda { namespace device
static __device__ void reduce(KP skeys, KR key, VP svals, VR val, unsigned int tid, Cmp cmp) static __device__ void reduce(KP skeys, KR key, VP svals, VR val, unsigned int tid, Cmp cmp)
{ {
#if 0 // __CUDA_ARCH__ >= 300 #if 0 // __CUDA_ARCH__ >= 300
(void) skeys; CV_UNUSED(skeys);
(void) svals; CV_UNUSED(svals);
(void) tid; CV_UNUSED(tid);
Unroll<N / 2, KP, KR, VP, VR, Cmp>::loopShfl(key, val, cmp, N); Unroll<N / 2, KP, KR, VP, VR, Cmp>::loopShfl(key, val, cmp, N);
#else #else

View File

@ -177,8 +177,8 @@ namespace cv { namespace cuda { namespace device
} while (assumed != old); } while (assumed != old);
return __longlong_as_double(old); return __longlong_as_double(old);
#else #else
(void) address; CV_UNUSED(address);
(void) val; CV_UNUSED(val);
return 0.0; return 0.0;
#endif #endif
} }
@ -199,8 +199,8 @@ namespace cv { namespace cuda { namespace device
} while (assumed != old); } while (assumed != old);
return __int_as_float(old); return __int_as_float(old);
#else #else
(void) address; CV_UNUSED(address);
(void) val; CV_UNUSED(val);
return 0.0f; return 0.0f;
#endif #endif
} }
@ -216,8 +216,8 @@ namespace cv { namespace cuda { namespace device
} while (assumed != old); } while (assumed != old);
return __longlong_as_double(old); return __longlong_as_double(old);
#else #else
(void) address; CV_UNUSED(address);
(void) val; CV_UNUSED(val);
return 0.0; return 0.0;
#endif #endif
} }
@ -238,8 +238,8 @@ namespace cv { namespace cuda { namespace device
} while (assumed != old); } while (assumed != old);
return __int_as_float(old); return __int_as_float(old);
#else #else
(void) address; CV_UNUSED(address);
(void) val; CV_UNUSED(val);
return 0.0f; return 0.0f;
#endif #endif
} }
@ -255,8 +255,8 @@ namespace cv { namespace cuda { namespace device
} while (assumed != old); } while (assumed != old);
return __longlong_as_double(old); return __longlong_as_double(old);
#else #else
(void) address; CV_UNUSED(address);
(void) val; CV_UNUSED(val);
return 0.0; return 0.0;
#endif #endif
} }

View File

@ -64,8 +64,8 @@ namespace cv { namespace cuda { namespace device
explicit __host__ __device__ __forceinline__ PointFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f) explicit __host__ __device__ __forceinline__ PointFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f)
: src(src_) : src(src_)
{ {
(void)fx; CV_UNUSED(fx);
(void)fy; CV_UNUSED(fy);
} }
__device__ __forceinline__ elem_type operator ()(float y, float x) const __device__ __forceinline__ elem_type operator ()(float y, float x) const
@ -84,8 +84,8 @@ namespace cv { namespace cuda { namespace device
explicit __host__ __device__ __forceinline__ LinearFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f) explicit __host__ __device__ __forceinline__ LinearFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f)
: src(src_) : src(src_)
{ {
(void)fx; CV_UNUSED(fx);
(void)fy; CV_UNUSED(fy);
} }
__device__ __forceinline__ elem_type operator ()(float y, float x) const __device__ __forceinline__ elem_type operator ()(float y, float x) const
{ {
@ -125,8 +125,8 @@ namespace cv { namespace cuda { namespace device
explicit __host__ __device__ __forceinline__ CubicFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f) explicit __host__ __device__ __forceinline__ CubicFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f)
: src(src_) : src(src_)
{ {
(void)fx; CV_UNUSED(fx);
(void)fy; CV_UNUSED(fy);
} }
static __device__ __forceinline__ float bicubicCoeff(float x_) static __device__ __forceinline__ float bicubicCoeff(float x_)

View File

@ -592,7 +592,7 @@ namespace cv { namespace cuda { namespace device
template <typename T> struct thresh_trunc_func : unary_function<T, T> template <typename T> struct thresh_trunc_func : unary_function<T, T>
{ {
explicit __host__ __device__ __forceinline__ thresh_trunc_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {(void)maxVal_;} explicit __host__ __device__ __forceinline__ thresh_trunc_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {CV_UNUSED(maxVal_);}
__device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const __device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const
{ {
@ -608,7 +608,7 @@ namespace cv { namespace cuda { namespace device
template <typename T> struct thresh_to_zero_func : unary_function<T, T> template <typename T> struct thresh_to_zero_func : unary_function<T, T>
{ {
explicit __host__ __device__ __forceinline__ thresh_to_zero_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {(void)maxVal_;} explicit __host__ __device__ __forceinline__ thresh_to_zero_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {CV_UNUSED(maxVal_);}
__device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const __device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const
{ {
@ -624,7 +624,7 @@ namespace cv { namespace cuda { namespace device
template <typename T> struct thresh_to_zero_inv_func : unary_function<T, T> template <typename T> struct thresh_to_zero_inv_func : unary_function<T, T>
{ {
explicit __host__ __device__ __forceinline__ thresh_to_zero_inv_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {(void)maxVal_;} explicit __host__ __device__ __forceinline__ thresh_to_zero_inv_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {CV_UNUSED(maxVal_);}
__device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const __device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const
{ {

View File

@ -61,7 +61,7 @@ namespace cv { namespace cuda { namespace device
template <ScanKind Kind, typename T, typename F> struct WarpScan template <ScanKind Kind, typename T, typename F> struct WarpScan
{ {
__device__ __forceinline__ WarpScan() {} __device__ __forceinline__ WarpScan() {}
__device__ __forceinline__ WarpScan(const WarpScan& other) { (void)other; } __device__ __forceinline__ WarpScan(const WarpScan& other) { CV_UNUSED(other); }
__device__ __forceinline__ T operator()( volatile T *ptr , const unsigned int idx) __device__ __forceinline__ T operator()( volatile T *ptr , const unsigned int idx)
{ {
@ -95,7 +95,7 @@ namespace cv { namespace cuda { namespace device
template <ScanKind Kind , typename T, typename F> struct WarpScanNoComp template <ScanKind Kind , typename T, typename F> struct WarpScanNoComp
{ {
__device__ __forceinline__ WarpScanNoComp() {} __device__ __forceinline__ WarpScanNoComp() {}
__device__ __forceinline__ WarpScanNoComp(const WarpScanNoComp& other) { (void)other; } __device__ __forceinline__ WarpScanNoComp(const WarpScanNoComp& other) { CV_UNUSED(other); }
__device__ __forceinline__ T operator()( volatile T *ptr , const unsigned int idx) __device__ __forceinline__ T operator()( volatile T *ptr , const unsigned int idx)
{ {
@ -135,7 +135,7 @@ namespace cv { namespace cuda { namespace device
template <ScanKind Kind , typename T, typename Sc, typename F> struct BlockScan template <ScanKind Kind , typename T, typename Sc, typename F> struct BlockScan
{ {
__device__ __forceinline__ BlockScan() {} __device__ __forceinline__ BlockScan() {}
__device__ __forceinline__ BlockScan(const BlockScan& other) { (void)other; } __device__ __forceinline__ BlockScan(const BlockScan& other) { CV_UNUSED(other); }
__device__ __forceinline__ T operator()(volatile T *ptr) __device__ __forceinline__ T operator()(volatile T *ptr)
{ {

View File

@ -124,7 +124,7 @@ struct VZeroUpperGuard {
#endif #endif
inline ~VZeroUpperGuard() { _mm256_zeroupper(); } inline ~VZeroUpperGuard() { _mm256_zeroupper(); }
}; };
#define __CV_AVX_GUARD VZeroUpperGuard __vzeroupper_guard; (void)__vzeroupper_guard; #define __CV_AVX_GUARD VZeroUpperGuard __vzeroupper_guard; CV_UNUSED(__vzeroupper_guard);
#endif #endif
#ifdef __CV_AVX_GUARD #ifdef __CV_AVX_GUARD

View File

@ -75,7 +75,7 @@
#define ARM_ROUND(_value, _asm_string) \ #define ARM_ROUND(_value, _asm_string) \
int res; \ int res; \
float temp; \ float temp; \
(void)temp; \ CV_UNUSED(temp); \
__asm__(_asm_string : [res] "=r" (res), [temp] "=w" (temp) : [value] "w" (_value)); \ __asm__(_asm_string : [res] "=r" (res), [temp] "=w" (temp) : [value] "w" (_value)); \
return res return res
// 2. version for double // 2. version for double

View File

@ -142,7 +142,7 @@ CV_EXPORTS void traceArg(const TraceArg& arg, double value);
static const CV_TRACE_NS::details::Region::LocationStaticStorage \ static const CV_TRACE_NS::details::Region::LocationStaticStorage \
CV__TRACE_LOCATION_VARNAME(loc_id) = { &(CV__TRACE_LOCATION_EXTRA_VARNAME(loc_id)), name, CV_TRACE_FILENAME, __LINE__, flags}; CV__TRACE_LOCATION_VARNAME(loc_id) = { &(CV__TRACE_LOCATION_EXTRA_VARNAME(loc_id)), name, CV_TRACE_FILENAME, __LINE__, flags};
#define CV__TRACE_DEFINE_LOCATION_FN(name, flags) CV__TRACE_DEFINE_LOCATION_(fn, name, (flags | CV_TRACE_NS::details::REGION_FLAG_FUNCTION)) #define CV__TRACE_DEFINE_LOCATION_FN(name, flags) CV__TRACE_DEFINE_LOCATION_(fn, name, ((flags) | CV_TRACE_NS::details::REGION_FLAG_FUNCTION))
#define CV__TRACE_OPENCV_FUNCTION() \ #define CV__TRACE_OPENCV_FUNCTION() \

View File

@ -203,7 +203,7 @@ VSX_FINLINE(rt) fnm(const rg& a, const rg& b) \
#if __GNUG__ < 5 #if __GNUG__ < 5
// vec_xxpermdi in gcc4 missing little-endian supports just like clang // vec_xxpermdi in gcc4 missing little-endian supports just like clang
# define vec_permi(a, b, c) vec_xxpermdi(b, a, (3 ^ ((c & 1) << 1 | c >> 1))) # define vec_permi(a, b, c) vec_xxpermdi(b, a, (3 ^ (((c) & 1) << 1 | (c) >> 1)))
#else #else
# define vec_permi vec_xxpermdi # define vec_permi vec_xxpermdi
#endif // __GNUG__ < 5 #endif // __GNUG__ < 5
@ -320,7 +320,7 @@ VSX_FINLINE(rt) fnm(const rg& a) { return __builtin_convertvector(a, rt); }
# define vec_xxsldwi(a, b, c) vec_sld(a, b, (c) * 4) # define vec_xxsldwi(a, b, c) vec_sld(a, b, (c) * 4)
#else #else
// vec_xxpermdi is missing little-endian supports in clang 4 just like gcc4 // vec_xxpermdi is missing little-endian supports in clang 4 just like gcc4
# define vec_permi(a, b, c) vec_xxpermdi(b, a, (3 ^ ((c & 1) << 1 | c >> 1))) # define vec_permi(a, b, c) vec_xxpermdi(b, a, (3 ^ (((c) & 1) << 1 | (c) >> 1)))
#endif // __clang_major__ < 5 #endif // __clang_major__ < 5
// shift left double by word immediate // shift left double by word immediate
@ -466,7 +466,7 @@ VSX_IMPL_CONV_EVEN_2_4(vec_uint4, vec_double2, vec_ctu, vec_ctuo)
VSX_FINLINE(rt) fnm(const rg& a, int only_truncate) \ VSX_FINLINE(rt) fnm(const rg& a, int only_truncate) \
{ \ { \
assert(only_truncate == 0); \ assert(only_truncate == 0); \
(void)only_truncate; \ CV_UNUSED(only_truncate); \
return fn2(a); \ return fn2(a); \
} }
VSX_IMPL_CONV_2VARIANT(vec_int4, vec_float4, vec_cts, vec_cts) VSX_IMPL_CONV_2VARIANT(vec_int4, vec_float4, vec_cts, vec_cts)

View File

@ -62,7 +62,7 @@ PERF_TEST_P(Size_MatType, Mat_Clone,
TEST_CYCLE() TEST_CYCLE()
{ {
Mat tmp = source.clone(); Mat tmp = source.clone();
(void)tmp; CV_UNUSED(tmp);
} }
destination = source.clone(); destination = source.clone();
@ -90,7 +90,7 @@ PERF_TEST_P(Size_MatType, Mat_Clone_Roi,
TEST_CYCLE() TEST_CYCLE()
{ {
Mat tmp = roi.clone(); Mat tmp = roi.clone();
(void)tmp; CV_UNUSED(tmp);
} }
destination = roi.clone(); destination = roi.clone();

View File

@ -126,7 +126,7 @@ PERF_TEST_P(PerfHamming, norm,
TEST_CYCLE() n = cv::norm(src, normType); TEST_CYCLE() n = cv::norm(src, normType);
(void)n; CV_UNUSED(n);
SANITY_CHECK_NOTHING(); SANITY_CHECK_NOTHING();
} }
@ -150,7 +150,7 @@ PERF_TEST_P(PerfHamming, norm2,
TEST_CYCLE() n = cv::norm(src1, src2, normType); TEST_CYCLE() n = cv::norm(src1, src2, normType);
(void)n; CV_UNUSED(n);
SANITY_CHECK_NOTHING(); SANITY_CHECK_NOTHING();
} }

View File

@ -2502,7 +2502,7 @@ void absdiff64f( const double* src1, size_t step1,
#define CALL_IPP_UN(fun) \ #define CALL_IPP_UN(fun) \
CV_IPP_CHECK() \ CV_IPP_CHECK() \
{ \ { \
fixSteps(width, height, sizeof(dst[0]), step1, step2, step); (void)src2; \ fixSteps(width, height, sizeof(dst[0]), step1, step2, step); CV_UNUSED(src2); \
if (0 <= CV_INSTRUMENT_FUN_IPP(fun, src1, (int)step1, dst, (int)step, ippiSize(width, height))) \ if (0 <= CV_INSTRUMENT_FUN_IPP(fun, src1, (int)step1, dst, (int)step, ippiSize(width, height))) \
{ \ { \
CV_IMPL_ADD(CV_IMPL_IPP); \ CV_IMPL_ADD(CV_IMPL_IPP); \

View File

@ -19,7 +19,7 @@ public:
virtual size_t getReservedSize() const CV_OVERRIDE { return (size_t)-1; } virtual size_t getReservedSize() const CV_OVERRIDE { return (size_t)-1; }
virtual size_t getMaxReservedSize() const CV_OVERRIDE { return (size_t)-1; } virtual size_t getMaxReservedSize() const CV_OVERRIDE { return (size_t)-1; }
virtual void setMaxReservedSize(size_t size) CV_OVERRIDE { (void)size; } virtual void setMaxReservedSize(size_t size) CV_OVERRIDE { CV_UNUSED(size); }
virtual void freeAllReservedBuffers() CV_OVERRIDE { } virtual void freeAllReservedBuffers() CV_OVERRIDE { }
}; };

View File

@ -76,7 +76,7 @@ namespace
} }
__device__ __host__ void deallocate(uchar* ptr, size_t numBytes) CV_OVERRIDE __device__ __host__ void deallocate(uchar* ptr, size_t numBytes) CV_OVERRIDE
{ {
(void)numBytes; CV_UNUSED(numBytes);
#ifndef __CUDA_ARCH__ #ifndef __CUDA_ARCH__
CV_CUDEV_SAFE_CALL(cudaFree(ptr)); CV_CUDEV_SAFE_CALL(cudaFree(ptr));
#endif #endif

View File

@ -345,8 +345,8 @@ void cv::cuda::ensureSizeIsEnough(int rows, int cols, int type, OutputArray arr)
GpuMat cv::cuda::getInputMat(InputArray _src, Stream& stream) GpuMat cv::cuda::getInputMat(InputArray _src, Stream& stream)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) _src; CV_UNUSED(_src);
(void) stream; CV_UNUSED(stream);
throw_no_cuda(); throw_no_cuda();
#else #else
GpuMat src; GpuMat src;
@ -367,11 +367,11 @@ GpuMat cv::cuda::getInputMat(InputArray _src, Stream& stream)
GpuMat cv::cuda::getOutputMat(OutputArray _dst, int rows, int cols, int type, Stream& stream) GpuMat cv::cuda::getOutputMat(OutputArray _dst, int rows, int cols, int type, Stream& stream)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) _dst; CV_UNUSED(_dst);
(void) rows; CV_UNUSED(rows);
(void) cols; CV_UNUSED(cols);
(void) type; CV_UNUSED(type);
(void) stream; CV_UNUSED(stream);
throw_no_cuda(); throw_no_cuda();
#else #else
GpuMat dst; GpuMat dst;
@ -392,9 +392,9 @@ GpuMat cv::cuda::getOutputMat(OutputArray _dst, int rows, int cols, int type, St
void cv::cuda::syncOutput(const GpuMat& dst, OutputArray _dst, Stream& stream) void cv::cuda::syncOutput(const GpuMat& dst, OutputArray _dst, Stream& stream)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) dst; CV_UNUSED(dst);
(void) _dst; CV_UNUSED(_dst);
(void) stream; CV_UNUSED(stream);
throw_no_cuda(); throw_no_cuda();
#else #else
if (_dst.kind() != _InputArray::CUDA_GPU_MAT) if (_dst.kind() != _InputArray::CUDA_GPU_MAT)
@ -416,15 +416,15 @@ GpuMat::Allocator* cv::cuda::GpuMat::defaultAllocator()
void cv::cuda::GpuMat::setDefaultAllocator(Allocator* allocator) void cv::cuda::GpuMat::setDefaultAllocator(Allocator* allocator)
{ {
(void) allocator; CV_UNUSED(allocator);
throw_no_cuda(); throw_no_cuda();
} }
void cv::cuda::GpuMat::create(int _rows, int _cols, int _type) void cv::cuda::GpuMat::create(int _rows, int _cols, int _type)
{ {
(void) _rows; CV_UNUSED(_rows);
(void) _cols; CV_UNUSED(_cols);
(void) _type; CV_UNUSED(_type);
throw_no_cuda(); throw_no_cuda();
} }
@ -434,81 +434,81 @@ void cv::cuda::GpuMat::release()
void cv::cuda::GpuMat::upload(InputArray arr) void cv::cuda::GpuMat::upload(InputArray arr)
{ {
(void) arr; CV_UNUSED(arr);
throw_no_cuda(); throw_no_cuda();
} }
void cv::cuda::GpuMat::upload(InputArray arr, Stream& _stream) void cv::cuda::GpuMat::upload(InputArray arr, Stream& _stream)
{ {
(void) arr; CV_UNUSED(arr);
(void) _stream; CV_UNUSED(_stream);
throw_no_cuda(); throw_no_cuda();
} }
void cv::cuda::GpuMat::download(OutputArray _dst) const void cv::cuda::GpuMat::download(OutputArray _dst) const
{ {
(void) _dst; CV_UNUSED(_dst);
throw_no_cuda(); throw_no_cuda();
} }
void cv::cuda::GpuMat::download(OutputArray _dst, Stream& _stream) const void cv::cuda::GpuMat::download(OutputArray _dst, Stream& _stream) const
{ {
(void) _dst; CV_UNUSED(_dst);
(void) _stream; CV_UNUSED(_stream);
throw_no_cuda(); throw_no_cuda();
} }
void cv::cuda::GpuMat::copyTo(OutputArray _dst) const void cv::cuda::GpuMat::copyTo(OutputArray _dst) const
{ {
(void) _dst; CV_UNUSED(_dst);
throw_no_cuda(); throw_no_cuda();
} }
void cv::cuda::GpuMat::copyTo(OutputArray _dst, Stream& _stream) const void cv::cuda::GpuMat::copyTo(OutputArray _dst, Stream& _stream) const
{ {
(void) _dst; CV_UNUSED(_dst);
(void) _stream; CV_UNUSED(_stream);
throw_no_cuda(); throw_no_cuda();
} }
void cv::cuda::GpuMat::copyTo(OutputArray _dst, InputArray _mask, Stream& _stream) const void cv::cuda::GpuMat::copyTo(OutputArray _dst, InputArray _mask, Stream& _stream) const
{ {
(void) _dst; CV_UNUSED(_dst);
(void) _mask; CV_UNUSED(_mask);
(void) _stream; CV_UNUSED(_stream);
throw_no_cuda(); throw_no_cuda();
} }
GpuMat& cv::cuda::GpuMat::setTo(Scalar s, Stream& _stream) GpuMat& cv::cuda::GpuMat::setTo(Scalar s, Stream& _stream)
{ {
(void) s; CV_UNUSED(s);
(void) _stream; CV_UNUSED(_stream);
throw_no_cuda(); throw_no_cuda();
} }
GpuMat& cv::cuda::GpuMat::setTo(Scalar s, InputArray _mask, Stream& _stream) GpuMat& cv::cuda::GpuMat::setTo(Scalar s, InputArray _mask, Stream& _stream)
{ {
(void) s; CV_UNUSED(s);
(void) _mask; CV_UNUSED(_mask);
(void) _stream; CV_UNUSED(_stream);
throw_no_cuda(); throw_no_cuda();
} }
void cv::cuda::GpuMat::convertTo(OutputArray _dst, int rtype, Stream& _stream) const void cv::cuda::GpuMat::convertTo(OutputArray _dst, int rtype, Stream& _stream) const
{ {
(void) _dst; CV_UNUSED(_dst);
(void) rtype; CV_UNUSED(rtype);
(void) _stream; CV_UNUSED(_stream);
throw_no_cuda(); throw_no_cuda();
} }
void cv::cuda::GpuMat::convertTo(OutputArray _dst, int rtype, double alpha, double beta, Stream& _stream) const void cv::cuda::GpuMat::convertTo(OutputArray _dst, int rtype, double alpha, double beta, Stream& _stream) const
{ {
(void) _dst; CV_UNUSED(_dst);
(void) rtype; CV_UNUSED(rtype);
(void) alpha; CV_UNUSED(alpha);
(void) beta; CV_UNUSED(beta);
(void) _stream; CV_UNUSED(_stream);
throw_no_cuda(); throw_no_cuda();
} }

View File

@ -136,7 +136,7 @@ private:
MatAllocator* cv::cuda::HostMem::getAllocator(AllocType alloc_type) MatAllocator* cv::cuda::HostMem::getAllocator(AllocType alloc_type)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) alloc_type; CV_UNUSED(alloc_type);
throw_no_cuda(); throw_no_cuda();
#else #else
static std::map<unsigned int, Ptr<MatAllocator> > allocators; static std::map<unsigned int, Ptr<MatAllocator> > allocators;
@ -178,9 +178,9 @@ namespace
void cv::cuda::HostMem::create(int rows_, int cols_, int type_) void cv::cuda::HostMem::create(int rows_, int cols_, int type_)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) rows_; CV_UNUSED(rows_);
(void) cols_; CV_UNUSED(cols_);
(void) type_; CV_UNUSED(type_);
throw_no_cuda(); throw_no_cuda();
#else #else
if (alloc_type == SHARED) if (alloc_type == SHARED)
@ -317,7 +317,7 @@ GpuMat cv::cuda::HostMem::createGpuMatHeader() const
void cv::cuda::registerPageLocked(Mat& m) void cv::cuda::registerPageLocked(Mat& m)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) m; CV_UNUSED(m);
throw_no_cuda(); throw_no_cuda();
#else #else
CV_Assert( m.isContinuous() ); CV_Assert( m.isContinuous() );
@ -328,7 +328,7 @@ void cv::cuda::registerPageLocked(Mat& m)
void cv::cuda::unregisterPageLocked(Mat& m) void cv::cuda::unregisterPageLocked(Mat& m)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) m; CV_UNUSED(m);
#else #else
cudaSafeCall( cudaHostUnregister(m.data) ); cudaSafeCall( cudaHostUnregister(m.data) );
#endif #endif

View File

@ -67,7 +67,7 @@ int cv::cuda::getCudaEnabledDeviceCount()
void cv::cuda::setDevice(int device) void cv::cuda::setDevice(int device)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) device; CV_UNUSED(device);
throw_no_cuda(); throw_no_cuda();
#else #else
cudaSafeCall( cudaSetDevice(device) ); cudaSafeCall( cudaSetDevice(device) );
@ -98,7 +98,7 @@ void cv::cuda::resetDevice()
bool cv::cuda::deviceSupports(FeatureSet feature_set) bool cv::cuda::deviceSupports(FeatureSet feature_set)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) feature_set; CV_UNUSED(feature_set);
throw_no_cuda(); throw_no_cuda();
#else #else
static int versions[] = static int versions[] =
@ -227,7 +227,7 @@ namespace
bool cv::cuda::TargetArchs::builtWith(cv::cuda::FeatureSet feature_set) bool cv::cuda::TargetArchs::builtWith(cv::cuda::FeatureSet feature_set)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) feature_set; CV_UNUSED(feature_set);
throw_no_cuda(); throw_no_cuda();
#else #else
return cudaArch.builtWith(feature_set); return cudaArch.builtWith(feature_set);
@ -237,8 +237,8 @@ bool cv::cuda::TargetArchs::builtWith(cv::cuda::FeatureSet feature_set)
bool cv::cuda::TargetArchs::hasPtx(int major, int minor) bool cv::cuda::TargetArchs::hasPtx(int major, int minor)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) major; CV_UNUSED(major);
(void) minor; CV_UNUSED(minor);
throw_no_cuda(); throw_no_cuda();
#else #else
return cudaArch.hasPtx(major, minor); return cudaArch.hasPtx(major, minor);
@ -248,8 +248,8 @@ bool cv::cuda::TargetArchs::hasPtx(int major, int minor)
bool cv::cuda::TargetArchs::hasBin(int major, int minor) bool cv::cuda::TargetArchs::hasBin(int major, int minor)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) major; CV_UNUSED(major);
(void) minor; CV_UNUSED(minor);
throw_no_cuda(); throw_no_cuda();
#else #else
return cudaArch.hasBin(major, minor); return cudaArch.hasBin(major, minor);
@ -259,8 +259,8 @@ bool cv::cuda::TargetArchs::hasBin(int major, int minor)
bool cv::cuda::TargetArchs::hasEqualOrLessPtx(int major, int minor) bool cv::cuda::TargetArchs::hasEqualOrLessPtx(int major, int minor)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) major; CV_UNUSED(major);
(void) minor; CV_UNUSED(minor);
throw_no_cuda(); throw_no_cuda();
#else #else
return cudaArch.hasEqualOrLessPtx(major, minor); return cudaArch.hasEqualOrLessPtx(major, minor);
@ -270,8 +270,8 @@ bool cv::cuda::TargetArchs::hasEqualOrLessPtx(int major, int minor)
bool cv::cuda::TargetArchs::hasEqualOrGreaterPtx(int major, int minor) bool cv::cuda::TargetArchs::hasEqualOrGreaterPtx(int major, int minor)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) major; CV_UNUSED(major);
(void) minor; CV_UNUSED(minor);
throw_no_cuda(); throw_no_cuda();
#else #else
return cudaArch.hasEqualOrGreaterPtx(major, minor); return cudaArch.hasEqualOrGreaterPtx(major, minor);
@ -281,8 +281,8 @@ bool cv::cuda::TargetArchs::hasEqualOrGreaterPtx(int major, int minor)
bool cv::cuda::TargetArchs::hasEqualOrGreaterBin(int major, int minor) bool cv::cuda::TargetArchs::hasEqualOrGreaterBin(int major, int minor)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) major; CV_UNUSED(major);
(void) minor; CV_UNUSED(minor);
throw_no_cuda(); throw_no_cuda();
#else #else
return cudaArch.hasEqualOrGreaterBin(major, minor); return cudaArch.hasEqualOrGreaterBin(major, minor);
@ -827,8 +827,8 @@ int cv::cuda::DeviceInfo::maxThreadsPerMultiProcessor() const
void cv::cuda::DeviceInfo::queryMemory(size_t& _totalMemory, size_t& _freeMemory) const void cv::cuda::DeviceInfo::queryMemory(size_t& _totalMemory, size_t& _freeMemory) const
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) _totalMemory; CV_UNUSED(_totalMemory);
(void) _freeMemory; CV_UNUSED(_freeMemory);
throw_no_cuda(); throw_no_cuda();
#else #else
int prevDeviceID = getDevice(); int prevDeviceID = getDevice();
@ -894,7 +894,7 @@ namespace
void cv::cuda::printCudaDeviceInfo(int device) void cv::cuda::printCudaDeviceInfo(int device)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) device; CV_UNUSED(device);
throw_no_cuda(); throw_no_cuda();
#else #else
int count = getCudaEnabledDeviceCount(); int count = getCudaEnabledDeviceCount();
@ -980,7 +980,7 @@ void cv::cuda::printCudaDeviceInfo(int device)
void cv::cuda::printShortCudaDeviceInfo(int device) void cv::cuda::printShortCudaDeviceInfo(int device)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) device; CV_UNUSED(device);
throw_no_cuda(); throw_no_cuda();
#else #else
int count = getCudaEnabledDeviceCount(); int count = getCudaEnabledDeviceCount();
@ -1194,7 +1194,7 @@ namespace
String cv::cuda::getNppErrorMessage(int code) String cv::cuda::getNppErrorMessage(int code)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) code; CV_UNUSED(code);
return String(); return String();
#else #else
return getErrorString(code, npp_errors, npp_error_num); return getErrorString(code, npp_errors, npp_error_num);
@ -1204,7 +1204,7 @@ String cv::cuda::getNppErrorMessage(int code)
String cv::cuda::getCudaDriverApiErrorMessage(int code) String cv::cuda::getCudaDriverApiErrorMessage(int code)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) code; CV_UNUSED(code);
return String(); return String();
#else #else
return getErrorString(code, cu_errors, cu_errors_num); return getErrorString(code, cu_errors, cu_errors_num);

View File

@ -267,7 +267,7 @@ class cv::cuda::Stream::Impl
public: public:
Impl(void* ptr = 0) Impl(void* ptr = 0)
{ {
(void) ptr; CV_UNUSED(ptr);
throw_no_cuda(); throw_no_cuda();
} }
}; };
@ -439,7 +439,7 @@ cv::cuda::Stream::Stream()
cv::cuda::Stream::Stream(const Ptr<GpuMat::Allocator>& allocator) cv::cuda::Stream::Stream(const Ptr<GpuMat::Allocator>& allocator)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) allocator; CV_UNUSED(allocator);
throw_no_cuda(); throw_no_cuda();
#else #else
impl_ = makePtr<Impl>(allocator); impl_ = makePtr<Impl>(allocator);
@ -473,7 +473,7 @@ void cv::cuda::Stream::waitForCompletion()
void cv::cuda::Stream::waitEvent(const Event& event) void cv::cuda::Stream::waitEvent(const Event& event)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) event; CV_UNUSED(event);
throw_no_cuda(); throw_no_cuda();
#else #else
cudaSafeCall( cudaStreamWaitEvent(impl_->stream, EventAccessor::getEvent(event), 0) ); cudaSafeCall( cudaStreamWaitEvent(impl_->stream, EventAccessor::getEvent(event), 0) );
@ -505,13 +505,13 @@ namespace
void cv::cuda::Stream::enqueueHostCallback(StreamCallback callback, void* userData) void cv::cuda::Stream::enqueueHostCallback(StreamCallback callback, void* userData)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) callback; CV_UNUSED(callback);
(void) userData; CV_UNUSED(userData);
throw_no_cuda(); throw_no_cuda();
#else #else
#if CUDART_VERSION < 5000 #if CUDART_VERSION < 5000
(void) callback; CV_UNUSED(callback);
(void) userData; CV_UNUSED(userData);
CV_Error(cv::Error::StsNotImplemented, "This function requires CUDA >= 5.0"); CV_Error(cv::Error::StsNotImplemented, "This function requires CUDA >= 5.0");
#else #else
CallbackData* data = new CallbackData(callback, userData); CallbackData* data = new CallbackData(callback, userData);
@ -658,7 +658,7 @@ namespace
void cv::cuda::setBufferPoolUsage(bool on) void cv::cuda::setBufferPoolUsage(bool on)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void)on; CV_UNUSED(on);
throw_no_cuda(); throw_no_cuda();
#else #else
enableMemoryPool = on; enableMemoryPool = on;
@ -668,9 +668,9 @@ void cv::cuda::setBufferPoolUsage(bool on)
void cv::cuda::setBufferPoolConfig(int deviceId, size_t stackSize, int stackCount) void cv::cuda::setBufferPoolConfig(int deviceId, size_t stackSize, int stackCount)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void)deviceId; CV_UNUSED(deviceId);
(void)stackSize; CV_UNUSED(stackSize);
(void)stackCount; CV_UNUSED(stackCount);
throw_no_cuda(); throw_no_cuda();
#else #else
const int currentDevice = getDevice(); const int currentDevice = getDevice();
@ -698,7 +698,7 @@ void cv::cuda::setBufferPoolConfig(int deviceId, size_t stackSize, int stackCoun
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
cv::cuda::BufferPool::BufferPool(Stream& stream) cv::cuda::BufferPool::BufferPool(Stream& stream)
{ {
(void) stream; CV_UNUSED(stream);
throw_no_cuda(); throw_no_cuda();
} }
#else #else
@ -710,9 +710,9 @@ cv::cuda::BufferPool::BufferPool(Stream& stream) : allocator_(stream.impl_->allo
GpuMat cv::cuda::BufferPool::getBuffer(int rows, int cols, int type) GpuMat cv::cuda::BufferPool::getBuffer(int rows, int cols, int type)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) rows; CV_UNUSED(rows);
(void) cols; CV_UNUSED(cols);
(void) type; CV_UNUSED(type);
throw_no_cuda(); throw_no_cuda();
#else #else
GpuMat buf(allocator_); GpuMat buf(allocator_);
@ -782,7 +782,7 @@ Event cv::cuda::EventAccessor::wrapEvent(cudaEvent_t event)
cv::cuda::Event::Event(CreateFlags flags) cv::cuda::Event::Event(CreateFlags flags)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) flags; CV_UNUSED(flags);
throw_no_cuda(); throw_no_cuda();
#else #else
impl_ = makePtr<Impl>(flags); impl_ = makePtr<Impl>(flags);
@ -792,7 +792,7 @@ cv::cuda::Event::Event(CreateFlags flags)
void cv::cuda::Event::record(Stream& stream) void cv::cuda::Event::record(Stream& stream)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) stream; CV_UNUSED(stream);
throw_no_cuda(); throw_no_cuda();
#else #else
cudaSafeCall( cudaEventRecord(impl_->event, StreamAccessor::getStream(stream)) ); cudaSafeCall( cudaEventRecord(impl_->event, StreamAccessor::getStream(stream)) );
@ -826,8 +826,8 @@ void cv::cuda::Event::waitForCompletion()
float cv::cuda::Event::elapsedTime(const Event& start, const Event& end) float cv::cuda::Event::elapsedTime(const Event& start, const Event& end)
{ {
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) start; CV_UNUSED(start);
(void) end; CV_UNUSED(end);
throw_no_cuda(); throw_no_cuda();
#else #else
float ms; float ms;

View File

@ -61,7 +61,7 @@ namespace cv { namespace directx {
int getTypeFromDXGI_FORMAT(const int iDXGI_FORMAT) int getTypeFromDXGI_FORMAT(const int iDXGI_FORMAT)
{ {
(void)iDXGI_FORMAT; CV_UNUSED(iDXGI_FORMAT);
#if !defined(HAVE_DIRECTX) #if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR; NO_DIRECTX_SUPPORT_ERROR;
#else #else
@ -179,7 +179,7 @@ int getTypeFromDXGI_FORMAT(const int iDXGI_FORMAT)
int getTypeFromD3DFORMAT(const int iD3DFORMAT) int getTypeFromD3DFORMAT(const int iD3DFORMAT)
{ {
(void)iD3DFORMAT; CV_UNUSED(iD3DFORMAT);
#if !defined(HAVE_DIRECTX) #if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR; NO_DIRECTX_SUPPORT_ERROR;
#else #else
@ -242,7 +242,7 @@ static bool g_isDirect3DDevice9Ex = false; // Direct3DDevice9Ex or Direct3DDevic
Context& initializeContextFromD3D11Device(ID3D11Device* pD3D11Device) Context& initializeContextFromD3D11Device(ID3D11Device* pD3D11Device)
{ {
(void)pD3D11Device; CV_UNUSED(pD3D11Device);
#if !defined(HAVE_DIRECTX) #if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR; NO_DIRECTX_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL) #elif !defined(HAVE_OPENCL)
@ -350,7 +350,7 @@ Context& initializeContextFromD3D11Device(ID3D11Device* pD3D11Device)
Context& initializeContextFromD3D10Device(ID3D10Device* pD3D10Device) Context& initializeContextFromD3D10Device(ID3D10Device* pD3D10Device)
{ {
(void)pD3D10Device; CV_UNUSED(pD3D10Device);
#if !defined(HAVE_DIRECTX) #if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR; NO_DIRECTX_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL) #elif !defined(HAVE_OPENCL)
@ -458,7 +458,7 @@ Context& initializeContextFromD3D10Device(ID3D10Device* pD3D10Device)
Context& initializeContextFromDirect3DDevice9Ex(IDirect3DDevice9Ex* pDirect3DDevice9Ex) Context& initializeContextFromDirect3DDevice9Ex(IDirect3DDevice9Ex* pDirect3DDevice9Ex)
{ {
(void)pDirect3DDevice9Ex; CV_UNUSED(pDirect3DDevice9Ex);
#if !defined(HAVE_DIRECTX) #if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR; NO_DIRECTX_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL) #elif !defined(HAVE_OPENCL)
@ -568,7 +568,7 @@ Context& initializeContextFromDirect3DDevice9Ex(IDirect3DDevice9Ex* pDirect3DDev
Context& initializeContextFromDirect3DDevice9(IDirect3DDevice9* pDirect3DDevice9) Context& initializeContextFromDirect3DDevice9(IDirect3DDevice9* pDirect3DDevice9)
{ {
(void)pDirect3DDevice9; CV_UNUSED(pDirect3DDevice9);
#if !defined(HAVE_DIRECTX) #if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR; NO_DIRECTX_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL) #elif !defined(HAVE_OPENCL)
@ -764,7 +764,7 @@ namespace directx {
void convertToD3D11Texture2D(InputArray src, ID3D11Texture2D* pD3D11Texture2D) void convertToD3D11Texture2D(InputArray src, ID3D11Texture2D* pD3D11Texture2D)
{ {
(void)src; (void)pD3D11Texture2D; CV_UNUSED(src); CV_UNUSED(pD3D11Texture2D);
#if !defined(HAVE_DIRECTX) #if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR; NO_DIRECTX_SUPPORT_ERROR;
#elif defined(HAVE_OPENCL) #elif defined(HAVE_OPENCL)
@ -873,7 +873,7 @@ void convertToD3D11Texture2D(InputArray src, ID3D11Texture2D* pD3D11Texture2D)
void convertFromD3D11Texture2D(ID3D11Texture2D* pD3D11Texture2D, OutputArray dst) void convertFromD3D11Texture2D(ID3D11Texture2D* pD3D11Texture2D, OutputArray dst)
{ {
(void)pD3D11Texture2D; (void)dst; CV_UNUSED(pD3D11Texture2D); CV_UNUSED(dst);
#if !defined(HAVE_DIRECTX) #if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR; NO_DIRECTX_SUPPORT_ERROR;
#elif defined(HAVE_OPENCL) #elif defined(HAVE_OPENCL)
@ -1004,7 +1004,7 @@ static void __OpenCLinitializeD3D10()
void convertToD3D10Texture2D(InputArray src, ID3D10Texture2D* pD3D10Texture2D) void convertToD3D10Texture2D(InputArray src, ID3D10Texture2D* pD3D10Texture2D)
{ {
(void)src; (void)pD3D10Texture2D; CV_UNUSED(src); CV_UNUSED(pD3D10Texture2D);
#if !defined(HAVE_DIRECTX) #if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR; NO_DIRECTX_SUPPORT_ERROR;
#elif defined(HAVE_OPENCL) #elif defined(HAVE_OPENCL)
@ -1065,7 +1065,7 @@ void convertToD3D10Texture2D(InputArray src, ID3D10Texture2D* pD3D10Texture2D)
} }
void convertFromD3D10Texture2D(ID3D10Texture2D* pD3D10Texture2D, OutputArray dst) void convertFromD3D10Texture2D(ID3D10Texture2D* pD3D10Texture2D, OutputArray dst)
{ {
(void)pD3D10Texture2D; (void)dst; CV_UNUSED(pD3D10Texture2D); CV_UNUSED(dst);
#if !defined(HAVE_DIRECTX) #if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR; NO_DIRECTX_SUPPORT_ERROR;
#elif defined(HAVE_OPENCL) #elif defined(HAVE_OPENCL)
@ -1152,7 +1152,7 @@ static void __OpenCLinitializeD3D9()
void convertToDirect3DSurface9(InputArray src, IDirect3DSurface9* pDirect3DSurface9, void* surfaceSharedHandle) void convertToDirect3DSurface9(InputArray src, IDirect3DSurface9* pDirect3DSurface9, void* surfaceSharedHandle)
{ {
(void)src; (void)pDirect3DSurface9; (void)surfaceSharedHandle; CV_UNUSED(src); CV_UNUSED(pDirect3DSurface9); CV_UNUSED(surfaceSharedHandle);
#if !defined(HAVE_DIRECTX) #if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR; NO_DIRECTX_SUPPORT_ERROR;
#elif defined(HAVE_OPENCL) #elif defined(HAVE_OPENCL)
@ -1220,7 +1220,7 @@ void convertToDirect3DSurface9(InputArray src, IDirect3DSurface9* pDirect3DSurfa
void convertFromDirect3DSurface9(IDirect3DSurface9* pDirect3DSurface9, OutputArray dst, void* surfaceSharedHandle) void convertFromDirect3DSurface9(IDirect3DSurface9* pDirect3DSurface9, OutputArray dst, void* surfaceSharedHandle)
{ {
(void)pDirect3DSurface9; (void)dst; (void)surfaceSharedHandle; CV_UNUSED(pDirect3DSurface9); CV_UNUSED(dst); CV_UNUSED(surfaceSharedHandle);
#if !defined(HAVE_DIRECTX) #if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR; NO_DIRECTX_SUPPORT_ERROR;
#elif defined(HAVE_OPENCL) #elif defined(HAVE_OPENCL)

View File

@ -160,7 +160,7 @@ static bool isDir(const cv::String& path, DIR* dir)
return status && ((attributes & FILE_ATTRIBUTE_DIRECTORY) != 0); return status && ((attributes & FILE_ATTRIBUTE_DIRECTORY) != 0);
#else #else
(void)dir; CV_UNUSED(dir);
struct stat stat_buf; struct stat stat_buf;
if (0 != stat( path.c_str(), &stat_buf)) if (0 != stat( path.c_str(), &stat_buf))
return false; return false;

View File

@ -118,7 +118,7 @@ void MatAllocator::copy(UMatData* usrc, UMatData* udst, int dims, const size_t s
BufferPoolController* MatAllocator::getBufferPoolController(const char* id) const BufferPoolController* MatAllocator::getBufferPoolController(const char* id) const
{ {
(void)id; CV_UNUSED(id);
static DummyBufferPoolController dummy; static DummyBufferPoolController dummy;
return &dummy; return &dummy;
} }

View File

@ -190,7 +190,7 @@ void traceOpenCLCheck(cl_int status, const char* message)
CV_OCL_TRACE_CHECK_RESULT(check_result, msg); \ CV_OCL_TRACE_CHECK_RESULT(check_result, msg); \
if (check_result != CL_SUCCESS) \ if (check_result != CL_SUCCESS) \
{ \ { \
if (0) { const char* msg_ = (msg); (void)msg_; /* ensure const char* type (cv::String without c_str()) */ } \ if (0) { const char* msg_ = (msg); CV_UNUSED(msg_); /* ensure const char* type (cv::String without c_str()) */ } \
cv::String error_msg = CV_OCL_API_ERROR_MSG(check_result, msg); \ cv::String error_msg = CV_OCL_API_ERROR_MSG(check_result, msg); \
CV_Error(Error::OpenCLApiCallError, error_msg); \ CV_Error(Error::OpenCLApiCallError, error_msg); \
} \ } \
@ -210,7 +210,7 @@ void traceOpenCLCheck(cl_int status, const char* message)
CV_OCL_TRACE_CHECK_RESULT(check_result, msg); \ CV_OCL_TRACE_CHECK_RESULT(check_result, msg); \
if (check_result != CL_SUCCESS && isRaiseError()) \ if (check_result != CL_SUCCESS && isRaiseError()) \
{ \ { \
if (0) { const char* msg_ = (msg); (void)msg_; /* ensure const char* type (cv::String without c_str()) */ } \ if (0) { const char* msg_ = (msg); CV_UNUSED(msg_); /* ensure const char* type (cv::String without c_str()) */ } \
cv::String error_msg = CV_OCL_API_ERROR_MSG(check_result, msg); \ cv::String error_msg = CV_OCL_API_ERROR_MSG(check_result, msg); \
CV_Error(Error::OpenCLApiCallError, error_msg); \ CV_Error(Error::OpenCLApiCallError, error_msg); \
} \ } \

View File

@ -104,11 +104,11 @@ namespace
void cv::cuda::setGlDevice(int device) void cv::cuda::setGlDevice(int device)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) device; CV_UNUSED(device);
throw_no_ogl(); throw_no_ogl();
#else #else
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) device; CV_UNUSED(device);
throw_no_cuda(); throw_no_cuda();
#else #else
cudaSafeCall( cudaGLSetGLDevice(device) ); cudaSafeCall( cudaGLSetGLDevice(device) );
@ -214,7 +214,7 @@ namespace
CV_DbgAssert( resource_ != 0 ); CV_DbgAssert( resource_ != 0 );
GraphicsMapHolder h(&resource_, stream); GraphicsMapHolder h(&resource_, stream);
(void) h; CV_UNUSED(h);
void* dst; void* dst;
size_t size; size_t size;
@ -233,7 +233,7 @@ namespace
CV_DbgAssert( resource_ != 0 ); CV_DbgAssert( resource_ != 0 );
GraphicsMapHolder h(&resource_, stream); GraphicsMapHolder h(&resource_, stream);
(void) h; CV_UNUSED(h);
void* src; void* src;
size_t size; size_t size;
@ -456,11 +456,11 @@ cv::ogl::Buffer::Buffer() : rows_(0), cols_(0), type_(0)
cv::ogl::Buffer::Buffer(int arows, int acols, int atype, unsigned int abufId, bool autoRelease) : rows_(0), cols_(0), type_(0) cv::ogl::Buffer::Buffer(int arows, int acols, int atype, unsigned int abufId, bool autoRelease) : rows_(0), cols_(0), type_(0)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) arows; CV_UNUSED(arows);
(void) acols; CV_UNUSED(acols);
(void) atype; CV_UNUSED(atype);
(void) abufId; CV_UNUSED(abufId);
(void) autoRelease; CV_UNUSED(autoRelease);
throw_no_ogl(); throw_no_ogl();
#else #else
impl_.reset(new Impl(abufId, autoRelease)); impl_.reset(new Impl(abufId, autoRelease));
@ -473,10 +473,10 @@ cv::ogl::Buffer::Buffer(int arows, int acols, int atype, unsigned int abufId, bo
cv::ogl::Buffer::Buffer(Size asize, int atype, unsigned int abufId, bool autoRelease) : rows_(0), cols_(0), type_(0) cv::ogl::Buffer::Buffer(Size asize, int atype, unsigned int abufId, bool autoRelease) : rows_(0), cols_(0), type_(0)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) asize; CV_UNUSED(asize);
(void) atype; CV_UNUSED(atype);
(void) abufId; CV_UNUSED(abufId);
(void) autoRelease; CV_UNUSED(autoRelease);
throw_no_ogl(); throw_no_ogl();
#else #else
impl_.reset(new Impl(abufId, autoRelease)); impl_.reset(new Impl(abufId, autoRelease));
@ -489,9 +489,9 @@ cv::ogl::Buffer::Buffer(Size asize, int atype, unsigned int abufId, bool autoRel
cv::ogl::Buffer::Buffer(InputArray arr, Target target, bool autoRelease) : rows_(0), cols_(0), type_(0) cv::ogl::Buffer::Buffer(InputArray arr, Target target, bool autoRelease) : rows_(0), cols_(0), type_(0)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) arr; CV_UNUSED(arr);
(void) target; CV_UNUSED(target);
(void) autoRelease; CV_UNUSED(autoRelease);
throw_no_ogl(); throw_no_ogl();
#else #else
const int kind = arr.kind(); const int kind = arr.kind();
@ -521,11 +521,11 @@ cv::ogl::Buffer::Buffer(InputArray arr, Target target, bool autoRelease) : rows_
void cv::ogl::Buffer::create(int arows, int acols, int atype, Target target, bool autoRelease) void cv::ogl::Buffer::create(int arows, int acols, int atype, Target target, bool autoRelease)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) arows; CV_UNUSED(arows);
(void) acols; CV_UNUSED(acols);
(void) atype; CV_UNUSED(atype);
(void) target; CV_UNUSED(target);
(void) autoRelease; CV_UNUSED(autoRelease);
throw_no_ogl(); throw_no_ogl();
#else #else
if (rows_ != arows || cols_ != acols || type_ != atype) if (rows_ != arows || cols_ != acols || type_ != atype)
@ -554,7 +554,7 @@ void cv::ogl::Buffer::release()
void cv::ogl::Buffer::setAutoRelease(bool flag) void cv::ogl::Buffer::setAutoRelease(bool flag)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) flag; CV_UNUSED(flag);
throw_no_ogl(); throw_no_ogl();
#else #else
impl_->setAutoRelease(flag); impl_->setAutoRelease(flag);
@ -564,9 +564,9 @@ void cv::ogl::Buffer::setAutoRelease(bool flag)
void cv::ogl::Buffer::copyFrom(InputArray arr, Target target, bool autoRelease) void cv::ogl::Buffer::copyFrom(InputArray arr, Target target, bool autoRelease)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) arr; CV_UNUSED(arr);
(void) target; CV_UNUSED(target);
(void) autoRelease; CV_UNUSED(autoRelease);
throw_no_ogl(); throw_no_ogl();
#else #else
const int kind = arr.kind(); const int kind = arr.kind();
@ -609,17 +609,17 @@ void cv::ogl::Buffer::copyFrom(InputArray arr, Target target, bool autoRelease)
void cv::ogl::Buffer::copyFrom(InputArray arr, cuda::Stream& stream, Target target, bool autoRelease) void cv::ogl::Buffer::copyFrom(InputArray arr, cuda::Stream& stream, Target target, bool autoRelease)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) arr; CV_UNUSED(arr);
(void) stream; CV_UNUSED(stream);
(void) target; CV_UNUSED(target);
(void) autoRelease; CV_UNUSED(autoRelease);
throw_no_ogl(); throw_no_ogl();
#else #else
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) arr; CV_UNUSED(arr);
(void) stream; CV_UNUSED(stream);
(void) target; CV_UNUSED(target);
(void) autoRelease; CV_UNUSED(autoRelease);
throw_no_cuda(); throw_no_cuda();
#else #else
GpuMat dmat = arr.getGpuMat(); GpuMat dmat = arr.getGpuMat();
@ -634,7 +634,7 @@ void cv::ogl::Buffer::copyFrom(InputArray arr, cuda::Stream& stream, Target targ
void cv::ogl::Buffer::copyTo(OutputArray arr) const void cv::ogl::Buffer::copyTo(OutputArray arr) const
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) arr; CV_UNUSED(arr);
throw_no_ogl(); throw_no_ogl();
#else #else
const int kind = arr.kind(); const int kind = arr.kind();
@ -674,13 +674,13 @@ void cv::ogl::Buffer::copyTo(OutputArray arr) const
void cv::ogl::Buffer::copyTo(OutputArray arr, cuda::Stream& stream) const void cv::ogl::Buffer::copyTo(OutputArray arr, cuda::Stream& stream) const
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) arr; CV_UNUSED(arr);
(void) stream; CV_UNUSED(stream);
throw_no_ogl(); throw_no_ogl();
#else #else
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) arr; CV_UNUSED(arr);
(void) stream; CV_UNUSED(stream);
throw_no_cuda(); throw_no_cuda();
#else #else
arr.create(rows_, cols_, type_); arr.create(rows_, cols_, type_);
@ -693,8 +693,8 @@ void cv::ogl::Buffer::copyTo(OutputArray arr, cuda::Stream& stream) const
cv::ogl::Buffer cv::ogl::Buffer::clone(Target target, bool autoRelease) const cv::ogl::Buffer cv::ogl::Buffer::clone(Target target, bool autoRelease) const
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) target; CV_UNUSED(target);
(void) autoRelease; CV_UNUSED(autoRelease);
throw_no_ogl(); throw_no_ogl();
#else #else
ogl::Buffer buf; ogl::Buffer buf;
@ -706,7 +706,7 @@ cv::ogl::Buffer cv::ogl::Buffer::clone(Target target, bool autoRelease) const
void cv::ogl::Buffer::bind(Target target) const void cv::ogl::Buffer::bind(Target target) const
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) target; CV_UNUSED(target);
throw_no_ogl(); throw_no_ogl();
#else #else
impl_->bind(target); impl_->bind(target);
@ -716,7 +716,7 @@ void cv::ogl::Buffer::bind(Target target) const
void cv::ogl::Buffer::unbind(Target target) void cv::ogl::Buffer::unbind(Target target)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) target; CV_UNUSED(target);
throw_no_ogl(); throw_no_ogl();
#else #else
gl::BindBuffer(target, 0); gl::BindBuffer(target, 0);
@ -727,7 +727,7 @@ void cv::ogl::Buffer::unbind(Target target)
Mat cv::ogl::Buffer::mapHost(Access access) Mat cv::ogl::Buffer::mapHost(Access access)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) access; CV_UNUSED(access);
throw_no_ogl(); throw_no_ogl();
#else #else
return Mat(rows_, cols_, type_, impl_->mapHost(access)); return Mat(rows_, cols_, type_, impl_->mapHost(access));
@ -772,11 +772,11 @@ void cv::ogl::Buffer::unmapDevice()
cuda::GpuMat cv::ogl::Buffer::mapDevice(cuda::Stream& stream) cuda::GpuMat cv::ogl::Buffer::mapDevice(cuda::Stream& stream)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) stream; CV_UNUSED(stream);
throw_no_ogl(); throw_no_ogl();
#else #else
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) stream; CV_UNUSED(stream);
throw_no_cuda(); throw_no_cuda();
#else #else
return GpuMat(rows_, cols_, type_, impl_->mapDevice(cuda::StreamAccessor::getStream(stream))); return GpuMat(rows_, cols_, type_, impl_->mapDevice(cuda::StreamAccessor::getStream(stream)));
@ -787,11 +787,11 @@ cuda::GpuMat cv::ogl::Buffer::mapDevice(cuda::Stream& stream)
void cv::ogl::Buffer::unmapDevice(cuda::Stream& stream) void cv::ogl::Buffer::unmapDevice(cuda::Stream& stream)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) stream; CV_UNUSED(stream);
throw_no_ogl(); throw_no_ogl();
#else #else
#ifndef HAVE_CUDA #ifndef HAVE_CUDA
(void) stream; CV_UNUSED(stream);
throw_no_cuda(); throw_no_cuda();
#else #else
impl_->unmapDevice(cuda::StreamAccessor::getStream(stream)); impl_->unmapDevice(cuda::StreamAccessor::getStream(stream));
@ -933,11 +933,11 @@ cv::ogl::Texture2D::Texture2D() : rows_(0), cols_(0), format_(NONE)
cv::ogl::Texture2D::Texture2D(int arows, int acols, Format aformat, unsigned int atexId, bool autoRelease) : rows_(0), cols_(0), format_(NONE) cv::ogl::Texture2D::Texture2D(int arows, int acols, Format aformat, unsigned int atexId, bool autoRelease) : rows_(0), cols_(0), format_(NONE)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) arows; CV_UNUSED(arows);
(void) acols; CV_UNUSED(acols);
(void) aformat; CV_UNUSED(aformat);
(void) atexId; CV_UNUSED(atexId);
(void) autoRelease; CV_UNUSED(autoRelease);
throw_no_ogl(); throw_no_ogl();
#else #else
impl_.reset(new Impl(atexId, autoRelease)); impl_.reset(new Impl(atexId, autoRelease));
@ -950,10 +950,10 @@ cv::ogl::Texture2D::Texture2D(int arows, int acols, Format aformat, unsigned int
cv::ogl::Texture2D::Texture2D(Size asize, Format aformat, unsigned int atexId, bool autoRelease) : rows_(0), cols_(0), format_(NONE) cv::ogl::Texture2D::Texture2D(Size asize, Format aformat, unsigned int atexId, bool autoRelease) : rows_(0), cols_(0), format_(NONE)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) asize; CV_UNUSED(asize);
(void) aformat; CV_UNUSED(aformat);
(void) atexId; CV_UNUSED(atexId);
(void) autoRelease; CV_UNUSED(autoRelease);
throw_no_ogl(); throw_no_ogl();
#else #else
impl_.reset(new Impl(atexId, autoRelease)); impl_.reset(new Impl(atexId, autoRelease));
@ -966,8 +966,8 @@ cv::ogl::Texture2D::Texture2D(Size asize, Format aformat, unsigned int atexId, b
cv::ogl::Texture2D::Texture2D(InputArray arr, bool autoRelease) : rows_(0), cols_(0), format_(NONE) cv::ogl::Texture2D::Texture2D(InputArray arr, bool autoRelease) : rows_(0), cols_(0), format_(NONE)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) arr; CV_UNUSED(arr);
(void) autoRelease; CV_UNUSED(autoRelease);
throw_no_ogl(); throw_no_ogl();
#else #else
const int kind = arr.kind(); const int kind = arr.kind();
@ -1036,10 +1036,10 @@ cv::ogl::Texture2D::Texture2D(InputArray arr, bool autoRelease) : rows_(0), cols
void cv::ogl::Texture2D::create(int arows, int acols, Format aformat, bool autoRelease) void cv::ogl::Texture2D::create(int arows, int acols, Format aformat, bool autoRelease)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) arows; CV_UNUSED(arows);
(void) acols; CV_UNUSED(acols);
(void) aformat; CV_UNUSED(aformat);
(void) autoRelease; CV_UNUSED(autoRelease);
throw_no_ogl(); throw_no_ogl();
#else #else
if (rows_ != arows || cols_ != acols || format_ != aformat) if (rows_ != arows || cols_ != acols || format_ != aformat)
@ -1068,7 +1068,7 @@ void cv::ogl::Texture2D::release()
void cv::ogl::Texture2D::setAutoRelease(bool flag) void cv::ogl::Texture2D::setAutoRelease(bool flag)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) flag; CV_UNUSED(flag);
throw_no_ogl(); throw_no_ogl();
#else #else
impl_->setAutoRelease(flag); impl_->setAutoRelease(flag);
@ -1078,8 +1078,8 @@ void cv::ogl::Texture2D::setAutoRelease(bool flag)
void cv::ogl::Texture2D::copyFrom(InputArray arr, bool autoRelease) void cv::ogl::Texture2D::copyFrom(InputArray arr, bool autoRelease)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) arr; CV_UNUSED(arr);
(void) autoRelease; CV_UNUSED(autoRelease);
throw_no_ogl(); throw_no_ogl();
#else #else
const int kind = arr.kind(); const int kind = arr.kind();
@ -1145,9 +1145,9 @@ void cv::ogl::Texture2D::copyFrom(InputArray arr, bool autoRelease)
void cv::ogl::Texture2D::copyTo(OutputArray arr, int ddepth, bool autoRelease) const void cv::ogl::Texture2D::copyTo(OutputArray arr, int ddepth, bool autoRelease) const
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) arr; CV_UNUSED(arr);
(void) ddepth; CV_UNUSED(ddepth);
(void) autoRelease; CV_UNUSED(autoRelease);
throw_no_ogl(); throw_no_ogl();
#else #else
const int kind = arr.kind(); const int kind = arr.kind();
@ -1400,9 +1400,9 @@ void cv::ogl::Arrays::bind() const
void cv::ogl::render(const ogl::Texture2D& tex, Rect_<double> wndRect, Rect_<double> texRect) void cv::ogl::render(const ogl::Texture2D& tex, Rect_<double> wndRect, Rect_<double> texRect)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) tex; CV_UNUSED(tex);
(void) wndRect; CV_UNUSED(wndRect);
(void) texRect; CV_UNUSED(texRect);
throw_no_ogl(); throw_no_ogl();
#else #else
if (!tex.empty()) if (!tex.empty())
@ -1472,9 +1472,9 @@ void cv::ogl::render(const ogl::Texture2D& tex, Rect_<double> wndRect, Rect_<dou
void cv::ogl::render(const ogl::Arrays& arr, int mode, Scalar color) void cv::ogl::render(const ogl::Arrays& arr, int mode, Scalar color)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) arr; CV_UNUSED(arr);
(void) mode; CV_UNUSED(mode);
(void) color; CV_UNUSED(color);
throw_no_ogl(); throw_no_ogl();
#else #else
if (!arr.empty()) if (!arr.empty())
@ -1491,10 +1491,10 @@ void cv::ogl::render(const ogl::Arrays& arr, int mode, Scalar color)
void cv::ogl::render(const ogl::Arrays& arr, InputArray indices, int mode, Scalar color) void cv::ogl::render(const ogl::Arrays& arr, InputArray indices, int mode, Scalar color)
{ {
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) arr; CV_UNUSED(arr);
(void) indices; CV_UNUSED(indices);
(void) mode; CV_UNUSED(mode);
(void) color; CV_UNUSED(color);
throw_no_ogl(); throw_no_ogl();
#else #else
if (!arr.empty() && !indices.empty()) if (!arr.empty() && !indices.empty())
@ -1688,7 +1688,7 @@ Context& initializeContextFromGL()
void convertToGLTexture2D(InputArray src, Texture2D& texture) void convertToGLTexture2D(InputArray src, Texture2D& texture)
{ {
(void)src; (void)texture; CV_UNUSED(src); CV_UNUSED(texture);
#if !defined(HAVE_OPENGL) #if !defined(HAVE_OPENGL)
NO_OPENGL_SUPPORT_ERROR; NO_OPENGL_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL) #elif !defined(HAVE_OPENCL)
@ -1742,7 +1742,7 @@ void convertToGLTexture2D(InputArray src, Texture2D& texture)
void convertFromGLTexture2D(const Texture2D& texture, OutputArray dst) void convertFromGLTexture2D(const Texture2D& texture, OutputArray dst)
{ {
(void)texture; (void)dst; CV_UNUSED(texture); CV_UNUSED(dst);
#if !defined(HAVE_OPENGL) #if !defined(HAVE_OPENGL)
NO_OPENGL_SUPPORT_ERROR; NO_OPENGL_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL) #elif !defined(HAVE_OPENCL)
@ -1803,7 +1803,7 @@ void convertFromGLTexture2D(const Texture2D& texture, OutputArray dst)
//void mapGLBuffer(const Buffer& buffer, UMat& dst, int accessFlags) //void mapGLBuffer(const Buffer& buffer, UMat& dst, int accessFlags)
UMat mapGLBuffer(const Buffer& buffer, int accessFlags) UMat mapGLBuffer(const Buffer& buffer, int accessFlags)
{ {
(void)buffer; (void)accessFlags; CV_UNUSED(buffer); CV_UNUSED(accessFlags);
#if !defined(HAVE_OPENGL) #if !defined(HAVE_OPENGL)
NO_OPENGL_SUPPORT_ERROR; NO_OPENGL_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL) #elif !defined(HAVE_OPENCL)
@ -1855,7 +1855,7 @@ UMat mapGLBuffer(const Buffer& buffer, int accessFlags)
void unmapGLBuffer(UMat& u) void unmapGLBuffer(UMat& u)
{ {
(void)u; CV_UNUSED(u);
#if !defined(HAVE_OPENGL) #if !defined(HAVE_OPENGL)
NO_OPENGL_SUPPORT_ERROR; NO_OPENGL_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL) #elif !defined(HAVE_OPENCL)

View File

@ -518,7 +518,7 @@ void cv::parallel_for_(const cv::Range& range, const cv::ParallelLoopBody& body,
else // nested parallel_for_() calls are not parallelized else // nested parallel_for_() calls are not parallelized
#endif // CV_PARALLEL_FRAMEWORK #endif // CV_PARALLEL_FRAMEWORK
{ {
(void)nstripes; CV_UNUSED(nstripes);
body(range); body(range);
} }
} }
@ -680,7 +680,7 @@ unsigned defaultNumberOfThreads()
void cv::setNumThreads( int threads_ ) void cv::setNumThreads( int threads_ )
{ {
(void)threads_; CV_UNUSED(threads_);
#ifdef CV_PARALLEL_FRAMEWORK #ifdef CV_PARALLEL_FRAMEWORK
int threads = (threads_ < 0) ? defaultNumberOfThreads() : (unsigned)threads_; int threads = (threads_ < 0) ? defaultNumberOfThreads() : (unsigned)threads_;
numThreads = threads; numThreads = threads;

View File

@ -200,7 +200,7 @@ struct NoVec
size_t operator()(const void*, const void*, void*, size_t) const { return 0; } size_t operator()(const void*, const void*, void*, size_t) const { return 0; }
}; };
#define CV_SPLIT_MERGE_MAX_BLOCK_SIZE(cn) ((INT_MAX/4)/cn) // HAL implementation accepts 'int' len, so INT_MAX doesn't work here #define CV_SPLIT_MERGE_MAX_BLOCK_SIZE(cn) ((INT_MAX/4)/(cn)) // HAL implementation accepts 'int' len, so INT_MAX doesn't work here
enum { BLOCK_SIZE = 1024 }; enum { BLOCK_SIZE = 1024 };

View File

@ -2141,7 +2141,7 @@ void setUseIPP(bool flag)
#ifdef HAVE_IPP #ifdef HAVE_IPP
data->useIPP = (getIPPSingleton().useIPP)?flag:false; data->useIPP = (getIPPSingleton().useIPP)?flag:false;
#else #else
(void)flag; CV_UNUSED(flag);
data->useIPP = false; data->useIPP = false;
#endif #endif
} }
@ -2166,7 +2166,7 @@ void setUseIPP_NE(bool flag)
#ifdef HAVE_IPP #ifdef HAVE_IPP
data->useIPP_NE = (getIPPSingleton().useIPP_NE)?flag:false; data->useIPP_NE = (getIPPSingleton().useIPP_NE)?flag:false;
#else #else
(void)flag; CV_UNUSED(flag);
data->useIPP_NE = false; data->useIPP_NE = false;
#endif #endif
} }

View File

@ -892,7 +892,7 @@ bool TraceManager::isActivated()
if (!isInitialized) if (!isInitialized)
{ {
TraceManager& m = getTraceManager(); TraceManager& m = getTraceManager();
(void)m; // TODO CV_UNUSED(m); // TODO
} }
return activated; return activated;

View File

@ -122,7 +122,7 @@ UMatData::~UMatData()
} }
} }
#else #else
(void)showWarn; CV_UNUSED(showWarn);
#endif #endif
originalUMatData = NULL; originalUMatData = NULL;
} }

View File

@ -46,7 +46,7 @@ namespace ocl {
Context& initializeContextFromVA(VADisplay display, bool tryInterop) Context& initializeContextFromVA(VADisplay display, bool tryInterop)
{ {
(void)display; (void)tryInterop; CV_UNUSED(display); CV_UNUSED(tryInterop);
#if !defined(HAVE_VA) #if !defined(HAVE_VA)
NO_VA_SUPPORT_ERROR; NO_VA_SUPPORT_ERROR;
#else // !HAVE_VA #else // !HAVE_VA
@ -485,7 +485,7 @@ static void copy_convert_bgr_to_yv12(const VAImage& image, const Mat& bgr, unsig
void convertToVASurface(VADisplay display, InputArray src, VASurfaceID surface, Size size) void convertToVASurface(VADisplay display, InputArray src, VASurfaceID surface, Size size)
{ {
(void)display; (void)src; (void)surface; (void)size; CV_UNUSED(display); CV_UNUSED(src); CV_UNUSED(surface); CV_UNUSED(size);
#if !defined(HAVE_VA) #if !defined(HAVE_VA)
NO_VA_SUPPORT_ERROR; NO_VA_SUPPORT_ERROR;
#else // !HAVE_VA #else // !HAVE_VA
@ -589,7 +589,7 @@ void convertToVASurface(VADisplay display, InputArray src, VASurfaceID surface,
void convertFromVASurface(VADisplay display, VASurfaceID surface, Size size, OutputArray dst) void convertFromVASurface(VADisplay display, VASurfaceID surface, Size size, OutputArray dst)
{ {
(void)display; (void)surface; (void)dst; (void)size; CV_UNUSED(display); CV_UNUSED(surface); CV_UNUSED(dst); CV_UNUSED(size);
#if !defined(HAVE_VA) #if !defined(HAVE_VA)
NO_VA_SUPPORT_ERROR; NO_VA_SUPPORT_ERROR;
#else // !HAVE_VA #else // !HAVE_VA

View File

@ -793,7 +793,7 @@ CxCore_MulSpectrumsTest::CxCore_MulSpectrumsTest() : CxCore_DXTBaseTest( true, t
double CxCore_MulSpectrumsTest::get_success_error_level( int test_case_idx, int i, int j ) double CxCore_MulSpectrumsTest::get_success_error_level( int test_case_idx, int i, int j )
{ {
(void)test_case_idx; CV_UNUSED(test_case_idx);
CV_Assert(i == OUTPUT); CV_Assert(i == OUTPUT);
CV_Assert(j == 0); CV_Assert(j == 0);
int elem_depth = CV_MAT_DEPTH(cvGetElemType(test_array[i][j])); int elem_depth = CV_MAT_DEPTH(cvGetElemType(test_array[i][j]));

View File

@ -157,14 +157,14 @@ namespace
void cv::cuda::gemm(InputArray _src1, InputArray _src2, double alpha, InputArray _src3, double beta, OutputArray _dst, int flags, Stream& stream) void cv::cuda::gemm(InputArray _src1, InputArray _src2, double alpha, InputArray _src3, double beta, OutputArray _dst, int flags, Stream& stream)
{ {
#ifndef HAVE_CUBLAS #ifndef HAVE_CUBLAS
(void) _src1; CV_UNUSED(_src1);
(void) _src2; CV_UNUSED(_src2);
(void) alpha; CV_UNUSED(alpha);
(void) _src3; CV_UNUSED(_src3);
(void) beta; CV_UNUSED(beta);
(void) _dst; CV_UNUSED(_dst);
(void) flags; CV_UNUSED(flags);
(void) stream; CV_UNUSED(stream);
CV_Error(Error::StsNotImplemented, "The library was build without CUBLAS"); CV_Error(Error::StsNotImplemented, "The library was build without CUBLAS");
#else #else
// CUBLAS works with column-major matrices // CUBLAS works with column-major matrices
@ -420,8 +420,8 @@ namespace
Ptr<DFT> cv::cuda::createDFT(Size dft_size, int flags) Ptr<DFT> cv::cuda::createDFT(Size dft_size, int flags)
{ {
#ifndef HAVE_CUFFT #ifndef HAVE_CUFFT
(void) dft_size; CV_UNUSED(dft_size);
(void) flags; CV_UNUSED(flags);
CV_Error(Error::StsNotImplemented, "The library was build without CUFFT"); CV_Error(Error::StsNotImplemented, "The library was build without CUFFT");
return Ptr<DFT>(); return Ptr<DFT>();
#else #else
@ -571,7 +571,7 @@ namespace
Ptr<Convolution> cv::cuda::createConvolution(Size user_block_size) Ptr<Convolution> cv::cuda::createConvolution(Size user_block_size)
{ {
#ifndef HAVE_CUFFT #ifndef HAVE_CUFFT
(void) user_block_size; CV_UNUSED(user_block_size);
CV_Error(Error::StsNotImplemented, "The library was build without CUFFT"); CV_Error(Error::StsNotImplemented, "The library was build without CUFFT");
return Ptr<Convolution>(); return Ptr<Convolution>();
#else #else

View File

@ -126,7 +126,7 @@ namespace
void bitScalar(const GpuMat& src, cv::Scalar value, bool, GpuMat& dst, const GpuMat& mask, double, Stream& stream, int op) void bitScalar(const GpuMat& src, cv::Scalar value, bool, GpuMat& dst, const GpuMat& mask, double, Stream& stream, int op)
{ {
(void) mask; CV_UNUSED(mask);
typedef void (*func_t)(const GpuMat& src, cv::Scalar value, GpuMat& dst, Stream& stream); typedef void (*func_t)(const GpuMat& src, cv::Scalar value, GpuMat& dst, Stream& stream);
static const func_t funcs[3][6][4] = static const func_t funcs[3][6][4] =

View File

@ -121,7 +121,7 @@ namespace
void cv::cuda::mulSpectrums(InputArray _src1, InputArray _src2, OutputArray _dst, int flags, bool conjB, Stream& stream) void cv::cuda::mulSpectrums(InputArray _src1, InputArray _src2, OutputArray _dst, int flags, bool conjB, Stream& stream)
{ {
(void) flags; CV_UNUSED(flags);
GpuMat src1 = getInputMat(_src1, stream); GpuMat src1 = getInputMat(_src1, stream);
GpuMat src2 = getInputMat(_src2, stream); GpuMat src2 = getInputMat(_src2, stream);
@ -141,7 +141,7 @@ void cv::cuda::mulSpectrums(InputArray _src1, InputArray _src2, OutputArray _dst
void cv::cuda::mulAndScaleSpectrums(InputArray _src1, InputArray _src2, OutputArray _dst, int flags, float scale, bool conjB, Stream& stream) void cv::cuda::mulAndScaleSpectrums(InputArray _src1, InputArray _src2, OutputArray _dst, int flags, float scale, bool conjB, Stream& stream)
{ {
(void) flags; CV_UNUSED(flags);
GpuMat src1 = getInputMat(_src1, stream); GpuMat src1 = getInputMat(_src1, stream);
GpuMat src2 = getInputMat(_src2, stream); GpuMat src2 = getInputMat(_src2, stream);

View File

@ -794,14 +794,14 @@ namespace
void EncoderCallBackFFMPEG::onBeginFrame(int frameNumber, PicType picType) void EncoderCallBackFFMPEG::onBeginFrame(int frameNumber, PicType picType)
{ {
(void) frameNumber; CV_UNUSED(frameNumber);
isKeyFrame_ = (picType == IFRAME); isKeyFrame_ = (picType == IFRAME);
} }
void EncoderCallBackFFMPEG::onEndFrame(int frameNumber, PicType picType) void EncoderCallBackFFMPEG::onEndFrame(int frameNumber, PicType picType)
{ {
(void) frameNumber; CV_UNUSED(frameNumber);
(void) picType; CV_UNUSED(picType);
} }
} }

View File

@ -63,8 +63,8 @@ namespace cv { namespace cuda { namespace device
float* s_distance, int* s_trainIdx) float* s_distance, int* s_trainIdx)
{ {
#if __CUDA_ARCH__ >= 300 #if __CUDA_ARCH__ >= 300
(void) s_distance; CV_UNUSED(s_distance);
(void) s_trainIdx; CV_UNUSED(s_trainIdx);
float d1, d2; float d1, d2;
int i1, i2; int i1, i2;
@ -174,9 +174,9 @@ namespace cv { namespace cuda { namespace device
float* s_distance, int* s_trainIdx, int* s_imgIdx) float* s_distance, int* s_trainIdx, int* s_imgIdx)
{ {
#if __CUDA_ARCH__ >= 300 #if __CUDA_ARCH__ >= 300
(void) s_distance; CV_UNUSED(s_distance);
(void) s_trainIdx; CV_UNUSED(s_trainIdx);
(void) s_imgIdx; CV_UNUSED(s_imgIdx);
float d1, d2; float d1, d2;
int i1, i2; int i1, i2;

View File

@ -1812,9 +1812,9 @@ namespace
void RGBA_to_mBGRA(InputArray _src, OutputArray _dst, int, Stream& _stream) void RGBA_to_mBGRA(InputArray _src, OutputArray _dst, int, Stream& _stream)
{ {
#if (CUDA_VERSION < 5000) #if (CUDA_VERSION < 5000)
(void) _src; CV_UNUSED(_src);
(void) _dst; CV_UNUSED(_dst);
(void) _stream; CV_UNUSED(_stream);
CV_Error( Error::StsBadFlag, "Unknown/unsupported color conversion code" ); CV_Error( Error::StsBadFlag, "Unknown/unsupported color conversion code" );
#else #else
GpuMat src = _src.getGpuMat(); GpuMat src = _src.getGpuMat();
@ -2212,10 +2212,10 @@ void cv::cuda::swapChannels(InputOutputArray _image, const int dstOrder[4], Stre
void cv::cuda::gammaCorrection(InputArray _src, OutputArray _dst, bool forward, Stream& stream) void cv::cuda::gammaCorrection(InputArray _src, OutputArray _dst, bool forward, Stream& stream)
{ {
#if (CUDA_VERSION < 5000) #if (CUDA_VERSION < 5000)
(void) _src; CV_UNUSED(_src);
(void) _dst; CV_UNUSED(_dst);
(void) forward; CV_UNUSED(forward);
(void) stream; CV_UNUSED(stream);
CV_Error(Error::StsNotImplemented, "This function works only with CUDA 5.0 or higher"); CV_Error(Error::StsNotImplemented, "This function works only with CUDA 5.0 or higher");
#else #else
typedef NppStatus (*func_t)(const Npp8u* pSrc, int nSrcStep, Npp8u* pDst, int nDstStep, NppiSize oSizeROI); typedef NppStatus (*func_t)(const Npp8u* pSrc, int nSrcStep, Npp8u* pDst, int nDstStep, NppiSize oSizeROI);

View File

@ -201,8 +201,8 @@ namespace
void GeneralizedHoughBase::setTemplateImpl(InputArray templ, Point templCenter) void GeneralizedHoughBase::setTemplateImpl(InputArray templ, Point templCenter)
{ {
#ifndef HAVE_OPENCV_CUDAFILTERS #ifndef HAVE_OPENCV_CUDAFILTERS
(void) templ; CV_UNUSED(templ);
(void) templCenter; CV_UNUSED(templCenter);
throw_no_cuda(); throw_no_cuda();
#else #else
calcEdges(templ, templEdges_, templDx_, templDy_); calcEdges(templ, templEdges_, templDx_, templDy_);
@ -239,9 +239,9 @@ namespace
void GeneralizedHoughBase::detectImpl(InputArray image, OutputArray positions, OutputArray votes) void GeneralizedHoughBase::detectImpl(InputArray image, OutputArray positions, OutputArray votes)
{ {
#ifndef HAVE_OPENCV_CUDAFILTERS #ifndef HAVE_OPENCV_CUDAFILTERS
(void) image; CV_UNUSED(image);
(void) positions; CV_UNUSED(positions);
(void) votes; CV_UNUSED(votes);
throw_no_cuda(); throw_no_cuda();
#else #else
calcEdges(image, imageEdges_, imageDx_, imageDy_); calcEdges(image, imageEdges_, imageDx_, imageDy_);

View File

@ -158,7 +158,7 @@ namespace
void HoughCirclesDetectorImpl::detect(InputArray _src, OutputArray circles, Stream& stream) void HoughCirclesDetectorImpl::detect(InputArray _src, OutputArray circles, Stream& stream)
{ {
// TODO : implement async version // TODO : implement async version
(void) stream; CV_UNUSED(stream);
using namespace cv::cuda::device::hough; using namespace cv::cuda::device::hough;
using namespace cv::cuda::device::hough_circles; using namespace cv::cuda::device::hough_circles;

View File

@ -129,7 +129,7 @@ namespace
void HoughLinesDetectorImpl::detect(InputArray _src, OutputArray lines, Stream& stream) void HoughLinesDetectorImpl::detect(InputArray _src, OutputArray lines, Stream& stream)
{ {
// TODO : implement async version // TODO : implement async version
(void) stream; CV_UNUSED(stream);
using namespace cv::cuda::device::hough; using namespace cv::cuda::device::hough;
using namespace cv::cuda::device::hough_lines; using namespace cv::cuda::device::hough_lines;

View File

@ -132,7 +132,7 @@ namespace
void HoughSegmentDetectorImpl::detect(InputArray _src, OutputArray lines, Stream& stream) void HoughSegmentDetectorImpl::detect(InputArray _src, OutputArray lines, Stream& stream)
{ {
// TODO : implement async version // TODO : implement async version
(void) stream; CV_UNUSED(stream);
using namespace cv::cuda::device::hough; using namespace cv::cuda::device::hough;
using namespace cv::cuda::device::hough_lines; using namespace cv::cuda::device::hough_lines;

View File

@ -494,12 +494,12 @@ public:
virtual NCVStatus alloc(NCVMemSegment &seg, size_t size); virtual NCVStatus alloc(NCVMemSegment &seg, size_t size);
virtual NCVStatus dealloc(NCVMemSegment &seg); virtual NCVStatus dealloc(NCVMemSegment &seg);
virtual NcvBool isInitialized(void) const; virtual NcvBool isInitialized() const;
virtual NcvBool isCounting(void) const; virtual NcvBool isCounting() const;
virtual NCVMemoryType memType(void) const; virtual NCVMemoryType memType() const;
virtual Ncv32u alignment(void) const; virtual Ncv32u alignment() const;
virtual size_t maxSize(void) const; virtual size_t maxSize() const;
private: private:
@ -527,12 +527,12 @@ public:
virtual NCVStatus alloc(NCVMemSegment &seg, size_t size); virtual NCVStatus alloc(NCVMemSegment &seg, size_t size);
virtual NCVStatus dealloc(NCVMemSegment &seg); virtual NCVStatus dealloc(NCVMemSegment &seg);
virtual NcvBool isInitialized(void) const; virtual NcvBool isInitialized() const;
virtual NcvBool isCounting(void) const; virtual NcvBool isCounting() const;
virtual NCVMemoryType memType(void) const; virtual NCVMemoryType memType() const;
virtual Ncv32u alignment(void) const; virtual Ncv32u alignment() const;
virtual size_t maxSize(void) const; virtual size_t maxSize() const;
private: private:

View File

@ -738,10 +738,10 @@ struct RectConvert
static void groupRectangles(std::vector<NcvRect32u> &hypotheses, int groupThreshold, double eps, std::vector<Ncv32u> *weights) static void groupRectangles(std::vector<NcvRect32u> &hypotheses, int groupThreshold, double eps, std::vector<Ncv32u> *weights)
{ {
#ifndef HAVE_OPENCV_OBJDETECT #ifndef HAVE_OPENCV_OBJDETECT
(void) hypotheses; CV_UNUSED(hypotheses);
(void) groupThreshold; CV_UNUSED(groupThreshold);
(void) eps; CV_UNUSED(eps);
(void) weights; CV_UNUSED(weights);
CV_Error(cv::Error::StsNotImplemented, "This functionality requires objdetect module"); CV_Error(cv::Error::StsNotImplemented, "This functionality requires objdetect module");
#else #else
std::vector<cv::Rect> rects(hypotheses.size()); std::vector<cv::Rect> rects(hypotheses.size());

View File

@ -213,7 +213,7 @@ void cv::cuda::solvePnPRansac(const Mat& object, const Mat& image, const Mat& ca
int num_iters, float max_dist, int min_inlier_count, int num_iters, float max_dist, int min_inlier_count,
std::vector<int>* inliers) std::vector<int>* inliers)
{ {
(void)min_inlier_count; CV_UNUSED(min_inlier_count);
CV_Assert(object.rows == 1 && object.cols > 0 && object.type() == CV_32FC3); CV_Assert(object.rows == 1 && object.cols > 0 && object.type() == CV_32FC3);
CV_Assert(image.rows == 1 && image.cols > 0 && image.type() == CV_32FC2); CV_Assert(image.rows == 1 && image.cols > 0 && image.type() == CV_32FC2);
CV_Assert(object.cols == image.cols); CV_Assert(object.cols == image.cols);

View File

@ -127,7 +127,7 @@ static NCVStatus drawRectsWrapperDevice(T *d_dst,
T color, T color,
cudaStream_t cuStream) cudaStream_t cuStream)
{ {
(void)cuStream; CV_UNUSED(cuStream);
ncvAssertReturn(d_dst != NULL && d_rects != NULL, NCV_NULL_PTR); ncvAssertReturn(d_dst != NULL && d_rects != NULL, NCV_NULL_PTR);
ncvAssertReturn(dstWidth > 0 && dstHeight > 0, NCV_DIMENSIONS_INVALID); ncvAssertReturn(dstWidth > 0 && dstHeight > 0, NCV_DIMENSIONS_INVALID);
ncvAssertReturn(dstStride >= dstWidth, NCV_INVALID_STEP); ncvAssertReturn(dstStride >= dstWidth, NCV_INVALID_STEP);

View File

@ -714,7 +714,7 @@ struct applyHaarClassifierAnchorParallelFunctor
template<class TList> template<class TList>
void call(TList tl) void call(TList tl)
{ {
(void)tl; CV_UNUSED(tl);
applyHaarClassifierAnchorParallel < applyHaarClassifierAnchorParallel <
Loki::TL::TypeAt<TList, 0>::Result::value, Loki::TL::TypeAt<TList, 0>::Result::value,
Loki::TL::TypeAt<TList, 1>::Result::value, Loki::TL::TypeAt<TList, 1>::Result::value,
@ -824,7 +824,7 @@ struct applyHaarClassifierClassifierParallelFunctor
template<class TList> template<class TList>
void call(TList tl) void call(TList tl)
{ {
(void)tl; CV_UNUSED(tl);
applyHaarClassifierClassifierParallel < applyHaarClassifierClassifierParallel <
Loki::TL::TypeAt<TList, 0>::Result::value, Loki::TL::TypeAt<TList, 0>::Result::value,
Loki::TL::TypeAt<TList, 1>::Result::value, Loki::TL::TypeAt<TList, 1>::Result::value,
@ -905,7 +905,7 @@ struct initializeMaskVectorFunctor
template<class TList> template<class TList>
void call(TList tl) void call(TList tl)
{ {
(void)tl; CV_UNUSED(tl);
initializeMaskVector < initializeMaskVector <
Loki::TL::TypeAt<TList, 0>::Result::value, Loki::TL::TypeAt<TList, 0>::Result::value,
Loki::TL::TypeAt<TList, 1>::Result::value > Loki::TL::TypeAt<TList, 1>::Result::value >
@ -2113,11 +2113,11 @@ static NCVStatus loadFromXML(const cv::String &filename,
std::vector<HaarFeature64> &haarFeatures) std::vector<HaarFeature64> &haarFeatures)
{ {
#ifndef HAVE_OPENCV_OBJDETECT #ifndef HAVE_OPENCV_OBJDETECT
(void) filename; CV_UNUSED(filename);
(void) haar; CV_UNUSED(haar);
(void) haarStages; CV_UNUSED(haarStages);
(void) haarClassifierNodes; CV_UNUSED(haarClassifierNodes);
(void) haarFeatures; CV_UNUSED(haarFeatures);
CV_Error(cv::Error::StsNotImplemented, "This functionality requires objdetect module"); CV_Error(cv::Error::StsNotImplemented, "This functionality requires objdetect module");
return NCV_HAAR_XML_LOADING_EXCEPTION; return NCV_HAAR_XML_LOADING_EXCEPTION;
#else #else

View File

@ -212,7 +212,7 @@ namespace NCVRuntimeTemplateBool
static void call(Func &functor, std::vector<int> &templateParams) static void call(Func &functor, std::vector<int> &templateParams)
{ {
(void)templateParams; CV_UNUSED(templateParams);
functor.call(TList()); functor.call(TList());
} }
}; };

View File

@ -498,7 +498,7 @@ namespace cv { namespace cuda { namespace device
void labelComponents(const PtrStepSzb& edges, PtrStepSzi comps, int flags, cudaStream_t stream) void labelComponents(const PtrStepSzb& edges, PtrStepSzi comps, int flags, cudaStream_t stream)
{ {
(void) flags; CV_UNUSED(flags);
dim3 block(CTA_SIZE_X, CTA_SIZE_Y); dim3 block(CTA_SIZE_X, CTA_SIZE_Y);
dim3 grid(divUp(edges.cols, TILE_COLS), divUp(edges.rows, TILE_ROWS)); dim3 grid(divUp(edges.cols, TILE_COLS), divUp(edges.rows, TILE_ROWS));

View File

@ -231,7 +231,7 @@ namespace
void GMGImpl::getBackgroundImage(OutputArray backgroundImage) const void GMGImpl::getBackgroundImage(OutputArray backgroundImage) const
{ {
(void) backgroundImage; CV_UNUSED(backgroundImage);
CV_Error(Error::StsNotImplemented, "Not implemented"); CV_Error(Error::StsNotImplemented, "Not implemented");
} }

View File

@ -265,7 +265,7 @@ bool TestHaarCascadeApplication::process()
{ {
// calculations here // calculations here
FpuControl fpu; FpuControl fpu;
(void) fpu; CV_UNUSED(fpu);
ncvStat = ncvApplyHaarClassifierCascade_host( ncvStat = ncvApplyHaarClassifierCascade_host(
h_integralImage, h_rectStdDev, h_pixelMask, h_integralImage, h_rectStdDev, h_pixelMask,

View File

@ -271,7 +271,7 @@ void generateHaarLoaderTests(NCVAutoTestLister &testLister)
void generateHaarApplicationTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<Ncv8u> &src, void generateHaarApplicationTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<Ncv8u> &src,
Ncv32u maxWidth, Ncv32u maxHeight) Ncv32u maxWidth, Ncv32u maxHeight)
{ {
(void)maxHeight; CV_UNUSED(maxHeight);
for (Ncv32u i=100; i<512; i+=41) for (Ncv32u i=100; i<512; i+=41)
{ {
for (Ncv32u j=100; j<128; j+=25) for (Ncv32u j=100; j<128; j+=25)
@ -292,7 +292,7 @@ void generateHaarApplicationTests(NCVAutoTestLister &testLister, NCVTestSourcePr
static void devNullOutput(const cv::String& msg) static void devNullOutput(const cv::String& msg)
{ {
(void)msg; CV_UNUSED(msg);
} }
} }

View File

@ -731,7 +731,7 @@ namespace cv { namespace cuda { namespace device
bool correct_gamma, bool correct_gamma,
const cudaStream_t& stream) const cudaStream_t& stream)
{ {
(void)nbins; CV_UNUSED(nbins);
const int nthreads = 256; const int nthreads = 256;
dim3 bdim(nthreads, 1); dim3 bdim(nthreads, 1);
@ -806,7 +806,7 @@ namespace cv { namespace cuda { namespace device
bool correct_gamma, bool correct_gamma,
const cudaStream_t& stream) const cudaStream_t& stream)
{ {
(void)nbins; CV_UNUSED(nbins);
const int nthreads = 256; const int nthreads = 256;
dim3 bdim(nthreads, 1); dim3 bdim(nthreads, 1);

View File

@ -89,7 +89,7 @@ namespace pyrlk
{ {
static __host__ __forceinline__ void bindTexture_(PtrStepSz<typename TypeVec<T, cn>::vec_type> I) static __host__ __forceinline__ void bindTexture_(PtrStepSz<typename TypeVec<T, cn>::vec_type> I)
{ {
(void)I; CV_UNUSED(I);
} }
}; };
@ -112,7 +112,7 @@ namespace pyrlk
} }
static __host__ __forceinline__ void bindTexture_(PtrStepSz<ushort>& I) static __host__ __forceinline__ void bindTexture_(PtrStepSz<ushort>& I)
{ {
(void)I; CV_UNUSED(I);
} }
}; };
template <> struct Tex_I<1, int> template <> struct Tex_I<1, int>
@ -123,7 +123,7 @@ namespace pyrlk
} }
static __host__ __forceinline__ void bindTexture_(PtrStepSz<int>& I) static __host__ __forceinline__ void bindTexture_(PtrStepSz<int>& I)
{ {
(void)I; CV_UNUSED(I);
} }
}; };
template <> struct Tex_I<1, float> template <> struct Tex_I<1, float>
@ -146,7 +146,7 @@ namespace pyrlk
} }
static __host__ __forceinline__ void bindTexture_(PtrStepSz<uchar3> I) static __host__ __forceinline__ void bindTexture_(PtrStepSz<uchar3> I)
{ {
(void)I; CV_UNUSED(I);
} }
}; };
template <> struct Tex_I<3, ushort> template <> struct Tex_I<3, ushort>
@ -157,7 +157,7 @@ namespace pyrlk
} }
static __host__ __forceinline__ void bindTexture_(PtrStepSz<ushort3> I) static __host__ __forceinline__ void bindTexture_(PtrStepSz<ushort3> I)
{ {
(void)I; CV_UNUSED(I);
} }
}; };
template <> struct Tex_I<3, int> template <> struct Tex_I<3, int>
@ -168,7 +168,7 @@ namespace pyrlk
} }
static __host__ __forceinline__ void bindTexture_(PtrStepSz<int3> I) static __host__ __forceinline__ void bindTexture_(PtrStepSz<int3> I)
{ {
(void)I; CV_UNUSED(I);
} }
}; };
template <> struct Tex_I<3, float> template <> struct Tex_I<3, float>
@ -179,7 +179,7 @@ namespace pyrlk
} }
static __host__ __forceinline__ void bindTexture_(PtrStepSz<float3> I) static __host__ __forceinline__ void bindTexture_(PtrStepSz<float3> I)
{ {
(void)I; CV_UNUSED(I);
} }
}; };
// ****************** 4 channel specializations ************************ // ****************** 4 channel specializations ************************
@ -222,7 +222,7 @@ namespace pyrlk
{ {
static __host__ __forceinline__ void bindTexture_(PtrStepSz<typename TypeVec<T,cn>::vec_type>& J) static __host__ __forceinline__ void bindTexture_(PtrStepSz<typename TypeVec<T,cn>::vec_type>& J)
{ {
(void)J; CV_UNUSED(J);
} }
}; };
template <> struct Tex_J<1, uchar> template <> struct Tex_J<1, uchar>
@ -757,8 +757,8 @@ namespace pyrlk
int level, dim3 block, cudaStream_t stream) int level, dim3 block, cudaStream_t stream)
{ {
dim3 grid(ptcount); dim3 grid(ptcount);
(void)I; CV_UNUSED(I);
(void)J; CV_UNUSED(J);
if (level == 0 && err) if (level == 0 && err)
sparseKernel<cn, PATCH_X, PATCH_Y, true, T> <<<grid, block, 0, stream >>>(prevPts, nextPts, status, err, level, rows, cols); sparseKernel<cn, PATCH_X, PATCH_Y, true, T> <<<grid, block, 0, stream >>>(prevPts, nextPts, status, err, level, rows, cols);
else else

View File

@ -89,9 +89,9 @@ namespace cv { namespace cuda { namespace device
{ {
static void call(PtrStepSz<T> src, PtrStepSz<T> srcWhole, int xoff, int yoff, PtrStepSzf mapx, PtrStepSzf mapy, PtrStepSz<T> dst, const float* borderValue, bool) static void call(PtrStepSz<T> src, PtrStepSz<T> srcWhole, int xoff, int yoff, PtrStepSzf mapx, PtrStepSzf mapy, PtrStepSz<T> dst, const float* borderValue, bool)
{ {
(void)srcWhole; CV_UNUSED(srcWhole);
(void)xoff; CV_UNUSED(xoff);
(void)yoff; CV_UNUSED(yoff);
typedef typename TypeVec<float, VecTraits<T>::cn>::vec_type work_type; typedef typename TypeVec<float, VecTraits<T>::cn>::vec_type work_type;
dim3 block(32, 8); dim3 block(32, 8);

View File

@ -160,9 +160,9 @@ namespace cv { namespace cuda { namespace device
{ {
static void call(PtrStepSz<T> src, PtrStepSz<T> srcWhole, int xoff, int yoff, PtrStepSz<T> dst, const float* borderValue, bool) static void call(PtrStepSz<T> src, PtrStepSz<T> srcWhole, int xoff, int yoff, PtrStepSz<T> dst, const float* borderValue, bool)
{ {
(void)xoff; CV_UNUSED(xoff);
(void)yoff; CV_UNUSED(yoff);
(void)srcWhole; CV_UNUSED(srcWhole);
typedef typename TypeVec<float, VecTraits<T>::cn>::vec_type work_type; typedef typename TypeVec<float, VecTraits<T>::cn>::vec_type work_type;

View File

@ -478,7 +478,7 @@ namespace
static void call(const GpuMat& src, GpuMat& dst, Size dsize, double angle, double xShift, double yShift, int interpolation, cudaStream_t stream) static void call(const GpuMat& src, GpuMat& dst, Size dsize, double angle, double xShift, double yShift, int interpolation, cudaStream_t stream)
{ {
(void)dsize; CV_UNUSED(dsize);
static const int npp_inter[] = {NPPI_INTER_NN, NPPI_INTER_LINEAR, NPPI_INTER_CUBIC}; static const int npp_inter[] = {NPPI_INTER_NN, NPPI_INTER_LINEAR, NPPI_INTER_CUBIC};
NppStreamHandler h(stream); NppStreamHandler h(stream);

View File

@ -317,8 +317,8 @@ namespace block_reduce_detail
__device__ static void reduce(Pointer smem, Reference val, uint tid, Op op) __device__ static void reduce(Pointer smem, Reference val, uint tid, Op op)
{ {
#if CV_CUDEV_ARCH >= 300 #if CV_CUDEV_ARCH >= 300
(void) smem; CV_UNUSED(smem);
(void) tid; CV_UNUSED(tid);
Unroll<N / 2, Pointer, Reference, Op>::loopShfl(val, op, N); Unroll<N / 2, Pointer, Reference, Op>::loopShfl(val, op, N);
#else #else

View File

@ -195,8 +195,8 @@ template <typename T> struct TexturePtr
// Use the texture object // Use the texture object
return tex2D<T>(texObj, x, y); return tex2D<T>(texObj, x, y);
#else #else
(void) y; CV_UNUSED(y);
(void) x; CV_UNUSED(x);
return T(); return T();
#endif #endif
} }

View File

@ -93,8 +93,8 @@ __device__ static double atomicAdd(double* address, double val)
} while (assumed != old); } while (assumed != old);
return __longlong_as_double(old); return __longlong_as_double(old);
#else #else
(void) address; CV_UNUSED(address);
(void) val; CV_UNUSED(val);
return 0.0; return 0.0;
#endif #endif
} }
@ -123,8 +123,8 @@ __device__ static float atomicMin(float* address, float val)
} while (assumed != old); } while (assumed != old);
return __int_as_float(old); return __int_as_float(old);
#else #else
(void) address; CV_UNUSED(address);
(void) val; CV_UNUSED(val);
return 0.0f; return 0.0f;
#endif #endif
} }
@ -141,8 +141,8 @@ __device__ static double atomicMin(double* address, double val)
} while (assumed != old); } while (assumed != old);
return __longlong_as_double(old); return __longlong_as_double(old);
#else #else
(void) address; CV_UNUSED(address);
(void) val; CV_UNUSED(val);
return 0.0; return 0.0;
#endif #endif
} }
@ -171,8 +171,8 @@ __device__ static float atomicMax(float* address, float val)
} while (assumed != old); } while (assumed != old);
return __int_as_float(old); return __int_as_float(old);
#else #else
(void) address; CV_UNUSED(address);
(void) val; CV_UNUSED(val);
return 0.0f; return 0.0f;
#endif #endif
} }
@ -189,8 +189,8 @@ __device__ static double atomicMax(double* address, double val)
} while (assumed != old); } while (assumed != old);
return __longlong_as_double(old); return __longlong_as_double(old);
#else #else
(void) address; CV_UNUSED(address);
(void) val; CV_UNUSED(val);
return 0.0; return 0.0;
#endif #endif
} }

View File

@ -193,8 +193,8 @@ namespace warp_reduce_detail
__device__ static void reduce(Pointer smem, Reference val, uint tid, Op op) __device__ static void reduce(Pointer smem, Reference val, uint tid, Op op)
{ {
#if CV_CUDEV_ARCH >= 300 #if CV_CUDEV_ARCH >= 300
(void) smem; CV_UNUSED(smem);
(void) tid; CV_UNUSED(tid);
mergeShfl(val, 16, 32, op); mergeShfl(val, 16, 32, op);
mergeShfl(val, 8, 32, op); mergeShfl(val, 8, 32, op);

View File

@ -59,8 +59,8 @@ template <typename T>
__device__ T warpScanInclusive(T data, volatile T* smem, uint tid) __device__ T warpScanInclusive(T data, volatile T* smem, uint tid)
{ {
#if CV_CUDEV_ARCH >= 300 #if CV_CUDEV_ARCH >= 300
(void) smem; CV_UNUSED(smem);
(void) tid; CV_UNUSED(tid);
const uint laneId = Warp::laneId(); const uint laneId = Warp::laneId();

View File

@ -330,7 +330,7 @@ CV__DNN_INLINE_NS_BEGIN
std::vector<MatShape> &outputs, std::vector<MatShape> &outputs,
std::vector<MatShape> &internals) const; std::vector<MatShape> &internals) const;
virtual int64 getFLOPS(const std::vector<MatShape> &inputs, virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
const std::vector<MatShape> &outputs) const {(void)inputs; (void)outputs; return 0;} const std::vector<MatShape> &outputs) const {CV_UNUSED(inputs); CV_UNUSED(outputs); return 0;}
CV_PROP String name; //!< Name of the layer instance, can be used for logging or other internal purposes. CV_PROP String name; //!< Name of the layer instance, can be used for logging or other internal purposes.
CV_PROP String type; //!< Type name which was used for creating layer by layer factory. CV_PROP String type; //!< Type name which was used for creating layer by layer factory.

View File

@ -7,7 +7,7 @@ typedef std::vector<std::vector<dnn::MatShape> > vector_vector_MatShape;
template<> template<>
bool pyopencv_to(PyObject *o, dnn::DictValue &dv, const char *name) bool pyopencv_to(PyObject *o, dnn::DictValue &dv, const char *name)
{ {
(void)name; CV_UNUSED(name);
if (!o || o == Py_None) if (!o || o == Py_None)
return true; //Current state will be used return true; //Current state will be used
else if (PyLong_Check(o)) else if (PyLong_Check(o))

View File

@ -3191,7 +3191,7 @@ void Layer::finalize(const std::vector<Mat> &inputs, std::vector<Mat> &outputs)
void Layer::finalize(const std::vector<Mat*> &input, std::vector<Mat> &output) void Layer::finalize(const std::vector<Mat*> &input, std::vector<Mat> &output)
{ {
(void)input;(void)output; CV_UNUSED(input);CV_UNUSED(output);
} }
void Layer::finalize(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr) void Layer::finalize(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr)

View File

@ -76,7 +76,7 @@ void initializeLayerFactory()
{ {
CV_TRACE_FUNCTION(); CV_TRACE_FUNCTION();
static ProtobufShutdown protobufShutdown; (void)protobufShutdown; static ProtobufShutdown protobufShutdown; CV_UNUSED(protobufShutdown);
CV_DNN_REGISTER_LAYER_CLASS(Slice, SliceLayer); CV_DNN_REGISTER_LAYER_CLASS(Slice, SliceLayer);
CV_DNN_REGISTER_LAYER_CLASS(Split, SplitLayer); CV_DNN_REGISTER_LAYER_CLASS(Split, SplitLayer);

View File

@ -367,7 +367,7 @@ public:
virtual int64 getFLOPS(const std::vector<MatShape> &inputs, virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
const std::vector<MatShape> &outputs) const CV_OVERRIDE const std::vector<MatShape> &outputs) const CV_OVERRIDE
{ {
(void)outputs; // suppress unused variable warning CV_UNUSED(outputs); // suppress unused variable warning
int64 flops = 0; int64 flops = 0;
for(int i = 0; i < inputs.size(); i++) for(int i = 0; i < inputs.size(); i++)

View File

@ -444,7 +444,7 @@ public:
virtual int64 getFLOPS(const std::vector<MatShape> &inputs, virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
const std::vector<MatShape> &outputs) const CV_OVERRIDE const std::vector<MatShape> &outputs) const CV_OVERRIDE
{ {
(void)outputs; // suppress unused variable warning CV_UNUSED(outputs); // suppress unused variable warning
CV_Assert(inputs.size()); CV_Assert(inputs.size());
long flops = inputs.size() * total(inputs[0]); long flops = inputs.size() * total(inputs[0]);

View File

@ -461,7 +461,7 @@ public:
virtual int64 getFLOPS(const std::vector<MatShape> &inputs, virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
const std::vector<MatShape> &outputs) const CV_OVERRIDE const std::vector<MatShape> &outputs) const CV_OVERRIDE
{ {
(void)inputs; // suppress unused variable warning CV_UNUSED(inputs); // suppress unused variable warning
long flops = 0; long flops = 0;
int innerSize = blobs[0].size[1]; int innerSize = blobs[0].size[1];

View File

@ -402,7 +402,7 @@ public:
virtual int64 getFLOPS(const std::vector<MatShape> &inputs, virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
const std::vector<MatShape> &outputs) const CV_OVERRIDE const std::vector<MatShape> &outputs) const CV_OVERRIDE
{ {
(void)outputs; // suppress unused variable warning CV_UNUSED(outputs); // suppress unused variable warning
CV_Assert(inputs.size() > 0); CV_Assert(inputs.size() > 0);
long flops = 0; long flops = 0;

View File

@ -364,7 +364,7 @@ public:
virtual int64 getFLOPS(const std::vector<MatShape> &inputs, virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
const std::vector<MatShape> &outputs) const CV_OVERRIDE const std::vector<MatShape> &outputs) const CV_OVERRIDE
{ {
(void)outputs; // suppress unused variable warning CV_UNUSED(outputs); // suppress unused variable warning
long flops = 0; long flops = 0;
for(int i = 0; i < inputs.size(); i++) for(int i = 0; i < inputs.size(); i++)
{ {

View File

@ -897,7 +897,7 @@ public:
virtual int64 getFLOPS(const std::vector<MatShape> &inputs, virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
const std::vector<MatShape> &outputs) const CV_OVERRIDE const std::vector<MatShape> &outputs) const CV_OVERRIDE
{ {
(void)inputs; // suppress unused variable warning CV_UNUSED(inputs); // suppress unused variable warning
long flops = 0; long flops = 0;
for(int i = 0; i < outputs.size(); i++) for(int i = 0; i < outputs.size(); i++)

View File

@ -546,7 +546,7 @@ public:
virtual int64 getFLOPS(const std::vector<MatShape> &inputs, virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
const std::vector<MatShape> &outputs) const CV_OVERRIDE const std::vector<MatShape> &outputs) const CV_OVERRIDE
{ {
(void)outputs; // suppress unused variable warning CV_UNUSED(outputs); // suppress unused variable warning
long flops = 0; long flops = 0;
for (int i = 0; i < inputs.size(); i++) for (int i = 0; i < inputs.size(); i++)

View File

@ -315,7 +315,7 @@ public:
virtual int64 getFLOPS(const std::vector<MatShape> &inputs, virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
const std::vector<MatShape> &outputs) const CV_OVERRIDE const std::vector<MatShape> &outputs) const CV_OVERRIDE
{ {
(void)outputs; // suppress unused variable warning CV_UNUSED(outputs); // suppress unused variable warning
int64 flops = 0; int64 flops = 0;
for(int i = 0; i < inputs.size(); i++) for(int i = 0; i < inputs.size(); i++)

View File

@ -193,7 +193,7 @@ public:
virtual int64 getFLOPS(const std::vector<MatShape> &inputs, virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
const std::vector<MatShape> &outputs) const CV_OVERRIDE const std::vector<MatShape> &outputs) const CV_OVERRIDE
{ {
(void)outputs; // suppress unused variable warning CV_UNUSED(outputs); // suppress unused variable warning
int64 flops = 0; int64 flops = 0;
for(int i = 0; i < inputs.size(); i++) for(int i = 0; i < inputs.size(); i++)

View File

@ -236,7 +236,7 @@ public:
virtual int64 getFLOPS(const std::vector<MatShape> &inputs, virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
const std::vector<MatShape> &outputs) const CV_OVERRIDE const std::vector<MatShape> &outputs) const CV_OVERRIDE
{ {
(void)outputs; // suppress unused variable warning CV_UNUSED(outputs); // suppress unused variable warning
long flops = 0; long flops = 0;
for(int i = 0; i < inputs.size(); i++) for(int i = 0; i < inputs.size(); i++)
{ {

View File

@ -329,7 +329,7 @@ public:
int64 getFLOPS(const std::vector<MatShape> &inputs, int64 getFLOPS(const std::vector<MatShape> &inputs,
const std::vector<MatShape> &outputs) const CV_OVERRIDE const std::vector<MatShape> &outputs) const CV_OVERRIDE
{ {
(void)outputs; // suppress unused variable warning CV_UNUSED(outputs); // suppress unused variable warning
int64 flops = 0; int64 flops = 0;
for (int i = 0; i < inputs.size(); i++) for (int i = 0; i < inputs.size(); i++)

View File

@ -193,7 +193,7 @@ void SimpleBlobDetectorImpl::findBlobs(InputArray _image, InputArray _binaryImag
CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION()
Mat image = _image.getMat(), binaryImage = _binaryImage.getMat(); Mat image = _image.getMat(), binaryImage = _binaryImage.getMat();
(void)image; CV_UNUSED(image);
centers.clear(); centers.clear();
std::vector < std::vector<Point> > contours; std::vector < std::vector<Point> > contours;

View File

@ -779,7 +779,7 @@ static void computeKeyPoints(const Mat& imagePyramid,
bool useOCL, int fastThreshold ) bool useOCL, int fastThreshold )
{ {
#ifndef HAVE_OPENCL #ifndef HAVE_OPENCL
(void)uimagePyramid;(void)ulayerInfo;(void)useOCL; CV_UNUSED(uimagePyramid);CV_UNUSED(ulayerInfo);CV_UNUSED(useOCL);
#endif #endif
int i, nkeypoints, level, nlevels = (int)layerInfo.size(); int i, nkeypoints, level, nlevels = (int)layerInfo.size();

View File

@ -159,7 +159,7 @@ public:
LshTable(unsigned int feature_size, unsigned int key_size) LshTable(unsigned int feature_size, unsigned int key_size)
{ {
feature_size_ = feature_size; feature_size_ = feature_size;
(void)key_size; CV_UNUSED(key_size);
std::cerr << "LSH is not implemented for that type" << std::endl; std::cerr << "LSH is not implemented for that type" << std::endl;
assert(0); assert(0);
} }

View File

@ -17,7 +17,7 @@ PyObject* pyopencv_from(const cvflann_flann_distance_t& value)
template<> template<>
bool pyopencv_to(PyObject *o, cv::flann::IndexParams& p, const char *name) bool pyopencv_to(PyObject *o, cv::flann::IndexParams& p, const char *name)
{ {
(void)name; CV_UNUSED(name);
bool ok = true; bool ok = true;
PyObject* key = NULL; PyObject* key = NULL;
PyObject* item = NULL; PyObject* item = NULL;

View File

@ -366,7 +366,7 @@ void cv::imshow( const String& winname, InputArray _img )
if (useGl <= 0) if (useGl <= 0)
{ {
Mat img = _img.getMat(); Mat img = _img.getMat();
CvMat c_img = img; CvMat c_img = cvMat(img);
cvShowImage(winname.c_str(), &c_img); cvShowImage(winname.c_str(), &c_img);
} }
else else
@ -409,8 +409,8 @@ void cv::imshow(const String& winname, const ogl::Texture2D& _tex)
{ {
CV_TRACE_FUNCTION(); CV_TRACE_FUNCTION();
#ifndef HAVE_OPENGL #ifndef HAVE_OPENGL
(void) winname; CV_UNUSED(winname);
(void) _tex; CV_UNUSED(_tex);
CV_Error(cv::Error::OpenGlNotSupported, "The library is compiled without OpenGL support"); CV_Error(cv::Error::OpenGlNotSupported, "The library is compiled without OpenGL support");
#else #else
const double useGl = getWindowProperty(winname, WND_PROP_OPENGL); const double useGl = getWindowProperty(winname, WND_PROP_OPENGL);
@ -728,7 +728,7 @@ CV_IMPL void cvDisplayOverlay(const char* , const char* , int )
CV_IMPL int cvStartLoop(int (*)(int argc, char *argv[]), int , char* argv[]) CV_IMPL int cvStartLoop(int (*)(int argc, char *argv[]), int , char* argv[])
{ {
(void)argv; CV_UNUSED(argv);
CV_NO_GUI_ERROR("cvStartLoop"); CV_NO_GUI_ERROR("cvStartLoop");
} }

View File

@ -624,7 +624,7 @@ double cvGetOpenGlProp_W32(const char* name)
__END__; __END__;
#endif #endif
(void)name; CV_UNUSED(name);
return result; return result;
} }

View File

@ -186,13 +186,13 @@ PFMEncoder::~PFMEncoder()
bool PFMEncoder::isFormatSupported(int depth) const bool PFMEncoder::isFormatSupported(int depth) const
{ {
// any depth will be converted into 32-bit float. // any depth will be converted into 32-bit float.
(void) depth; CV_UNUSED(depth);
return true; return true;
} }
bool PFMEncoder::write(const Mat& img, const std::vector<int>& params) bool PFMEncoder::write(const Mat& img, const std::vector<int>& params)
{ {
(void) params; CV_UNUSED(params);
WLByteStream strm; WLByteStream strm;
if (m_buf) { if (m_buf) {

View File

@ -207,9 +207,9 @@ bool WebPDecoder::readData(Mat &img)
{ {
cvtColor(read_img, img, COLOR_BGRA2BGR); cvtColor(read_img, img, COLOR_BGRA2BGR);
} }
else if (img.type() == CV_8UC3 && m_type == CV_8UC4) else if (img.type() == CV_8UC4 && m_type == CV_8UC3)
{ {
cvtColor(read_img, img, COLOR_BGRA2BGR); cvtColor(read_img, img, COLOR_BGR2BGRA);
} }
else else
{ {

View File

@ -65,9 +65,9 @@ namespace cv{
inline inline
void operator()(int r, int c, int l){ void operator()(int r, int c, int l){
(void)r; CV_UNUSED(r);
(void)c; CV_UNUSED(c);
(void)l; CV_UNUSED(l);
} }
void finish(){ void finish(){

View File

@ -1686,8 +1686,11 @@ void cv::demosaicing(InputArray _src, OutputArray _dst, int code, int dcn)
CV_Error(CV_StsUnsupportedFormat, "Bayer->Gray demosaicing only supports 8u and 16u types"); CV_Error(CV_StsUnsupportedFormat, "Bayer->Gray demosaicing only supports 8u and 16u types");
break; break;
case CV_BayerBG2BGR: case CV_BayerGB2BGR: case CV_BayerRG2BGR: case CV_BayerGR2BGR:
case CV_BayerBG2BGRA: case CV_BayerGB2BGRA: case CV_BayerRG2BGRA: case CV_BayerGR2BGRA: case CV_BayerBG2BGRA: case CV_BayerGB2BGRA: case CV_BayerRG2BGRA: case CV_BayerGR2BGRA:
if (dcn <= 0)
dcn = 4;
/* fallthrough */
case CV_BayerBG2BGR: case CV_BayerGB2BGR: case CV_BayerRG2BGR: case CV_BayerGR2BGR:
case CV_BayerBG2BGR_VNG: case CV_BayerGB2BGR_VNG: case CV_BayerRG2BGR_VNG: case CV_BayerGR2BGR_VNG: case CV_BayerBG2BGR_VNG: case CV_BayerGB2BGR_VNG: case CV_BayerRG2BGR_VNG: case CV_BayerGR2BGR_VNG:
{ {
if (dcn <= 0) if (dcn <= 0)

View File

@ -3451,7 +3451,7 @@ static bool ocl_resize( InputArray _src, OutputArray _dst, Size dsize,
// in case of scale_x && scale_y is equal to 2 // in case of scale_x && scale_y is equal to 2
// INTER_AREA (fast) also is equal to INTER_LINEAR // INTER_AREA (fast) also is equal to INTER_LINEAR
if( interpolation == INTER_LINEAR && is_area_fast && iscale_x == 2 && iscale_y == 2 ) if( interpolation == INTER_LINEAR && is_area_fast && iscale_x == 2 && iscale_y == 2 )
/*interpolation = INTER_AREA*/(void)0; // INTER_AREA is slower /*interpolation = INTER_AREA*/CV_UNUSED(0); // INTER_AREA is slower
if( !(cn <= 4 && if( !(cn <= 4 &&
(interpolation == INTER_NEAREST || interpolation == INTER_LINEAR || (interpolation == INTER_NEAREST || interpolation == INTER_LINEAR ||

View File

@ -4102,7 +4102,7 @@ void cv::GaussianBlur( InputArray _src, OutputArray _dst, Size ksize,
((ksize.width == 3 && ksize.height == 3) || ((ksize.width == 3 && ksize.height == 3) ||
(ksize.width == 5 && ksize.height == 5)) && (ksize.width == 5 && ksize.height == 5)) &&
_src.rows() > ksize.height && _src.cols() > ksize.width); _src.rows() > ksize.height && _src.cols() > ksize.width);
(void)useOpenCL; CV_UNUSED(useOpenCL);
int sdepth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); int sdepth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);

View File

@ -29,7 +29,7 @@ static void throwJavaException(JNIEnv *env, const std::exception *e, const char
env->ThrowNew(je, what.c_str()); env->ThrowNew(je, what.c_str());
LOGE("%s caught %s", method, what.c_str()); LOGE("%s caught %s", method, what.c_str());
(void)method; // avoid "unused" warning CV_UNUSED(method); // avoid "unused" warning
} }
extern "C" { extern "C" {

View File

@ -1,7 +1,7 @@
template<> template<>
bool pyopencv_to(PyObject *obj, CvTermCriteria& dst, const char *name) bool pyopencv_to(PyObject *obj, CvTermCriteria& dst, const char *name)
{ {
(void)name; CV_UNUSED(name);
if(!obj) if(!obj)
return true; return true;
return PyArg_ParseTuple(obj, "iid", &dst.type, &dst.max_iter, &dst.epsilon) > 0; return PyArg_ParseTuple(obj, "iid", &dst.type, &dst.max_iter, &dst.epsilon) > 0;
@ -10,7 +10,7 @@ bool pyopencv_to(PyObject *obj, CvTermCriteria& dst, const char *name)
template<> template<>
bool pyopencv_to(PyObject* obj, CvSlice& r, const char* name) bool pyopencv_to(PyObject* obj, CvSlice& r, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
if(PyObject_Size(obj) == 0) if(PyObject_Size(obj) == 0)

View File

@ -98,7 +98,7 @@ public:
return true; return true;
} }
virtual void doTrain(InputArray points) { (void)points; } virtual void doTrain(InputArray points) { CV_UNUSED(points); }
void clear() void clear()
{ {

View File

@ -123,7 +123,7 @@ public:
Mat img0 = _img0.getMat(); Mat img0 = _img0.getMat();
Mat img1 = _img1.getMat(); Mat img1 = _img1.getMat();
CV_Assert(img0.channels() == 1 && img0.type() == img1.type()); CV_Assert(img0.channels() == 1 && img0.type() == img1.type());
CV_Assert(img0.size() == img0.size()); CV_Assert(img0.size() == img1.size());
int maxlevel = static_cast<int>(log((double)max(img0.rows, img0.cols)) / log(2.0)) - 1; int maxlevel = static_cast<int>(log((double)max(img0.rows, img0.cols)) / log(2.0)) - 1;
maxlevel = min(maxlevel, max_bits - 1); maxlevel = min(maxlevel, max_bits - 1);

View File

@ -557,7 +557,7 @@ PyObject* pyopencv_from(const cv::Ptr<T>& p)
template<> template<>
bool pyopencv_to(PyObject* obj, void*& ptr, const char* name) bool pyopencv_to(PyObject* obj, void*& ptr, const char* name)
{ {
(void)name; CV_UNUSED(name);
if (!obj || obj == Py_None) if (!obj || obj == Py_None)
return true; return true;
@ -627,7 +627,7 @@ PyObject* pyopencv_from(const bool& value)
template<> template<>
bool pyopencv_to(PyObject* obj, bool& value, const char* name) bool pyopencv_to(PyObject* obj, bool& value, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
int _val = PyObject_IsTrue(obj); int _val = PyObject_IsTrue(obj);
@ -646,7 +646,7 @@ PyObject* pyopencv_from(const size_t& value)
template<> template<>
bool pyopencv_to(PyObject* obj, size_t& value, const char* name) bool pyopencv_to(PyObject* obj, size_t& value, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
value = (int)PyLong_AsUnsignedLong(obj); value = (int)PyLong_AsUnsignedLong(obj);
@ -662,7 +662,7 @@ PyObject* pyopencv_from(const int& value)
template<> template<>
bool pyopencv_to(PyObject* obj, int& value, const char* name) bool pyopencv_to(PyObject* obj, int& value, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
if(PyInt_Check(obj)) if(PyInt_Check(obj))
@ -684,7 +684,7 @@ PyObject* pyopencv_from(const unsigned int& value)
template<> template<>
bool pyopencv_to(PyObject* obj, unsigned int& value, const char* name) bool pyopencv_to(PyObject* obj, unsigned int& value, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
if(PyInt_Check(obj)) if(PyInt_Check(obj))
@ -706,7 +706,7 @@ PyObject* pyopencv_from(const uchar& value)
template<> template<>
bool pyopencv_to(PyObject* obj, uchar& value, const char* name) bool pyopencv_to(PyObject* obj, uchar& value, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
int ivalue = (int)PyInt_AsLong(obj); int ivalue = (int)PyInt_AsLong(obj);
@ -723,7 +723,7 @@ PyObject* pyopencv_from(const double& value)
template<> template<>
bool pyopencv_to(PyObject* obj, double& value, const char* name) bool pyopencv_to(PyObject* obj, double& value, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
if(!!PyInt_CheckExact(obj)) if(!!PyInt_CheckExact(obj))
@ -742,7 +742,7 @@ PyObject* pyopencv_from(const float& value)
template<> template<>
bool pyopencv_to(PyObject* obj, float& value, const char* name) bool pyopencv_to(PyObject* obj, float& value, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
if(!!PyInt_CheckExact(obj)) if(!!PyInt_CheckExact(obj))
@ -767,7 +767,7 @@ PyObject* pyopencv_from(const String& value)
template<> template<>
bool pyopencv_to(PyObject* obj, String& value, const char* name) bool pyopencv_to(PyObject* obj, String& value, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
const char* str = PyString_AsString(obj); const char* str = PyString_AsString(obj);
@ -780,7 +780,7 @@ bool pyopencv_to(PyObject* obj, String& value, const char* name)
template<> template<>
bool pyopencv_to(PyObject* obj, Size& sz, const char* name) bool pyopencv_to(PyObject* obj, Size& sz, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
return PyArg_ParseTuple(obj, "ii", &sz.width, &sz.height) > 0; return PyArg_ParseTuple(obj, "ii", &sz.width, &sz.height) > 0;
@ -795,7 +795,7 @@ PyObject* pyopencv_from(const Size& sz)
template<> template<>
bool pyopencv_to(PyObject* obj, Size_<float>& sz, const char* name) bool pyopencv_to(PyObject* obj, Size_<float>& sz, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
return PyArg_ParseTuple(obj, "ff", &sz.width, &sz.height) > 0; return PyArg_ParseTuple(obj, "ff", &sz.width, &sz.height) > 0;
@ -810,7 +810,7 @@ PyObject* pyopencv_from(const Size_<float>& sz)
template<> template<>
bool pyopencv_to(PyObject* obj, Rect& r, const char* name) bool pyopencv_to(PyObject* obj, Rect& r, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
return PyArg_ParseTuple(obj, "iiii", &r.x, &r.y, &r.width, &r.height) > 0; return PyArg_ParseTuple(obj, "iiii", &r.x, &r.y, &r.width, &r.height) > 0;
@ -825,7 +825,7 @@ PyObject* pyopencv_from(const Rect& r)
template<> template<>
bool pyopencv_to(PyObject* obj, Rect2d& r, const char* name) bool pyopencv_to(PyObject* obj, Rect2d& r, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
return PyArg_ParseTuple(obj, "dddd", &r.x, &r.y, &r.width, &r.height) > 0; return PyArg_ParseTuple(obj, "dddd", &r.x, &r.y, &r.width, &r.height) > 0;
@ -840,7 +840,7 @@ PyObject* pyopencv_from(const Rect2d& r)
template<> template<>
bool pyopencv_to(PyObject* obj, Range& r, const char* name) bool pyopencv_to(PyObject* obj, Range& r, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
if(PyObject_Size(obj) == 0) if(PyObject_Size(obj) == 0)
@ -860,7 +860,7 @@ PyObject* pyopencv_from(const Range& r)
template<> template<>
bool pyopencv_to(PyObject* obj, Point& p, const char* name) bool pyopencv_to(PyObject* obj, Point& p, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
if(!!PyComplex_CheckExact(obj)) if(!!PyComplex_CheckExact(obj))
@ -876,7 +876,7 @@ bool pyopencv_to(PyObject* obj, Point& p, const char* name)
template<> template<>
bool pyopencv_to(PyObject* obj, Point2f& p, const char* name) bool pyopencv_to(PyObject* obj, Point2f& p, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
if(!!PyComplex_CheckExact(obj)) if(!!PyComplex_CheckExact(obj))
@ -892,7 +892,7 @@ bool pyopencv_to(PyObject* obj, Point2f& p, const char* name)
template<> template<>
bool pyopencv_to(PyObject* obj, Point2d& p, const char* name) bool pyopencv_to(PyObject* obj, Point2d& p, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
if(!!PyComplex_CheckExact(obj)) if(!!PyComplex_CheckExact(obj))
@ -908,7 +908,7 @@ bool pyopencv_to(PyObject* obj, Point2d& p, const char* name)
template<> template<>
bool pyopencv_to(PyObject* obj, Point3f& p, const char* name) bool pyopencv_to(PyObject* obj, Point3f& p, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
return PyArg_ParseTuple(obj, "fff", &p.x, &p.y, &p.z) > 0; return PyArg_ParseTuple(obj, "fff", &p.x, &p.y, &p.z) > 0;
@ -917,7 +917,7 @@ bool pyopencv_to(PyObject* obj, Point3f& p, const char* name)
template<> template<>
bool pyopencv_to(PyObject* obj, Point3d& p, const char* name) bool pyopencv_to(PyObject* obj, Point3d& p, const char* name)
{ {
(void)name; CV_UNUSED(name);
if(!obj || obj == Py_None) if(!obj || obj == Py_None)
return true; return true;
return PyArg_ParseTuple(obj, "ddd", &p.x, &p.y, &p.z) > 0; return PyArg_ParseTuple(obj, "ddd", &p.x, &p.y, &p.z) > 0;
@ -943,7 +943,7 @@ PyObject* pyopencv_from(const Point3f& p)
static bool pyopencv_to(PyObject* obj, Vec4d& v, ArgInfo info) static bool pyopencv_to(PyObject* obj, Vec4d& v, ArgInfo info)
{ {
(void)info; CV_UNUSED(info);
if (!obj) if (!obj)
return true; return true;
return PyArg_ParseTuple(obj, "dddd", &v[0], &v[1], &v[2], &v[3]) > 0; return PyArg_ParseTuple(obj, "dddd", &v[0], &v[1], &v[2], &v[3]) > 0;
@ -956,7 +956,7 @@ bool pyopencv_to(PyObject* obj, Vec4d& v, const char* name)
static bool pyopencv_to(PyObject* obj, Vec4f& v, ArgInfo info) static bool pyopencv_to(PyObject* obj, Vec4f& v, ArgInfo info)
{ {
(void)info; CV_UNUSED(info);
if (!obj) if (!obj)
return true; return true;
return PyArg_ParseTuple(obj, "ffff", &v[0], &v[1], &v[2], &v[3]) > 0; return PyArg_ParseTuple(obj, "ffff", &v[0], &v[1], &v[2], &v[3]) > 0;
@ -969,7 +969,7 @@ bool pyopencv_to(PyObject* obj, Vec4f& v, const char* name)
static bool pyopencv_to(PyObject* obj, Vec4i& v, ArgInfo info) static bool pyopencv_to(PyObject* obj, Vec4i& v, ArgInfo info)
{ {
(void)info; CV_UNUSED(info);
if (!obj) if (!obj)
return true; return true;
return PyArg_ParseTuple(obj, "iiii", &v[0], &v[1], &v[2], &v[3]) > 0; return PyArg_ParseTuple(obj, "iiii", &v[0], &v[1], &v[2], &v[3]) > 0;
@ -982,7 +982,7 @@ bool pyopencv_to(PyObject* obj, Vec4i& v, const char* name)
static bool pyopencv_to(PyObject* obj, Vec3d& v, ArgInfo info) static bool pyopencv_to(PyObject* obj, Vec3d& v, ArgInfo info)
{ {
(void)info; CV_UNUSED(info);
if (!obj) if (!obj)
return true; return true;
return PyArg_ParseTuple(obj, "ddd", &v[0], &v[1], &v[2]) > 0; return PyArg_ParseTuple(obj, "ddd", &v[0], &v[1], &v[2]) > 0;
@ -995,7 +995,7 @@ bool pyopencv_to(PyObject* obj, Vec3d& v, const char* name)
static bool pyopencv_to(PyObject* obj, Vec3f& v, ArgInfo info) static bool pyopencv_to(PyObject* obj, Vec3f& v, ArgInfo info)
{ {
(void)info; CV_UNUSED(info);
if (!obj) if (!obj)
return true; return true;
return PyArg_ParseTuple(obj, "fff", &v[0], &v[1], &v[2]) > 0; return PyArg_ParseTuple(obj, "fff", &v[0], &v[1], &v[2]) > 0;
@ -1008,7 +1008,7 @@ bool pyopencv_to(PyObject* obj, Vec3f& v, const char* name)
static bool pyopencv_to(PyObject* obj, Vec3i& v, ArgInfo info) static bool pyopencv_to(PyObject* obj, Vec3i& v, ArgInfo info)
{ {
(void)info; CV_UNUSED(info);
if (!obj) if (!obj)
return true; return true;
return PyArg_ParseTuple(obj, "iii", &v[0], &v[1], &v[2]) > 0; return PyArg_ParseTuple(obj, "iii", &v[0], &v[1], &v[2]) > 0;
@ -1021,7 +1021,7 @@ bool pyopencv_to(PyObject* obj, Vec3i& v, const char* name)
static bool pyopencv_to(PyObject* obj, Vec2d& v, ArgInfo info) static bool pyopencv_to(PyObject* obj, Vec2d& v, ArgInfo info)
{ {
(void)info; CV_UNUSED(info);
if (!obj) if (!obj)
return true; return true;
return PyArg_ParseTuple(obj, "dd", &v[0], &v[1]) > 0; return PyArg_ParseTuple(obj, "dd", &v[0], &v[1]) > 0;
@ -1034,7 +1034,7 @@ bool pyopencv_to(PyObject* obj, Vec2d& v, const char* name)
static bool pyopencv_to(PyObject* obj, Vec2f& v, ArgInfo info) static bool pyopencv_to(PyObject* obj, Vec2f& v, ArgInfo info)
{ {
(void)info; CV_UNUSED(info);
if (!obj) if (!obj)
return true; return true;
return PyArg_ParseTuple(obj, "ff", &v[0], &v[1]) > 0; return PyArg_ParseTuple(obj, "ff", &v[0], &v[1]) > 0;
@ -1047,7 +1047,7 @@ bool pyopencv_to(PyObject* obj, Vec2f& v, const char* name)
static bool pyopencv_to(PyObject* obj, Vec2i& v, ArgInfo info) static bool pyopencv_to(PyObject* obj, Vec2i& v, ArgInfo info)
{ {
(void)info; CV_UNUSED(info);
if (!obj) if (!obj)
return true; return true;
return PyArg_ParseTuple(obj, "ii", &v[0], &v[1]) > 0; return PyArg_ParseTuple(obj, "ii", &v[0], &v[1]) > 0;
@ -1389,7 +1389,7 @@ template<> struct pyopencvVecConverter<RotatedRect>
template<> template<>
bool pyopencv_to(PyObject *obj, TermCriteria& dst, const char *name) bool pyopencv_to(PyObject *obj, TermCriteria& dst, const char *name)
{ {
(void)name; CV_UNUSED(name);
if(!obj) if(!obj)
return true; return true;
return PyArg_ParseTuple(obj, "iid", &dst.type, &dst.maxCount, &dst.epsilon) > 0; return PyArg_ParseTuple(obj, "iid", &dst.type, &dst.maxCount, &dst.epsilon) > 0;
@ -1404,7 +1404,7 @@ PyObject* pyopencv_from(const TermCriteria& src)
template<> template<>
bool pyopencv_to(PyObject *obj, RotatedRect& dst, const char *name) bool pyopencv_to(PyObject *obj, RotatedRect& dst, const char *name)
{ {
(void)name; CV_UNUSED(name);
if(!obj) if(!obj)
return true; return true;
return PyArg_ParseTuple(obj, "(ff)(ff)f", &dst.center.x, &dst.center.y, &dst.size.width, &dst.size.height, &dst.angle) > 0; return PyArg_ParseTuple(obj, "(ff)(ff)f", &dst.center.x, &dst.center.y, &dst.size.width, &dst.size.height, &dst.angle) > 0;

View File

@ -223,7 +223,7 @@ MultiBandBlender::MultiBandBlender(int try_gpu, int num_bands, int weight_type)
can_use_gpu_ = try_gpu && cuda::getCudaEnabledDeviceCount(); can_use_gpu_ = try_gpu && cuda::getCudaEnabledDeviceCount();
gpu_feed_idx_ = 0; gpu_feed_idx_ = 0;
#else #else
(void) try_gpu; CV_UNUSED(try_gpu);
can_use_gpu_ = false; can_use_gpu_ = false;
#endif #endif
@ -856,9 +856,9 @@ void createLaplacePyrGpu(InputArray img, int num_levels, std::vector<UMat> &pyr)
gpu_pyr[num_levels].download(pyr[num_levels]); gpu_pyr[num_levels].download(pyr[num_levels]);
#else #else
(void)img; CV_UNUSED(img);
(void)num_levels; CV_UNUSED(num_levels);
(void)pyr; CV_UNUSED(pyr);
CV_Error(Error::StsNotImplemented, "CUDA optimization is unavailable"); CV_Error(Error::StsNotImplemented, "CUDA optimization is unavailable");
#endif #endif
} }
@ -896,7 +896,7 @@ void restoreImageFromLaplacePyrGpu(std::vector<UMat> &pyr)
gpu_pyr[0].download(pyr[0]); gpu_pyr[0].download(pyr[0]);
#else #else
(void)pyr; CV_UNUSED(pyr);
CV_Error(Error::StsNotImplemented, "CUDA optimization is unavailable"); CV_Error(Error::StsNotImplemented, "CUDA optimization is unavailable");
#endif #endif
} }

View File

@ -442,11 +442,11 @@ SurfFeaturesFinder::SurfFeaturesFinder(double hess_thresh, int num_octaves, int
extractor_ = sextractor_; extractor_ = sextractor_;
} }
#else #else
(void)hess_thresh; CV_UNUSED(hess_thresh);
(void)num_octaves; CV_UNUSED(num_octaves);
(void)num_layers; CV_UNUSED(num_layers);
(void)num_octaves_descr; CV_UNUSED(num_octaves_descr);
(void)num_layers_descr; CV_UNUSED(num_layers_descr);
CV_Error( Error::StsNotImplemented, "OpenCV was built without SURF support" ); CV_Error( Error::StsNotImplemented, "OpenCV was built without SURF support" );
#endif #endif
} }
@ -700,7 +700,7 @@ void FeaturesMatcher::operator ()(const std::vector<ImageFeatures> &features, st
BestOf2NearestMatcher::BestOf2NearestMatcher(bool try_use_gpu, float match_conf, int num_matches_thresh1, int num_matches_thresh2) BestOf2NearestMatcher::BestOf2NearestMatcher(bool try_use_gpu, float match_conf, int num_matches_thresh1, int num_matches_thresh2)
{ {
(void)try_use_gpu; CV_UNUSED(try_use_gpu);
#ifdef HAVE_OPENCV_CUDAFEATURES2D #ifdef HAVE_OPENCV_CUDAFEATURES2D
if (try_use_gpu && getCudaEnabledDeviceCount() > 0) if (try_use_gpu && getCudaEnabledDeviceCount() > 0)

Some files were not shown because too many files have changed in this diff Show More