mirror of
https://github.com/opencv/opencv.git
synced 2025-06-10 11:03:03 +08:00
Hid symbols in static builds, added LTO flags, removed exports from ts
This commit is contained in:
parent
ef04ca9e0f
commit
6fb9d42c3f
@ -29,6 +29,8 @@ else()
|
|||||||
cmake_minimum_required(VERSION "${MIN_VER_CMAKE}" FATAL_ERROR)
|
cmake_minimum_required(VERSION "${MIN_VER_CMAKE}" FATAL_ERROR)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||||
|
|
||||||
# Following block can break build in case of cross-compilng
|
# Following block can break build in case of cross-compilng
|
||||||
# but CMAKE_CROSSCOMPILING variable will be set only on project(OpenCV) command
|
# but CMAKE_CROSSCOMPILING variable will be set only on project(OpenCV) command
|
||||||
# so we will try to detect cross-compiling by presense of CMAKE_TOOLCHAIN_FILE
|
# so we will try to detect cross-compiling by presense of CMAKE_TOOLCHAIN_FILE
|
||||||
@ -311,6 +313,7 @@ OCV_OPTION(ENABLE_IMPL_COLLECTION "Collect implementation data on function c
|
|||||||
OCV_OPTION(ENABLE_INSTRUMENTATION "Instrument functions to collect calls trace and performance" OFF )
|
OCV_OPTION(ENABLE_INSTRUMENTATION "Instrument functions to collect calls trace and performance" OFF )
|
||||||
OCV_OPTION(ENABLE_GNU_STL_DEBUG "Enable GNU STL Debug mode (defines _GLIBCXX_DEBUG)" OFF IF ((NOT CMAKE_VERSION VERSION_LESS "2.8.11") AND CMAKE_COMPILER_IS_GNUCXX) )
|
OCV_OPTION(ENABLE_GNU_STL_DEBUG "Enable GNU STL Debug mode (defines _GLIBCXX_DEBUG)" OFF IF ((NOT CMAKE_VERSION VERSION_LESS "2.8.11") AND CMAKE_COMPILER_IS_GNUCXX) )
|
||||||
OCV_OPTION(ENABLE_BUILD_HARDENING "Enable hardening of the resulting binaries (against security attacks, detects memory corruption, etc)" OFF)
|
OCV_OPTION(ENABLE_BUILD_HARDENING "Enable hardening of the resulting binaries (against security attacks, detects memory corruption, etc)" OFF)
|
||||||
|
OCV_OPTION(ENABLE_LTO "Enable Link Time Optimization" OFF IF CMAKE_COMPILER_IS_GNUCXX OR MSVC)
|
||||||
OCV_OPTION(GENERATE_ABI_DESCRIPTOR "Generate XML file for abi_compliance_checker tool" OFF IF UNIX)
|
OCV_OPTION(GENERATE_ABI_DESCRIPTOR "Generate XML file for abi_compliance_checker tool" OFF IF UNIX)
|
||||||
OCV_OPTION(CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON )
|
OCV_OPTION(CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON )
|
||||||
OCV_OPTION(CV_DISABLE_OPTIMIZATION "Disable explicit optimized code (dispatched code/intrinsics/loop unrolling/etc)" OFF )
|
OCV_OPTION(CV_DISABLE_OPTIMIZATION "Disable explicit optimized code (dispatched code/intrinsics/loop unrolling/etc)" OFF )
|
||||||
|
@ -1895,32 +1895,6 @@ protected:
|
|||||||
cv::RNG* rng;
|
cv::RNG* rng;
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************************\
|
|
||||||
* Auxilary functions declarations *
|
|
||||||
\****************************************************************************************/
|
|
||||||
|
|
||||||
/* Generates <sample> from multivariate normal distribution, where <mean> - is an
|
|
||||||
average row vector, <cov> - symmetric covariation matrix */
|
|
||||||
CVAPI(void) cvRandMVNormal( CvMat* mean, CvMat* cov, CvMat* sample,
|
|
||||||
CvRNG* rng CV_DEFAULT(0) );
|
|
||||||
|
|
||||||
/* Generates sample from gaussian mixture distribution */
|
|
||||||
CVAPI(void) cvRandGaussMixture( CvMat* means[],
|
|
||||||
CvMat* covs[],
|
|
||||||
float weights[],
|
|
||||||
int clsnum,
|
|
||||||
CvMat* sample,
|
|
||||||
CvMat* sampClasses CV_DEFAULT(0) );
|
|
||||||
|
|
||||||
#define CV_TS_CONCENTRIC_SPHERES 0
|
|
||||||
|
|
||||||
/* creates test set */
|
|
||||||
CVAPI(void) cvCreateTestSet( int type, CvMat** samples,
|
|
||||||
int num_samples,
|
|
||||||
int num_features,
|
|
||||||
CvMat** responses,
|
|
||||||
int num_classes, ... );
|
|
||||||
|
|
||||||
/****************************************************************************************\
|
/****************************************************************************************\
|
||||||
* Data *
|
* Data *
|
||||||
\****************************************************************************************/
|
\****************************************************************************************/
|
||||||
|
@ -114,153 +114,11 @@ void CvStatModel::write( CvFileStorage*, const char* ) const
|
|||||||
OPENCV_ERROR( CV_StsNotImplemented, "CvStatModel::write", "" );
|
OPENCV_ERROR( CV_StsNotImplemented, "CvStatModel::write", "" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CvStatModel::read( CvFileStorage*, CvFileNode* )
|
void CvStatModel::read( CvFileStorage*, CvFileNode* )
|
||||||
{
|
{
|
||||||
OPENCV_ERROR( CV_StsNotImplemented, "CvStatModel::read", "" );
|
OPENCV_ERROR( CV_StsNotImplemented, "CvStatModel::read", "" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Calculates upper triangular matrix S, where A is a symmetrical matrix A=S'*S */
|
|
||||||
static void cvChol( CvMat* A, CvMat* S )
|
|
||||||
{
|
|
||||||
int dim = A->rows;
|
|
||||||
|
|
||||||
int i, j, k;
|
|
||||||
float sum;
|
|
||||||
|
|
||||||
for( i = 0; i < dim; i++ )
|
|
||||||
{
|
|
||||||
for( j = 0; j < i; j++ )
|
|
||||||
CV_MAT_ELEM(*S, float, i, j) = 0;
|
|
||||||
|
|
||||||
sum = 0;
|
|
||||||
for( k = 0; k < i; k++ )
|
|
||||||
sum += CV_MAT_ELEM(*S, float, k, i) * CV_MAT_ELEM(*S, float, k, i);
|
|
||||||
|
|
||||||
CV_MAT_ELEM(*S, float, i, i) = (float)sqrt(CV_MAT_ELEM(*A, float, i, i) - sum);
|
|
||||||
|
|
||||||
for( j = i + 1; j < dim; j++ )
|
|
||||||
{
|
|
||||||
sum = 0;
|
|
||||||
for( k = 0; k < i; k++ )
|
|
||||||
sum += CV_MAT_ELEM(*S, float, k, i) * CV_MAT_ELEM(*S, float, k, j);
|
|
||||||
|
|
||||||
CV_MAT_ELEM(*S, float, i, j) =
|
|
||||||
(CV_MAT_ELEM(*A, float, i, j) - sum) / CV_MAT_ELEM(*S, float, i, i);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generates <sample> from multivariate normal distribution, where <mean> - is an
|
|
||||||
average row vector, <cov> - symmetric covariation matrix */
|
|
||||||
CV_IMPL void cvRandMVNormal( CvMat* mean, CvMat* cov, CvMat* sample, CvRNG* rng )
|
|
||||||
{
|
|
||||||
int dim = sample->cols;
|
|
||||||
int amount = sample->rows;
|
|
||||||
|
|
||||||
CvRNG state = rng ? *rng : cvRNG( cvGetTickCount() );
|
|
||||||
cvRandArr(&state, sample, CV_RAND_NORMAL, cvScalarAll(0), cvScalarAll(1) );
|
|
||||||
|
|
||||||
CvMat* utmat = cvCreateMat(dim, dim, sample->type);
|
|
||||||
CvMat* vect = cvCreateMatHeader(1, dim, sample->type);
|
|
||||||
|
|
||||||
cvChol(cov, utmat);
|
|
||||||
|
|
||||||
int i;
|
|
||||||
for( i = 0; i < amount; i++ )
|
|
||||||
{
|
|
||||||
cvGetRow(sample, vect, i);
|
|
||||||
cvMatMulAdd(vect, utmat, mean, vect);
|
|
||||||
}
|
|
||||||
|
|
||||||
cvReleaseMat(&vect);
|
|
||||||
cvReleaseMat(&utmat);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Generates <sample> of <amount> points from a discrete variate xi,
|
|
||||||
where Pr{xi = k} == probs[k], 0 < k < len - 1. */
|
|
||||||
static void cvRandSeries( float probs[], int len, int sample[], int amount )
|
|
||||||
{
|
|
||||||
CvMat* univals = cvCreateMat(1, amount, CV_32FC1);
|
|
||||||
float* knots = (float*)cvAlloc( len * sizeof(float) );
|
|
||||||
|
|
||||||
int i, j;
|
|
||||||
|
|
||||||
CvRNG state = cvRNG(-1);
|
|
||||||
cvRandArr(&state, univals, CV_RAND_UNI, cvScalarAll(0), cvScalarAll(1) );
|
|
||||||
|
|
||||||
knots[0] = probs[0];
|
|
||||||
for( i = 1; i < len; i++ )
|
|
||||||
knots[i] = knots[i - 1] + probs[i];
|
|
||||||
|
|
||||||
for( i = 0; i < amount; i++ )
|
|
||||||
for( j = 0; j < len; j++ )
|
|
||||||
{
|
|
||||||
if ( CV_MAT_ELEM(*univals, float, 0, i) <= knots[j] )
|
|
||||||
{
|
|
||||||
sample[i] = j;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cvFree(&knots);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generates <sample> from gaussian mixture distribution */
|
|
||||||
CV_IMPL void cvRandGaussMixture( CvMat* means[],
|
|
||||||
CvMat* covs[],
|
|
||||||
float weights[],
|
|
||||||
int clsnum,
|
|
||||||
CvMat* sample,
|
|
||||||
CvMat* sampClasses )
|
|
||||||
{
|
|
||||||
int dim = sample->cols;
|
|
||||||
int amount = sample->rows;
|
|
||||||
|
|
||||||
int i, clss;
|
|
||||||
|
|
||||||
int* sample_clsnum = (int*)cvAlloc( amount * sizeof(int) );
|
|
||||||
CvMat** utmats = (CvMat**)cvAlloc( clsnum * sizeof(CvMat*) );
|
|
||||||
CvMat* vect = cvCreateMatHeader(1, dim, CV_32FC1);
|
|
||||||
|
|
||||||
CvMat* classes;
|
|
||||||
if( sampClasses )
|
|
||||||
classes = sampClasses;
|
|
||||||
else
|
|
||||||
classes = cvCreateMat(1, amount, CV_32FC1);
|
|
||||||
|
|
||||||
CvRNG state = cvRNG(-1);
|
|
||||||
cvRandArr(&state, sample, CV_RAND_NORMAL, cvScalarAll(0), cvScalarAll(1));
|
|
||||||
|
|
||||||
cvRandSeries(weights, clsnum, sample_clsnum, amount);
|
|
||||||
|
|
||||||
for( i = 0; i < clsnum; i++ )
|
|
||||||
{
|
|
||||||
utmats[i] = cvCreateMat(dim, dim, CV_32FC1);
|
|
||||||
cvChol(covs[i], utmats[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
for( i = 0; i < amount; i++ )
|
|
||||||
{
|
|
||||||
CV_MAT_ELEM(*classes, float, 0, i) = (float)sample_clsnum[i];
|
|
||||||
cvGetRow(sample, vect, i);
|
|
||||||
clss = sample_clsnum[i];
|
|
||||||
cvMatMulAdd(vect, utmats[clss], means[clss], vect);
|
|
||||||
}
|
|
||||||
|
|
||||||
if( !sampClasses )
|
|
||||||
cvReleaseMat(&classes);
|
|
||||||
for( i = 0; i < clsnum; i++ )
|
|
||||||
cvReleaseMat(&utmats[i]);
|
|
||||||
cvFree(&utmats);
|
|
||||||
cvFree(&sample_clsnum);
|
|
||||||
cvReleaseMat(&vect);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CvMat* icvGenerateRandomClusterCenters ( int seed, const CvMat* data,
|
CvMat* icvGenerateRandomClusterCenters ( int seed, const CvMat* data,
|
||||||
int num_of_clusters, CvMat* _centers )
|
int num_of_clusters, CvMat* _centers )
|
||||||
{
|
{
|
||||||
@ -317,55 +175,6 @@ CvMat* icvGenerateRandomClusterCenters ( int seed, const CvMat* data,
|
|||||||
return _centers ? _centers : centers;
|
return _centers ? _centers : centers;
|
||||||
} // end of icvGenerateRandomClusterCenters
|
} // end of icvGenerateRandomClusterCenters
|
||||||
|
|
||||||
// By S. Dilman - begin -
|
|
||||||
|
|
||||||
#define ICV_RAND_MAX 4294967296 // == 2^32
|
|
||||||
|
|
||||||
// static void cvRandRoundUni (CvMat* center,
|
|
||||||
// float radius_small,
|
|
||||||
// float radius_large,
|
|
||||||
// CvMat* desired_matrix,
|
|
||||||
// CvRNG* rng_state_ptr)
|
|
||||||
// {
|
|
||||||
// float rad, norm, coefficient;
|
|
||||||
// int dim, size, i, j;
|
|
||||||
// CvMat *cov, sample;
|
|
||||||
// CvRNG rng_local;
|
|
||||||
|
|
||||||
// CV_FUNCNAME("cvRandRoundUni");
|
|
||||||
// __BEGIN__
|
|
||||||
|
|
||||||
// rng_local = *rng_state_ptr;
|
|
||||||
|
|
||||||
// CV_ASSERT ((radius_small >= 0) &&
|
|
||||||
// (radius_large > 0) &&
|
|
||||||
// (radius_small <= radius_large));
|
|
||||||
// CV_ASSERT (center && desired_matrix && rng_state_ptr);
|
|
||||||
// CV_ASSERT (center->rows == 1);
|
|
||||||
// CV_ASSERT (center->cols == desired_matrix->cols);
|
|
||||||
|
|
||||||
// dim = desired_matrix->cols;
|
|
||||||
// size = desired_matrix->rows;
|
|
||||||
// cov = cvCreateMat (dim, dim, CV_32FC1);
|
|
||||||
// cvSetIdentity (cov);
|
|
||||||
// cvRandMVNormal (center, cov, desired_matrix, &rng_local);
|
|
||||||
|
|
||||||
// for (i = 0; i < size; i++)
|
|
||||||
// {
|
|
||||||
// rad = (float)(cvRandReal(&rng_local)*(radius_large - radius_small) + radius_small);
|
|
||||||
// cvGetRow (desired_matrix, &sample, i);
|
|
||||||
// norm = (float) cvNorm (&sample, 0, CV_L2);
|
|
||||||
// coefficient = rad / norm;
|
|
||||||
// for (j = 0; j < dim; j++)
|
|
||||||
// CV_MAT_ELEM (sample, float, 0, j) *= coefficient;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// __END__
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// By S. Dilman - end -
|
|
||||||
|
|
||||||
static int CV_CDECL
|
static int CV_CDECL
|
||||||
icvCmpIntegers( const void* a, const void* b )
|
icvCmpIntegers( const void* a, const void* b )
|
||||||
{
|
{
|
||||||
|
@ -1880,7 +1880,7 @@ double CvDTree::calc_node_dir( CvDTreeNode* node )
|
|||||||
namespace cv
|
namespace cv
|
||||||
{
|
{
|
||||||
|
|
||||||
template<> CV_EXPORTS void DefaultDeleter<CvDTreeSplit>::operator ()(CvDTreeSplit* obj) const
|
template<> void DefaultDeleter<CvDTreeSplit>::operator ()(CvDTreeSplit* obj) const
|
||||||
{
|
{
|
||||||
fastFree(obj);
|
fastFree(obj);
|
||||||
}
|
}
|
||||||
|
@ -178,10 +178,15 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
OPENCV_EXTRA_FLAGS_RELEASE OPENCV_EXTRA_FLAGS_DEBUG OPENCV_EXTRA_C_FLAGS OPENCV_EXTRA_CXX_FLAGS)
|
OPENCV_EXTRA_FLAGS_RELEASE OPENCV_EXTRA_FLAGS_DEBUG OPENCV_EXTRA_C_FLAGS OPENCV_EXTRA_CXX_FLAGS)
|
||||||
string(REPLACE "-fomit-frame-pointer" "" ${flags} "${${flags}}")
|
string(REPLACE "-fomit-frame-pointer" "" ${flags} "${${flags}}")
|
||||||
string(REPLACE "-ffunction-sections" "" ${flags} "${${flags}}")
|
string(REPLACE "-ffunction-sections" "" ${flags} "${${flags}}")
|
||||||
|
string(REPLACE "-fdata-sections" "" ${flags} "${${flags}}")
|
||||||
endforeach()
|
endforeach()
|
||||||
elseif(NOT ((IOS OR ANDROID) AND NOT BUILD_SHARED_LIBS))
|
elseif(NOT ((IOS OR ANDROID) AND NOT BUILD_SHARED_LIBS))
|
||||||
# Remove unreferenced functions: function level linking
|
# Remove unreferenced functions: function level linking
|
||||||
add_extra_compiler_option(-ffunction-sections)
|
add_extra_compiler_option(-ffunction-sections)
|
||||||
|
add_extra_compiler_option(-fdata-sections)
|
||||||
|
if(NOT APPLE)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_COVERAGE)
|
if(ENABLE_COVERAGE)
|
||||||
@ -195,6 +200,10 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
set(WITH_VTK OFF) # There are issues with VTK 6.0
|
set(WITH_VTK OFF) # There are issues with VTK 6.0
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_LTO)
|
||||||
|
add_extra_compiler_option(-flto)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} -DNDEBUG")
|
set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} -DNDEBUG")
|
||||||
if(NOT " ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} " MATCHES "-O")
|
if(NOT " ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} " MATCHES "-O")
|
||||||
set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -O0")
|
set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -O0")
|
||||||
@ -229,6 +238,12 @@ if(MSVC)
|
|||||||
if(OPENCV_WARNINGS_ARE_ERRORS)
|
if(OPENCV_WARNINGS_ARE_ERRORS)
|
||||||
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /WX")
|
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /WX")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_LTO)
|
||||||
|
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /GL")
|
||||||
|
set(OPENCV_EXTRA_EXE_LINKER_FLAGS "${OPENCV_EXTRA_EXE_LINKER_FLAGS} /LTCG")
|
||||||
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC12 AND NOT CMAKE_GENERATOR MATCHES "Visual Studio")
|
if(MSVC12 AND NOT CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||||
@ -241,15 +256,6 @@ if(WINRT_PHONE AND WINRT_8_0)
|
|||||||
set(OPENCV_EXTRA_CXX_FLAGS "${OPENCV_EXTRA_CXX_FLAGS} /AI\$(WindowsSDK_MetadataPath)")
|
set(OPENCV_EXTRA_CXX_FLAGS "${OPENCV_EXTRA_CXX_FLAGS} /AI\$(WindowsSDK_MetadataPath)")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Extra link libs if the user selects building static libs:
|
|
||||||
if(NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX AND NOT ANDROID)
|
|
||||||
# Android does not need these settings because they are already set by toolchain file
|
|
||||||
if(NOT MINGW)
|
|
||||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} stdc++)
|
|
||||||
endif()
|
|
||||||
set(OPENCV_EXTRA_FLAGS "-fPIC ${OPENCV_EXTRA_FLAGS}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(cmake/OpenCVCompilerOptimizations.cmake)
|
include(cmake/OpenCVCompilerOptimizations.cmake)
|
||||||
|
|
||||||
if(COMMAND ocv_compiler_optimization_options)
|
if(COMMAND ocv_compiler_optimization_options)
|
||||||
|
@ -852,7 +852,6 @@ macro(_ocv_create_module)
|
|||||||
${${the_module}_pch}
|
${${the_module}_pch}
|
||||||
${_VS_VERSION_FILE}
|
${_VS_VERSION_FILE}
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(${the_module} PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};Module")
|
set_target_properties(${the_module} PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};Module")
|
||||||
set_source_files_properties(${OPENCV_MODULE_${the_module}_HEADERS} ${OPENCV_MODULE_${the_module}_SOURCES} ${${the_module}_pch}
|
set_source_files_properties(${OPENCV_MODULE_${the_module}_HEADERS} ${OPENCV_MODULE_${the_module}_SOURCES} ${${the_module}_pch}
|
||||||
PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};Module")
|
PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};Module")
|
||||||
@ -879,8 +878,13 @@ macro(_ocv_create_module)
|
|||||||
COMPILE_PDB_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
COMPILE_PDB_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
||||||
LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
|
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
|
||||||
|
DEFINE_SYMBOL CVAPI_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(ANDROID AND BUILD_FAT_JAVA_LIB)
|
||||||
|
target_compile_definitions(${the_module} PRIVATE CVAPI_EXPORTS)
|
||||||
|
endif()
|
||||||
|
|
||||||
# For dynamic link numbering convenions
|
# For dynamic link numbering convenions
|
||||||
if(NOT ANDROID)
|
if(NOT ANDROID)
|
||||||
# Android SDK build scripts can include only .so files into final .apk
|
# Android SDK build scripts can include only .so files into final .apk
|
||||||
@ -891,11 +895,6 @@ macro(_ocv_create_module)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if((NOT DEFINED OPENCV_MODULE_TYPE AND BUILD_SHARED_LIBS)
|
|
||||||
OR (DEFINED OPENCV_MODULE_TYPE AND OPENCV_MODULE_TYPE STREQUAL SHARED))
|
|
||||||
set_target_properties(${the_module} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (ENABLE_GNU_STL_DEBUG)
|
if (ENABLE_GNU_STL_DEBUG)
|
||||||
target_compile_definitions(${the_module} PUBLIC _GLIBCXX_DEBUG)
|
target_compile_definitions(${the_module} PUBLIC _GLIBCXX_DEBUG)
|
||||||
endif()
|
endif()
|
||||||
|
@ -248,12 +248,22 @@ Cv64suf;
|
|||||||
# define DISABLE_OPENCV_24_COMPATIBILITY
|
# define DISABLE_OPENCV_24_COMPATIBILITY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined _WIN32 || defined WINCE || defined __CYGWIN__) && defined CVAPI_EXPORTS
|
#ifdef CVAPI_EXPORTS
|
||||||
# define CV_EXPORTS __declspec(dllexport)
|
# if (defined _WIN32 || defined WINCE || defined __CYGWIN__)
|
||||||
#elif defined __GNUC__ && __GNUC__ >= 4
|
# define CV_EXPORTS __declspec(dllexport)
|
||||||
# define CV_EXPORTS __attribute__ ((visibility ("default")))
|
# elif defined __GNUC__ && __GNUC__ >= 4
|
||||||
|
# define CV_EXPORTS __attribute__ ((visibility ("default")))
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CV_EXPORTS
|
||||||
|
# define CV_EXPORTS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# define CV_EXPORTS_TEMPLATE
|
||||||
#else
|
#else
|
||||||
# define CV_EXPORTS
|
# define CV_EXPORTS_TEMPLATE CV_EXPORTS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CV_DEPRECATED
|
#ifndef CV_DEPRECATED
|
||||||
|
@ -162,7 +162,7 @@ CV_EXPORTS void scalarToRawData(const cv::Scalar& s, void* buf, int type, int un
|
|||||||
|
|
||||||
//! Allocate all memory buffers which will not be freed, ease filtering memcheck issues
|
//! Allocate all memory buffers which will not be freed, ease filtering memcheck issues
|
||||||
template <typename T>
|
template <typename T>
|
||||||
CV_EXPORTS T* allocSingleton(size_t count) { return static_cast<T*>(fastMalloc(sizeof(T) * count)); }
|
T* allocSingleton(size_t count) { return static_cast<T*>(fastMalloc(sizeof(T) * count)); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// property implementation macros
|
// property implementation macros
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "opencv2/ts.hpp"
|
#include "opencv2/ts.hpp"
|
||||||
|
#include "opencv2/ts/ocl_test.hpp"
|
||||||
#include "opencv2/core/core_c.h"
|
#include "opencv2/core/core_c.h"
|
||||||
|
|
||||||
#include "opencv2/core/cvdef.h"
|
#include "opencv2/core/cvdef.h"
|
||||||
|
@ -786,7 +786,7 @@ struct CV_EXPORTS SL2
|
|||||||
* Euclidean distance functor
|
* Euclidean distance functor
|
||||||
*/
|
*/
|
||||||
template<class T>
|
template<class T>
|
||||||
struct CV_EXPORTS L2
|
struct L2
|
||||||
{
|
{
|
||||||
enum { normType = NORM_L2 };
|
enum { normType = NORM_L2 };
|
||||||
typedef T ValueType;
|
typedef T ValueType;
|
||||||
@ -802,7 +802,7 @@ struct CV_EXPORTS L2
|
|||||||
* Manhattan distance (city block distance) functor
|
* Manhattan distance (city block distance) functor
|
||||||
*/
|
*/
|
||||||
template<class T>
|
template<class T>
|
||||||
struct CV_EXPORTS L1
|
struct L1
|
||||||
{
|
{
|
||||||
enum { normType = NORM_L1 };
|
enum { normType = NORM_L1 };
|
||||||
typedef T ValueType;
|
typedef T ValueType;
|
||||||
|
@ -5,10 +5,7 @@
|
|||||||
namespace cvflann
|
namespace cvflann
|
||||||
{
|
{
|
||||||
|
|
||||||
#if (defined _WIN32 || defined WINCE) && defined CVAPI_EXPORTS
|
CV_DEPRECATED inline void dummyfunc() {}
|
||||||
__declspec(dllexport)
|
|
||||||
#endif
|
|
||||||
void dummyfunc();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,5 +53,4 @@ namespace cvflann
|
|||||||
flann_distance_type_ = distance_type;
|
flann_distance_type_ = distance_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dummyfunc() {}
|
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include "opencv2/flann/params.h"
|
#include "opencv2/flann/params.h"
|
||||||
#include "opencv2/flann/saving.h"
|
#include "opencv2/flann/saving.h"
|
||||||
#include "opencv2/flann/general.h"
|
#include "opencv2/flann/general.h"
|
||||||
#include "opencv2/flann/dummy.h"
|
|
||||||
|
|
||||||
// index types
|
// index types
|
||||||
#include "opencv2/flann/all_indices.h"
|
#include "opencv2/flann/all_indices.h"
|
||||||
|
@ -421,8 +421,8 @@ endif()
|
|||||||
|
|
||||||
|
|
||||||
ocv_add_library(${the_module} SHARED ${handwritten_h_sources} ${handwritten_cpp_sources} ${generated_cpp_sources}
|
ocv_add_library(${the_module} SHARED ${handwritten_h_sources} ${handwritten_cpp_sources} ${generated_cpp_sources}
|
||||||
${copied_files}
|
${copied_files}
|
||||||
"${JAR_FILE}" "${JAR_FILE}.dephelper")
|
"${JAR_FILE}" "${JAR_FILE}.dephelper")
|
||||||
|
|
||||||
if(BUILD_FAT_JAVA_LIB)
|
if(BUILD_FAT_JAVA_LIB)
|
||||||
set(__deps ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_MODULES_BUILD})
|
set(__deps ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_MODULES_BUILD})
|
||||||
@ -456,6 +456,7 @@ set_target_properties(${the_module} PROPERTIES
|
|||||||
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
||||||
LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
|
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
|
||||||
|
DEFINE_SYMBOL CVAPI_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
|
@ -109,6 +109,7 @@ endif()
|
|||||||
set_target_properties(${the_module} PROPERTIES
|
set_target_properties(${the_module} PROPERTIES
|
||||||
LIBRARY_OUTPUT_DIRECTORY "${LIBRARY_OUTPUT_PATH}/${MODULE_INSTALL_SUBDIR}"
|
LIBRARY_OUTPUT_DIRECTORY "${LIBRARY_OUTPUT_PATH}/${MODULE_INSTALL_SUBDIR}"
|
||||||
ARCHIVE_OUTPUT_NAME ${the_module} # prevent name conflict for python2/3 outputs
|
ARCHIVE_OUTPUT_NAME ${the_module} # prevent name conflict for python2/3 outputs
|
||||||
|
DEFINE_SYMBOL CVAPI_EXPORTS
|
||||||
PREFIX ""
|
PREFIX ""
|
||||||
OUTPUT_NAME cv2
|
OUTPUT_NAME cv2
|
||||||
SUFFIX ${CVPY_SUFFIX})
|
SUFFIX ${CVPY_SUFFIX})
|
||||||
|
@ -138,7 +138,7 @@ struct CV_EXPORTS ProjectorBase
|
|||||||
/** @brief Base class for rotation-based warper using a detail::ProjectorBase_ derived class.
|
/** @brief Base class for rotation-based warper using a detail::ProjectorBase_ derived class.
|
||||||
*/
|
*/
|
||||||
template <class P>
|
template <class P>
|
||||||
class CV_EXPORTS RotationWarperBase : public RotationWarper
|
class CV_EXPORTS_TEMPLATE RotationWarperBase : public RotationWarper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Point2f warpPoint(const Point2f &pt, InputArray K, InputArray R);
|
Point2f warpPoint(const Point2f &pt, InputArray K, InputArray R);
|
||||||
@ -550,7 +550,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct SphericalPortraitProjector : ProjectorBase
|
struct CV_EXPORTS SphericalPortraitProjector : ProjectorBase
|
||||||
{
|
{
|
||||||
void mapForward(float x, float y, float &u, float &v);
|
void mapForward(float x, float y, float &u, float &v);
|
||||||
void mapBackward(float u, float v, float &x, float &y);
|
void mapBackward(float u, float v, float &x, float &y);
|
||||||
@ -568,7 +568,7 @@ protected:
|
|||||||
void detectResultRoi(Size src_size, Point &dst_tl, Point &dst_br);
|
void detectResultRoi(Size src_size, Point &dst_tl, Point &dst_br);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CylindricalPortraitProjector : ProjectorBase
|
struct CV_EXPORTS CylindricalPortraitProjector : ProjectorBase
|
||||||
{
|
{
|
||||||
void mapForward(float x, float y, float &u, float &v);
|
void mapForward(float x, float y, float &u, float &v);
|
||||||
void mapBackward(float u, float v, float &x, float &y);
|
void mapBackward(float u, float v, float &x, float &y);
|
||||||
@ -587,7 +587,7 @@ protected:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PlanePortraitProjector : ProjectorBase
|
struct CV_EXPORTS PlanePortraitProjector : ProjectorBase
|
||||||
{
|
{
|
||||||
void mapForward(float x, float y, float &u, float &v);
|
void mapForward(float x, float y, float &u, float &v);
|
||||||
void mapBackward(float u, float v, float &x, float &y);
|
void mapBackward(float u, float v, float &x, float &y);
|
||||||
|
@ -86,11 +86,11 @@ public:
|
|||||||
SkipTestException(const cv::String& message) : dummy(0) { this->msg = message; }
|
SkipTestException(const cv::String& message) : dummy(0) { this->msg = message; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class CV_EXPORTS TS;
|
class TS;
|
||||||
|
|
||||||
CV_EXPORTS int64 readSeed(const char* str);
|
int64 readSeed(const char* str);
|
||||||
|
|
||||||
CV_EXPORTS void randUni( RNG& rng, Mat& a, const Scalar& param1, const Scalar& param2 );
|
void randUni( RNG& rng, Mat& a, const Scalar& param1, const Scalar& param2 );
|
||||||
|
|
||||||
inline unsigned randInt( RNG& rng )
|
inline unsigned randInt( RNG& rng )
|
||||||
{
|
{
|
||||||
@ -103,10 +103,10 @@ inline double randReal( RNG& rng )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CV_EXPORTS const char* getTypeName( int type );
|
const char* getTypeName( int type );
|
||||||
CV_EXPORTS int typeByName( const char* type_name );
|
int typeByName( const char* type_name );
|
||||||
|
|
||||||
CV_EXPORTS string vec2str(const string& sep, const int* v, size_t nelems);
|
string vec2str(const string& sep, const int* v, size_t nelems);
|
||||||
|
|
||||||
inline int clipInt( int val, int min_val, int max_val )
|
inline int clipInt( int val, int min_val, int max_val )
|
||||||
{
|
{
|
||||||
@ -117,99 +117,99 @@ inline int clipInt( int val, int min_val, int max_val )
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
CV_EXPORTS double getMinVal(int depth);
|
double getMinVal(int depth);
|
||||||
CV_EXPORTS double getMaxVal(int depth);
|
double getMaxVal(int depth);
|
||||||
|
|
||||||
CV_EXPORTS Size randomSize(RNG& rng, double maxSizeLog);
|
Size randomSize(RNG& rng, double maxSizeLog);
|
||||||
CV_EXPORTS void randomSize(RNG& rng, int minDims, int maxDims, double maxSizeLog, vector<int>& sz);
|
void randomSize(RNG& rng, int minDims, int maxDims, double maxSizeLog, vector<int>& sz);
|
||||||
CV_EXPORTS int randomType(RNG& rng, int typeMask, int minChannels, int maxChannels);
|
int randomType(RNG& rng, int typeMask, int minChannels, int maxChannels);
|
||||||
CV_EXPORTS Mat randomMat(RNG& rng, Size size, int type, double minVal, double maxVal, bool useRoi);
|
Mat randomMat(RNG& rng, Size size, int type, double minVal, double maxVal, bool useRoi);
|
||||||
CV_EXPORTS Mat randomMat(RNG& rng, const vector<int>& size, int type, double minVal, double maxVal, bool useRoi);
|
Mat randomMat(RNG& rng, const vector<int>& size, int type, double minVal, double maxVal, bool useRoi);
|
||||||
CV_EXPORTS void add(const Mat& a, double alpha, const Mat& b, double beta,
|
void add(const Mat& a, double alpha, const Mat& b, double beta,
|
||||||
Scalar gamma, Mat& c, int ctype, bool calcAbs=false);
|
Scalar gamma, Mat& c, int ctype, bool calcAbs=false);
|
||||||
CV_EXPORTS void multiply(const Mat& a, const Mat& b, Mat& c, double alpha=1);
|
void multiply(const Mat& a, const Mat& b, Mat& c, double alpha=1);
|
||||||
CV_EXPORTS void divide(const Mat& a, const Mat& b, Mat& c, double alpha=1);
|
void divide(const Mat& a, const Mat& b, Mat& c, double alpha=1);
|
||||||
|
|
||||||
CV_EXPORTS void convert(const Mat& src, cv::OutputArray dst, int dtype, double alpha=1, double beta=0);
|
void convert(const Mat& src, cv::OutputArray dst, int dtype, double alpha=1, double beta=0);
|
||||||
CV_EXPORTS void copy(const Mat& src, Mat& dst, const Mat& mask=Mat(), bool invertMask=false);
|
void copy(const Mat& src, Mat& dst, const Mat& mask=Mat(), bool invertMask=false);
|
||||||
CV_EXPORTS void set(Mat& dst, const Scalar& gamma, const Mat& mask=Mat());
|
void set(Mat& dst, const Scalar& gamma, const Mat& mask=Mat());
|
||||||
|
|
||||||
// working with multi-channel arrays
|
// working with multi-channel arrays
|
||||||
CV_EXPORTS void extract( const Mat& a, Mat& plane, int coi );
|
void extract( const Mat& a, Mat& plane, int coi );
|
||||||
CV_EXPORTS void insert( const Mat& plane, Mat& a, int coi );
|
void insert( const Mat& plane, Mat& a, int coi );
|
||||||
|
|
||||||
// checks that the array does not have NaNs and/or Infs and all the elements are
|
// checks that the array does not have NaNs and/or Infs and all the elements are
|
||||||
// within [min_val,max_val). idx is the index of the first "bad" element.
|
// within [min_val,max_val). idx is the index of the first "bad" element.
|
||||||
CV_EXPORTS int check( const Mat& data, double min_val, double max_val, vector<int>* idx );
|
int check( const Mat& data, double min_val, double max_val, vector<int>* idx );
|
||||||
|
|
||||||
// modifies values that are close to zero
|
// modifies values that are close to zero
|
||||||
CV_EXPORTS void patchZeros( Mat& mat, double level );
|
void patchZeros( Mat& mat, double level );
|
||||||
|
|
||||||
CV_EXPORTS void transpose(const Mat& src, Mat& dst);
|
void transpose(const Mat& src, Mat& dst);
|
||||||
CV_EXPORTS void erode(const Mat& src, Mat& dst, const Mat& _kernel, Point anchor=Point(-1,-1),
|
void erode(const Mat& src, Mat& dst, const Mat& _kernel, Point anchor=Point(-1,-1),
|
||||||
int borderType=0, const Scalar& borderValue=Scalar());
|
int borderType=0, const Scalar& borderValue=Scalar());
|
||||||
CV_EXPORTS void dilate(const Mat& src, Mat& dst, const Mat& _kernel, Point anchor=Point(-1,-1),
|
void dilate(const Mat& src, Mat& dst, const Mat& _kernel, Point anchor=Point(-1,-1),
|
||||||
int borderType=0, const Scalar& borderValue=Scalar());
|
int borderType=0, const Scalar& borderValue=Scalar());
|
||||||
CV_EXPORTS void filter2D(const Mat& src, Mat& dst, int ddepth, const Mat& kernel,
|
void filter2D(const Mat& src, Mat& dst, int ddepth, const Mat& kernel,
|
||||||
Point anchor, double delta, int borderType,
|
Point anchor, double delta, int borderType,
|
||||||
const Scalar& borderValue=Scalar());
|
const Scalar& borderValue=Scalar());
|
||||||
CV_EXPORTS void copyMakeBorder(const Mat& src, Mat& dst, int top, int bottom, int left, int right,
|
void copyMakeBorder(const Mat& src, Mat& dst, int top, int bottom, int left, int right,
|
||||||
int borderType, const Scalar& borderValue=Scalar());
|
int borderType, const Scalar& borderValue=Scalar());
|
||||||
CV_EXPORTS Mat calcSobelKernel2D( int dx, int dy, int apertureSize, int origin=0 );
|
Mat calcSobelKernel2D( int dx, int dy, int apertureSize, int origin=0 );
|
||||||
CV_EXPORTS Mat calcLaplaceKernel2D( int aperture_size );
|
Mat calcLaplaceKernel2D( int aperture_size );
|
||||||
|
|
||||||
CV_EXPORTS void initUndistortMap( const Mat& a, const Mat& k, Size sz, Mat& mapx, Mat& mapy );
|
void initUndistortMap( const Mat& a, const Mat& k, Size sz, Mat& mapx, Mat& mapy );
|
||||||
|
|
||||||
CV_EXPORTS void minMaxLoc(const Mat& src, double* minval, double* maxval,
|
void minMaxLoc(const Mat& src, double* minval, double* maxval,
|
||||||
vector<int>* minloc, vector<int>* maxloc, const Mat& mask=Mat());
|
vector<int>* minloc, vector<int>* maxloc, const Mat& mask=Mat());
|
||||||
CV_EXPORTS double norm(InputArray src, int normType, InputArray mask=noArray());
|
double norm(InputArray src, int normType, InputArray mask=noArray());
|
||||||
CV_EXPORTS double norm(InputArray src1, InputArray src2, int normType, InputArray mask=noArray());
|
double norm(InputArray src1, InputArray src2, int normType, InputArray mask=noArray());
|
||||||
CV_EXPORTS Scalar mean(const Mat& src, const Mat& mask=Mat());
|
Scalar mean(const Mat& src, const Mat& mask=Mat());
|
||||||
CV_EXPORTS double PSNR(InputArray src1, InputArray src2);
|
double PSNR(InputArray src1, InputArray src2);
|
||||||
|
|
||||||
CV_EXPORTS bool cmpUlps(const Mat& data, const Mat& refdata, int expMaxDiff, double* realMaxDiff, vector<int>* idx);
|
bool cmpUlps(const Mat& data, const Mat& refdata, int expMaxDiff, double* realMaxDiff, vector<int>* idx);
|
||||||
|
|
||||||
// compares two arrays. max_diff is the maximum actual difference,
|
// compares two arrays. max_diff is the maximum actual difference,
|
||||||
// success_err_level is maximum allowed difference, idx is the index of the first
|
// success_err_level is maximum allowed difference, idx is the index of the first
|
||||||
// element for which difference is >success_err_level
|
// element for which difference is >success_err_level
|
||||||
// (or index of element with the maximum difference)
|
// (or index of element with the maximum difference)
|
||||||
CV_EXPORTS int cmpEps( const Mat& data, const Mat& refdata, double* max_diff,
|
int cmpEps( const Mat& data, const Mat& refdata, double* max_diff,
|
||||||
double success_err_level, vector<int>* idx,
|
double success_err_level, vector<int>* idx,
|
||||||
bool element_wise_relative_error );
|
bool element_wise_relative_error );
|
||||||
|
|
||||||
// a wrapper for the previous function. in case of error prints the message to log file.
|
// a wrapper for the previous function. in case of error prints the message to log file.
|
||||||
CV_EXPORTS int cmpEps2( TS* ts, const Mat& data, const Mat& refdata, double success_err_level,
|
int cmpEps2( TS* ts, const Mat& data, const Mat& refdata, double success_err_level,
|
||||||
bool element_wise_relative_error, const char* desc );
|
bool element_wise_relative_error, const char* desc );
|
||||||
|
|
||||||
CV_EXPORTS int cmpEps2_64f( TS* ts, const double* val, const double* refval, int len,
|
int cmpEps2_64f( TS* ts, const double* val, const double* refval, int len,
|
||||||
double eps, const char* param_name );
|
double eps, const char* param_name );
|
||||||
|
|
||||||
CV_EXPORTS void logicOp(const Mat& src1, const Mat& src2, Mat& dst, char c);
|
void logicOp(const Mat& src1, const Mat& src2, Mat& dst, char c);
|
||||||
CV_EXPORTS void logicOp(const Mat& src, const Scalar& s, Mat& dst, char c);
|
void logicOp(const Mat& src, const Scalar& s, Mat& dst, char c);
|
||||||
CV_EXPORTS void min(const Mat& src1, const Mat& src2, Mat& dst);
|
void min(const Mat& src1, const Mat& src2, Mat& dst);
|
||||||
CV_EXPORTS void min(const Mat& src, double s, Mat& dst);
|
void min(const Mat& src, double s, Mat& dst);
|
||||||
CV_EXPORTS void max(const Mat& src1, const Mat& src2, Mat& dst);
|
void max(const Mat& src1, const Mat& src2, Mat& dst);
|
||||||
CV_EXPORTS void max(const Mat& src, double s, Mat& dst);
|
void max(const Mat& src, double s, Mat& dst);
|
||||||
|
|
||||||
CV_EXPORTS void compare(const Mat& src1, const Mat& src2, Mat& dst, int cmpop);
|
void compare(const Mat& src1, const Mat& src2, Mat& dst, int cmpop);
|
||||||
CV_EXPORTS void compare(const Mat& src, double s, Mat& dst, int cmpop);
|
void compare(const Mat& src, double s, Mat& dst, int cmpop);
|
||||||
CV_EXPORTS void gemm(const Mat& src1, const Mat& src2, double alpha,
|
void gemm(const Mat& src1, const Mat& src2, double alpha,
|
||||||
const Mat& src3, double beta, Mat& dst, int flags);
|
const Mat& src3, double beta, Mat& dst, int flags);
|
||||||
CV_EXPORTS void transform( const Mat& src, Mat& dst, const Mat& transmat, const Mat& shift );
|
void transform( const Mat& src, Mat& dst, const Mat& transmat, const Mat& shift );
|
||||||
CV_EXPORTS double crossCorr(const Mat& src1, const Mat& src2);
|
double crossCorr(const Mat& src1, const Mat& src2);
|
||||||
CV_EXPORTS void threshold( const Mat& src, Mat& dst, double thresh, double maxval, int thresh_type );
|
void threshold( const Mat& src, Mat& dst, double thresh, double maxval, int thresh_type );
|
||||||
CV_EXPORTS void minMaxIdx( InputArray _img, double* minVal, double* maxVal,
|
void minMaxIdx( InputArray _img, double* minVal, double* maxVal,
|
||||||
Point* minLoc, Point* maxLoc, InputArray _mask );
|
Point* minLoc, Point* maxLoc, InputArray _mask );
|
||||||
|
|
||||||
struct CV_EXPORTS MatInfo
|
struct MatInfo
|
||||||
{
|
{
|
||||||
MatInfo(const Mat& _m) : m(&_m) {}
|
MatInfo(const Mat& _m) : m(&_m) {}
|
||||||
const Mat* m;
|
const Mat* m;
|
||||||
};
|
};
|
||||||
|
|
||||||
CV_EXPORTS std::ostream& operator << (std::ostream& out, const MatInfo& m);
|
std::ostream& operator << (std::ostream& out, const MatInfo& m);
|
||||||
|
|
||||||
struct CV_EXPORTS MatComparator
|
struct MatComparator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MatComparator(double maxdiff, int context);
|
MatComparator(double maxdiff, int context);
|
||||||
@ -228,7 +228,7 @@ public:
|
|||||||
class BaseTest;
|
class BaseTest;
|
||||||
class TS;
|
class TS;
|
||||||
|
|
||||||
class CV_EXPORTS BaseTest
|
class BaseTest
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// constructor(s) and destructor
|
// constructor(s) and destructor
|
||||||
@ -312,7 +312,7 @@ struct TestInfo
|
|||||||
\*****************************************************************************************/
|
\*****************************************************************************************/
|
||||||
|
|
||||||
// common parameters:
|
// common parameters:
|
||||||
struct CV_EXPORTS TSParams
|
struct TSParams
|
||||||
{
|
{
|
||||||
TSParams();
|
TSParams();
|
||||||
|
|
||||||
@ -327,7 +327,7 @@ struct CV_EXPORTS TSParams
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class CV_EXPORTS TS
|
class TS
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// constructor(s) and destructor
|
// constructor(s) and destructor
|
||||||
@ -473,7 +473,7 @@ protected:
|
|||||||
* Subclass of BaseTest for testing functions that process dense arrays *
|
* Subclass of BaseTest for testing functions that process dense arrays *
|
||||||
\*****************************************************************************************/
|
\*****************************************************************************************/
|
||||||
|
|
||||||
class CV_EXPORTS ArrayTest : public BaseTest
|
class ArrayTest : public BaseTest
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// constructor(s) and destructor
|
// constructor(s) and destructor
|
||||||
@ -510,7 +510,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class CV_EXPORTS BadArgTest : public BaseTest
|
class BadArgTest : public BaseTest
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// constructor(s) and destructor
|
// constructor(s) and destructor
|
||||||
@ -564,7 +564,7 @@ protected:
|
|||||||
|
|
||||||
extern uint64 param_seed;
|
extern uint64 param_seed;
|
||||||
|
|
||||||
struct CV_EXPORTS DefaultRngAuto
|
struct DefaultRngAuto
|
||||||
{
|
{
|
||||||
const uint64 old_state;
|
const uint64 old_state;
|
||||||
|
|
||||||
@ -576,16 +576,16 @@ struct CV_EXPORTS DefaultRngAuto
|
|||||||
|
|
||||||
|
|
||||||
// test images generation functions
|
// test images generation functions
|
||||||
CV_EXPORTS void fillGradient(Mat& img, int delta = 5);
|
void fillGradient(Mat& img, int delta = 5);
|
||||||
CV_EXPORTS void smoothBorder(Mat& img, const Scalar& color, int delta = 3);
|
void smoothBorder(Mat& img, const Scalar& color, int delta = 3);
|
||||||
|
|
||||||
CV_EXPORTS void printVersionInfo(bool useStdOut = true);
|
void printVersionInfo(bool useStdOut = true);
|
||||||
|
|
||||||
|
|
||||||
// Utility functions
|
// Utility functions
|
||||||
|
|
||||||
CV_EXPORTS void addDataSearchPath(const std::string& path);
|
void addDataSearchPath(const std::string& path);
|
||||||
CV_EXPORTS void addDataSearchSubDirectory(const std::string& subdir);
|
void addDataSearchSubDirectory(const std::string& subdir);
|
||||||
|
|
||||||
/*! @brief Try to find requested data file
|
/*! @brief Try to find requested data file
|
||||||
|
|
||||||
@ -603,7 +603,7 @@ CV_EXPORTS void addDataSearchSubDirectory(const std::string& subdir);
|
|||||||
- modulename from TS::init()
|
- modulename from TS::init()
|
||||||
|
|
||||||
*/
|
*/
|
||||||
CV_EXPORTS std::string findDataFile(const std::string& relative_path, bool required = true);
|
std::string findDataFile(const std::string& relative_path, bool required = true);
|
||||||
|
|
||||||
|
|
||||||
#ifndef __CV_TEST_EXEC_ARGS
|
#ifndef __CV_TEST_EXEC_ARGS
|
||||||
|
@ -88,7 +88,7 @@ namespace perf
|
|||||||
SANITY_CHECK(cpu_##mat, ## __VA_ARGS__); \
|
SANITY_CHECK(cpu_##mat, ## __VA_ARGS__); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
CV_EXPORTS cv::Mat readImage(const std::string& fileName, int flags = cv::IMREAD_COLOR);
|
cv::Mat readImage(const std::string& fileName, int flags = cv::IMREAD_COLOR);
|
||||||
|
|
||||||
struct CvtColorInfo
|
struct CvtColorInfo
|
||||||
{
|
{
|
||||||
@ -99,11 +99,11 @@ namespace perf
|
|||||||
CvtColorInfo() {}
|
CvtColorInfo() {}
|
||||||
explicit CvtColorInfo(int scn_, int dcn_, int code_) : scn(scn_), dcn(dcn_), code(code_) {}
|
explicit CvtColorInfo(int scn_, int dcn_, int code_) : scn(scn_), dcn(dcn_), code(code_) {}
|
||||||
};
|
};
|
||||||
CV_EXPORTS void PrintTo(const CvtColorInfo& info, std::ostream* os);
|
void PrintTo(const CvtColorInfo& info, std::ostream* os);
|
||||||
|
|
||||||
CV_EXPORTS void printCudaInfo();
|
void printCudaInfo();
|
||||||
|
|
||||||
CV_EXPORTS void sortKeyPoints(std::vector<cv::KeyPoint>& keypoints, cv::InputOutputArray _descriptors = cv::noArray());
|
void sortKeyPoints(std::vector<cv::KeyPoint>& keypoints, cv::InputOutputArray _descriptors = cv::noArray());
|
||||||
|
|
||||||
#ifdef HAVE_CUDA
|
#ifdef HAVE_CUDA
|
||||||
#define CV_PERF_TEST_CUDA_MAIN(modulename) \
|
#define CV_PERF_TEST_CUDA_MAIN(modulename) \
|
||||||
|
@ -53,34 +53,34 @@ namespace cvtest
|
|||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// random generators
|
// random generators
|
||||||
|
|
||||||
CV_EXPORTS int randomInt(int minVal, int maxVal);
|
int randomInt(int minVal, int maxVal);
|
||||||
CV_EXPORTS double randomDouble(double minVal, double maxVal);
|
double randomDouble(double minVal, double maxVal);
|
||||||
CV_EXPORTS cv::Size randomSize(int minVal, int maxVal);
|
cv::Size randomSize(int minVal, int maxVal);
|
||||||
CV_EXPORTS cv::Scalar randomScalar(double minVal, double maxVal);
|
cv::Scalar randomScalar(double minVal, double maxVal);
|
||||||
CV_EXPORTS cv::Mat randomMat(cv::Size size, int type, double minVal = 0.0, double maxVal = 255.0);
|
cv::Mat randomMat(cv::Size size, int type, double minVal = 0.0, double maxVal = 255.0);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// GpuMat create
|
// GpuMat create
|
||||||
|
|
||||||
CV_EXPORTS cv::cuda::GpuMat createMat(cv::Size size, int type, bool useRoi = false);
|
cv::cuda::GpuMat createMat(cv::Size size, int type, bool useRoi = false);
|
||||||
CV_EXPORTS cv::cuda::GpuMat loadMat(const cv::Mat& m, bool useRoi = false);
|
cv::cuda::GpuMat loadMat(const cv::Mat& m, bool useRoi = false);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Image load
|
// Image load
|
||||||
|
|
||||||
//! read image from testdata folder
|
//! read image from testdata folder
|
||||||
CV_EXPORTS cv::Mat readImage(const std::string& fileName, int flags = cv::IMREAD_COLOR);
|
cv::Mat readImage(const std::string& fileName, int flags = cv::IMREAD_COLOR);
|
||||||
|
|
||||||
//! read image from testdata folder and convert it to specified type
|
//! read image from testdata folder and convert it to specified type
|
||||||
CV_EXPORTS cv::Mat readImageType(const std::string& fname, int type);
|
cv::Mat readImageType(const std::string& fname, int type);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Gpu devices
|
// Gpu devices
|
||||||
|
|
||||||
//! return true if device supports specified feature and gpu module was built with support the feature.
|
//! return true if device supports specified feature and gpu module was built with support the feature.
|
||||||
CV_EXPORTS bool supportFeature(const cv::cuda::DeviceInfo& info, cv::cuda::FeatureSet feature);
|
bool supportFeature(const cv::cuda::DeviceInfo& info, cv::cuda::FeatureSet feature);
|
||||||
|
|
||||||
class CV_EXPORTS DeviceManager
|
class DeviceManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static DeviceManager& instance();
|
static DeviceManager& instance();
|
||||||
@ -99,11 +99,11 @@ namespace cvtest
|
|||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Additional assertion
|
// Additional assertion
|
||||||
|
|
||||||
CV_EXPORTS void minMaxLocGold(const cv::Mat& src, double* minVal_, double* maxVal_ = 0, cv::Point* minLoc_ = 0, cv::Point* maxLoc_ = 0, const cv::Mat& mask = cv::Mat());
|
void minMaxLocGold(const cv::Mat& src, double* minVal_, double* maxVal_ = 0, cv::Point* minLoc_ = 0, cv::Point* maxLoc_ = 0, const cv::Mat& mask = cv::Mat());
|
||||||
|
|
||||||
CV_EXPORTS cv::Mat getMat(cv::InputArray arr);
|
cv::Mat getMat(cv::InputArray arr);
|
||||||
|
|
||||||
CV_EXPORTS testing::AssertionResult assertMatNear(const char* expr1, const char* expr2, const char* eps_expr, cv::InputArray m1, cv::InputArray m2, double eps);
|
testing::AssertionResult assertMatNear(const char* expr1, const char* expr2, const char* eps_expr, cv::InputArray m1, cv::InputArray m2, double eps);
|
||||||
|
|
||||||
#undef EXPECT_MAT_NEAR
|
#undef EXPECT_MAT_NEAR
|
||||||
#define EXPECT_MAT_NEAR(m1, m2, eps) EXPECT_PRED_FORMAT3(cvtest::assertMatNear, m1, m2, eps)
|
#define EXPECT_MAT_NEAR(m1, m2, eps) EXPECT_PRED_FORMAT3(cvtest::assertMatNear, m1, m2, eps)
|
||||||
@ -148,7 +148,7 @@ namespace cvtest
|
|||||||
ASSERT_NEAR(p1.z, p2.z, eps); \
|
ASSERT_NEAR(p1.z, p2.z, eps); \
|
||||||
}
|
}
|
||||||
|
|
||||||
CV_EXPORTS double checkSimilarity(cv::InputArray m1, cv::InputArray m2);
|
double checkSimilarity(cv::InputArray m1, cv::InputArray m2);
|
||||||
|
|
||||||
#undef EXPECT_MAT_SIMILAR
|
#undef EXPECT_MAT_SIMILAR
|
||||||
#define EXPECT_MAT_SIMILAR(mat1, mat2, eps) \
|
#define EXPECT_MAT_SIMILAR(mat1, mat2, eps) \
|
||||||
@ -248,10 +248,10 @@ namespace cvtest
|
|||||||
using perf::MatType;
|
using perf::MatType;
|
||||||
|
|
||||||
//! return vector with types from specified range.
|
//! return vector with types from specified range.
|
||||||
CV_EXPORTS std::vector<MatType> types(int depth_start, int depth_end, int cn_start, int cn_end);
|
std::vector<MatType> types(int depth_start, int depth_end, int cn_start, int cn_end);
|
||||||
|
|
||||||
//! return vector with all types (depth: CV_8U-CV_64F, channels: 1-4).
|
//! return vector with all types (depth: CV_8U-CV_64F, channels: 1-4).
|
||||||
CV_EXPORTS const std::vector<MatType>& all_types();
|
const std::vector<MatType>& all_types();
|
||||||
|
|
||||||
#define ALL_TYPES testing::ValuesIn(all_types())
|
#define ALL_TYPES testing::ValuesIn(all_types())
|
||||||
#define TYPES(depth_start, depth_end, cn_start, cn_end) testing::ValuesIn(types(depth_start, depth_end, cn_start, cn_end))
|
#define TYPES(depth_start, depth_end, cn_start, cn_end) testing::ValuesIn(types(depth_start, depth_end, cn_start, cn_end))
|
||||||
@ -269,7 +269,7 @@ namespace cvtest
|
|||||||
bool val_;
|
bool val_;
|
||||||
};
|
};
|
||||||
|
|
||||||
CV_EXPORTS void PrintTo(const UseRoi& useRoi, std::ostream* os);
|
void PrintTo(const UseRoi& useRoi, std::ostream* os);
|
||||||
|
|
||||||
#define WHOLE_SUBMAT testing::Values(UseRoi(false), UseRoi(true))
|
#define WHOLE_SUBMAT testing::Values(UseRoi(false), UseRoi(true))
|
||||||
|
|
||||||
@ -286,7 +286,7 @@ namespace cvtest
|
|||||||
bool val_;
|
bool val_;
|
||||||
};
|
};
|
||||||
|
|
||||||
CV_EXPORTS void PrintTo(const Inverse& useRoi, std::ostream* os);
|
void PrintTo(const Inverse& useRoi, std::ostream* os);
|
||||||
|
|
||||||
#define DIRECT_INVERSE testing::Values(Inverse(false), Inverse(true))
|
#define DIRECT_INVERSE testing::Values(Inverse(false), Inverse(true))
|
||||||
|
|
||||||
@ -325,26 +325,26 @@ namespace cvtest
|
|||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Features2D
|
// Features2D
|
||||||
|
|
||||||
CV_EXPORTS testing::AssertionResult assertKeyPointsEquals(const char* gold_expr, const char* actual_expr, std::vector<cv::KeyPoint>& gold, std::vector<cv::KeyPoint>& actual);
|
testing::AssertionResult assertKeyPointsEquals(const char* gold_expr, const char* actual_expr, std::vector<cv::KeyPoint>& gold, std::vector<cv::KeyPoint>& actual);
|
||||||
|
|
||||||
#define ASSERT_KEYPOINTS_EQ(gold, actual) EXPECT_PRED_FORMAT2(assertKeyPointsEquals, gold, actual)
|
#define ASSERT_KEYPOINTS_EQ(gold, actual) EXPECT_PRED_FORMAT2(assertKeyPointsEquals, gold, actual)
|
||||||
|
|
||||||
CV_EXPORTS int getMatchedPointsCount(std::vector<cv::KeyPoint>& gold, std::vector<cv::KeyPoint>& actual);
|
int getMatchedPointsCount(std::vector<cv::KeyPoint>& gold, std::vector<cv::KeyPoint>& actual);
|
||||||
CV_EXPORTS int getMatchedPointsCount(const std::vector<cv::KeyPoint>& keypoints1, const std::vector<cv::KeyPoint>& keypoints2, const std::vector<cv::DMatch>& matches);
|
int getMatchedPointsCount(const std::vector<cv::KeyPoint>& keypoints1, const std::vector<cv::KeyPoint>& keypoints2, const std::vector<cv::DMatch>& matches);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Other
|
// Other
|
||||||
|
|
||||||
CV_EXPORTS void dumpImage(const std::string& fileName, const cv::Mat& image);
|
void dumpImage(const std::string& fileName, const cv::Mat& image);
|
||||||
CV_EXPORTS void showDiff(cv::InputArray gold, cv::InputArray actual, double eps);
|
void showDiff(cv::InputArray gold, cv::InputArray actual, double eps);
|
||||||
|
|
||||||
CV_EXPORTS void parseCudaDeviceOptions(int argc, char **argv);
|
void parseCudaDeviceOptions(int argc, char **argv);
|
||||||
CV_EXPORTS void printCudaInfo();
|
void printCudaInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace cv { namespace cuda
|
namespace cv { namespace cuda
|
||||||
{
|
{
|
||||||
CV_EXPORTS void PrintTo(const DeviceInfo& info, std::ostream* os);
|
void PrintTo(const DeviceInfo& info, std::ostream* os);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#ifdef HAVE_CUDA
|
#ifdef HAVE_CUDA
|
||||||
|
@ -119,11 +119,11 @@ using namespace perf;
|
|||||||
namespace perf {
|
namespace perf {
|
||||||
|
|
||||||
// Check for current device limitation
|
// Check for current device limitation
|
||||||
CV_EXPORTS void checkDeviceMaxMemoryAllocSize(const Size& size, int type, int factor = 1);
|
void checkDeviceMaxMemoryAllocSize(const Size& size, int type, int factor = 1);
|
||||||
|
|
||||||
// Initialize Mat with random numbers. Range is depends on the data type.
|
// Initialize Mat with random numbers. Range is depends on the data type.
|
||||||
// TODO Parameter type is actually OutputArray
|
// TODO Parameter type is actually OutputArray
|
||||||
CV_EXPORTS void randu(InputOutputArray dst);
|
void randu(InputOutputArray dst);
|
||||||
|
|
||||||
inline void safeFinish()
|
inline void safeFinish()
|
||||||
{
|
{
|
||||||
|
@ -105,10 +105,10 @@ do \
|
|||||||
#define EXPECT_MAT_NEAR_RELATIVE(mat1, mat2, eps) \
|
#define EXPECT_MAT_NEAR_RELATIVE(mat1, mat2, eps) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
ASSERT_EQ(mat1.type(), mat2.type()); \
|
ASSERT_EQ((mat1).type(), (mat2).type()); \
|
||||||
ASSERT_EQ(mat1.size(), mat2.size()); \
|
ASSERT_EQ((mat1).size(), (mat2).size()); \
|
||||||
EXPECT_LE(TestUtils::checkNormRelative(mat1, mat2), eps) \
|
EXPECT_LE(TestUtils::checkNormRelative((mat1), (mat2)), eps) \
|
||||||
<< "Size: " << mat1.size() << std::endl; \
|
<< "Size: " << (mat1).size() << std::endl; \
|
||||||
} while ((void)0, 0)
|
} while ((void)0, 0)
|
||||||
|
|
||||||
#define EXPECT_MAT_N_DIFF(mat1, mat2, num) \
|
#define EXPECT_MAT_N_DIFF(mat1, mat2, num) \
|
||||||
@ -192,7 +192,7 @@ using perf::MatType;
|
|||||||
|
|
||||||
#define OCL_RNG_SEED 123456
|
#define OCL_RNG_SEED 123456
|
||||||
|
|
||||||
struct CV_EXPORTS TestUtils
|
struct TestUtils
|
||||||
{
|
{
|
||||||
cv::RNG rng;
|
cv::RNG rng;
|
||||||
|
|
||||||
@ -319,7 +319,7 @@ do \
|
|||||||
#define UMAT_UPLOAD_OUTPUT_PARAMETER(name) UMAT_UPLOAD_INPUT_PARAMETER(name)
|
#define UMAT_UPLOAD_OUTPUT_PARAMETER(name) UMAT_UPLOAD_INPUT_PARAMETER(name)
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct CV_EXPORTS TSTestWithParam : public TestUtils, public ::testing::TestWithParam<T>
|
struct TSTestWithParam : public TestUtils, public ::testing::TestWithParam<T>
|
||||||
{
|
{
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -2295,7 +2295,7 @@ using ::std::tuple_size;
|
|||||||
#endif // _MSC_VER
|
#endif // _MSC_VER
|
||||||
|
|
||||||
#ifndef GTEST_API_
|
#ifndef GTEST_API_
|
||||||
# define GTEST_API_ CV_EXPORTS
|
# define GTEST_API_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
@ -172,7 +172,7 @@ enum ERROR_TYPE
|
|||||||
ERROR_RELATIVE = 1
|
ERROR_RELATIVE = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
class CV_EXPORTS Regression
|
class Regression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static Regression& add(TestBase* test, const std::string& name, cv::InputArray array, double eps = DBL_EPSILON, ERROR_TYPE err = ERROR_ABSOLUTE);
|
static Regression& add(TestBase* test, const std::string& name, cv::InputArray array, double eps = DBL_EPSILON, ERROR_TYPE err = ERROR_ABSOLUTE);
|
||||||
@ -219,7 +219,7 @@ private:
|
|||||||
#define SANITY_CHECK_MATCHES(array, ...) ::perf::Regression::addMatches(this, #array, array , ## __VA_ARGS__)
|
#define SANITY_CHECK_MATCHES(array, ...) ::perf::Regression::addMatches(this, #array, array , ## __VA_ARGS__)
|
||||||
#define SANITY_CHECK_NOTHING() this->setVerified()
|
#define SANITY_CHECK_NOTHING() this->setVerified()
|
||||||
|
|
||||||
class CV_EXPORTS GpuPerf
|
class GpuPerf
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static bool targetDevice();
|
static bool targetDevice();
|
||||||
@ -230,7 +230,7 @@ public:
|
|||||||
/*****************************************************************************************\
|
/*****************************************************************************************\
|
||||||
* Container for performance metrics *
|
* Container for performance metrics *
|
||||||
\*****************************************************************************************/
|
\*****************************************************************************************/
|
||||||
typedef struct CV_EXPORTS performance_metrics
|
typedef struct performance_metrics
|
||||||
{
|
{
|
||||||
size_t bytesIn;
|
size_t bytesIn;
|
||||||
size_t bytesOut;
|
size_t bytesOut;
|
||||||
@ -372,7 +372,7 @@ public:
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class CV_EXPORTS TestBase: public ::testing::Test
|
class TestBase: public ::testing::Test
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TestBase();
|
TestBase();
|
||||||
@ -463,7 +463,7 @@ private:
|
|||||||
static cv::Size getSize(cv::InputArray a);
|
static cv::Size getSize(cv::InputArray a);
|
||||||
static void declareArray(SizeVector& sizes, cv::InputOutputArray a, WarmUpType wtype);
|
static void declareArray(SizeVector& sizes, cv::InputOutputArray a, WarmUpType wtype);
|
||||||
|
|
||||||
class CV_EXPORTS _declareHelper
|
class _declareHelper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
_declareHelper& in(cv::InputOutputArray a1, WarmUpType wtype = WARMUP_READ);
|
_declareHelper& in(cv::InputOutputArray a1, WarmUpType wtype = WARMUP_READ);
|
||||||
@ -507,15 +507,15 @@ typedef TestBaseWithParam<Size_MatType_t> Size_MatType;
|
|||||||
/*****************************************************************************************\
|
/*****************************************************************************************\
|
||||||
* Print functions for googletest *
|
* Print functions for googletest *
|
||||||
\*****************************************************************************************/
|
\*****************************************************************************************/
|
||||||
CV_EXPORTS void PrintTo(const MatType& t, std::ostream* os);
|
void PrintTo(const MatType& t, std::ostream* os);
|
||||||
|
|
||||||
} //namespace perf
|
} //namespace perf
|
||||||
|
|
||||||
namespace cv
|
namespace cv
|
||||||
{
|
{
|
||||||
|
|
||||||
CV_EXPORTS void PrintTo(const String& str, ::std::ostream* os);
|
void PrintTo(const String& str, ::std::ostream* os);
|
||||||
CV_EXPORTS void PrintTo(const Size& sz, ::std::ostream* os);
|
void PrintTo(const Size& sz, ::std::ostream* os);
|
||||||
|
|
||||||
} //namespace cv
|
} //namespace cv
|
||||||
|
|
||||||
@ -706,7 +706,7 @@ namespace comparators
|
|||||||
{
|
{
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct CV_EXPORTS RectLess_ :
|
struct RectLess_ :
|
||||||
public std::binary_function<cv::Rect_<T>, cv::Rect_<T>, bool>
|
public std::binary_function<cv::Rect_<T>, cv::Rect_<T>, bool>
|
||||||
{
|
{
|
||||||
bool operator()(const cv::Rect_<T>& r1, const cv::Rect_<T>& r2) const
|
bool operator()(const cv::Rect_<T>& r1, const cv::Rect_<T>& r2) const
|
||||||
@ -720,7 +720,7 @@ struct CV_EXPORTS RectLess_ :
|
|||||||
|
|
||||||
typedef RectLess_<int> RectLess;
|
typedef RectLess_<int> RectLess;
|
||||||
|
|
||||||
struct CV_EXPORTS KeypointGreater :
|
struct KeypointGreater :
|
||||||
public std::binary_function<cv::KeyPoint, cv::KeyPoint, bool>
|
public std::binary_function<cv::KeyPoint, cv::KeyPoint, bool>
|
||||||
{
|
{
|
||||||
bool operator()(const cv::KeyPoint& kp1, const cv::KeyPoint& kp2) const
|
bool operator()(const cv::KeyPoint& kp1, const cv::KeyPoint& kp2) const
|
||||||
@ -739,7 +739,7 @@ struct CV_EXPORTS KeypointGreater :
|
|||||||
|
|
||||||
} //namespace comparators
|
} //namespace comparators
|
||||||
|
|
||||||
void CV_EXPORTS sort(std::vector<cv::KeyPoint>& pts, cv::InputOutputArray descriptors);
|
void sort(std::vector<cv::KeyPoint>& pts, cv::InputOutputArray descriptors);
|
||||||
} //namespace perf
|
} //namespace perf
|
||||||
|
|
||||||
#endif //OPENCV_TS_PERF_HPP
|
#endif //OPENCV_TS_PERF_HPP
|
||||||
|
@ -51,7 +51,7 @@ using namespace testing::internal;
|
|||||||
|
|
||||||
namespace perf
|
namespace perf
|
||||||
{
|
{
|
||||||
CV_EXPORTS void printCudaInfo();
|
void printCudaInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace cvtest
|
namespace cvtest
|
||||||
|
@ -747,12 +747,12 @@ static bool isDirectory(const std::string& path)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
CV_EXPORTS void addDataSearchPath(const std::string& path)
|
void addDataSearchPath(const std::string& path)
|
||||||
{
|
{
|
||||||
if (isDirectory(path))
|
if (isDirectory(path))
|
||||||
TS::ptr()->data_search_path.push_back(path);
|
TS::ptr()->data_search_path.push_back(path);
|
||||||
}
|
}
|
||||||
CV_EXPORTS void addDataSearchSubDirectory(const std::string& subdir)
|
void addDataSearchSubDirectory(const std::string& subdir)
|
||||||
{
|
{
|
||||||
TS::ptr()->data_search_subdir.push_back(subdir);
|
TS::ptr()->data_search_subdir.push_back(subdir);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user