Skip to content

Commit

Permalink
Merged the trunk r8345:8376
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Kamaev committed May 18, 2012
1 parent 7016682 commit e1c4fd9
Show file tree
Hide file tree
Showing 52 changed files with 1,756 additions and 628 deletions.
502 changes: 502 additions & 0 deletions 3rdparty/include/MultiMon.h

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions android/android.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -766,30 +766,30 @@ set( CMAKE_COMPILER_IS_GNUASM 1)
# NDK flags
if( ARMEABI OR ARMEABI_V7A )
# NDK also defines -ffunction-sections -funwind-tables but they result in worse OpenCV performance
set( CMAKE_CXX_FLAGS "-fPIC -Wno-psabi" )
set( CMAKE_C_FLAGS "-fPIC -Wno-psabi" )
set( _CMAKE_CXX_FLAGS "-fPIC -Wno-psabi" )
set( _CMAKE_C_FLAGS "-fPIC -Wno-psabi" )
remove_definitions( -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ )
add_definitions( -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ )
# extra arm-specific flags
set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fsigned-char" )
elseif( X86 )
set( CMAKE_CXX_FLAGS "-funwind-tables" )
set( CMAKE_C_FLAGS "-funwind-tables" )
set( _CMAKE_CXX_FLAGS "-funwind-tables" )
set( _CMAKE_C_FLAGS "-funwind-tables" )
elseif( MIPS )
set( CMAKE_CXX_FLAGS "-fpic -Wno-psabi -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers" )
set( CMAKE_CXX_FLAGS "-fpic -Wno-psabi -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers" )
set( _CMAKE_CXX_FLAGS "-fpic -Wno-psabi -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers" )
set( _CMAKE_CXX_FLAGS "-fpic -Wno-psabi -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers" )
set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fsigned-char" )
else()
set( CMAKE_CXX_FLAGS "" )
set( CMAKE_C_FLAGS "" )
set( _CMAKE_CXX_FLAGS "" )
set( _CMAKE_C_FLAGS "" )
endif()

if( ANDROID_USE_STLPORT )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -fno-exceptions" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-rtti -fno-exceptions" )
set( _CMAKE_CXX_FLAGS "${_CMAKE_CXX_FLAGS} -fno-rtti -fno-exceptions" )
set( _CMAKE_C_FLAGS "${_CMAKE_C_FLAGS} -fno-rtti -fno-exceptions" )
else()
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -frtti -fexceptions" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions" )
set( _CMAKE_CXX_FLAGS "${_CMAKE_CXX_FLAGS} -frtti -fexceptions" )
set( _CMAKE_C_FLAGS "${_CMAKE_C_FLAGS} -fexceptions" )
endif()

#release and debug flags
Expand All @@ -798,33 +798,33 @@ if( ARMEABI OR ARMEABI_V7A )
#It is recommended to use the -mthumb compiler flag to force the generation
#of 16-bit Thumb-1 instructions (the default being 32-bit ARM ones).
# O3 instead of O2/Os in release mode - like cmake sets for desktop gcc
set( CMAKE_CXX_FLAGS_RELEASE "-mthumb -O3" )
set( CMAKE_C_FLAGS_RELEASE "-mthumb -O3" )
set( CMAKE_CXX_FLAGS_DEBUG "-marm -Os -finline-limit=64" )
set( CMAKE_C_FLAGS_DEBUG "-marm -Os -finline-limit=64" )
set( _CMAKE_CXX_FLAGS_RELEASE "-mthumb -O3" )
set( _CMAKE_C_FLAGS_RELEASE "-mthumb -O3" )
set( _CMAKE_CXX_FLAGS_DEBUG "-marm -Os -finline-limit=64" )
set( _CMAKE_C_FLAGS_DEBUG "-marm -Os -finline-limit=64" )
else()
# always compile ARMEABI_V6 in arm mode; otherwise there is no difference from ARMEABI
# O3 instead of O2/Os in release mode - like cmake sets for desktop gcc
set( CMAKE_CXX_FLAGS_RELEASE "-marm -O3 -fstrict-aliasing" )
set( CMAKE_C_FLAGS_RELEASE "-marm -O3 -fstrict-aliasing" )
set( CMAKE_CXX_FLAGS_DEBUG "-marm -O0 -finline-limit=300" )
set( CMAKE_C_FLAGS_DEBUG "-marm -O0 -finline-limit=300" )
set( _CMAKE_CXX_FLAGS_RELEASE "-marm -O3 -fstrict-aliasing" )
set( _CMAKE_C_FLAGS_RELEASE "-marm -O3 -fstrict-aliasing" )
set( _CMAKE_CXX_FLAGS_DEBUG "-marm -O0 -finline-limit=300" )
set( _CMAKE_C_FLAGS_DEBUG "-marm -O0 -finline-limit=300" )
endif()
elseif( X86 )
set( CMAKE_CXX_FLAGS_RELEASE "-O3 -fstrict-aliasing" )
set( CMAKE_C_FLAGS_RELEASE "-O3 -fstrict-aliasing" )
set( CMAKE_CXX_FLAGS_DEBUG "-O0 -finline-limit=300" )
set( CMAKE_C_FLAGS_DEBUG "-O0 -finline-limit=300" )
set( _CMAKE_CXX_FLAGS_RELEASE "-O3 -fstrict-aliasing" )
set( _CMAKE_C_FLAGS_RELEASE "-O3 -fstrict-aliasing" )
set( _CMAKE_CXX_FLAGS_DEBUG "-O0 -finline-limit=300" )
set( _CMAKE_C_FLAGS_DEBUG "-O0 -finline-limit=300" )
elseif( MIPS )
set( CMAKE_CXX_FLAGS_RELEASE "-O3 -funswitch-loops -finline-limit=300" )
set( CMAKE_C_FLAGS_RELEASE "-O3 -funswitch-loops -finline-limit=300" )
set( CMAKE_CXX_FLAGS_DEBUG "-O0 -g" )
set( CMAKE_C_FLAGS_DEBUG "-O0 -g" )
set( _CMAKE_CXX_FLAGS_RELEASE "-O3 -funswitch-loops -finline-limit=300" )
set( _CMAKE_C_FLAGS_RELEASE "-O3 -funswitch-loops -finline-limit=300" )
set( _CMAKE_CXX_FLAGS_DEBUG "-O0 -g" )
set( _CMAKE_C_FLAGS_DEBUG "-O0 -g" )
endif()
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer -DNDEBUG" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fomit-frame-pointer -DNDEBUG" )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-strict-aliasing -fno-omit-frame-pointer -DDEBUG -D_DEBUG" )
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fno-strict-aliasing -fno-omit-frame-pointer -DDEBUG -D_DEBUG" )
set( _CMAKE_CXX_FLAGS_RELEASE "${_CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer -DNDEBUG" )
set( _CMAKE_C_FLAGS_RELEASE "${_CMAKE_C_FLAGS_RELEASE} -fomit-frame-pointer -DNDEBUG" )
set( _CMAKE_CXX_FLAGS_DEBUG "${_CMAKE_CXX_FLAGS_DEBUG} -fno-strict-aliasing -fno-omit-frame-pointer -DDEBUG -D_DEBUG" )
set( _CMAKE_C_FLAGS_DEBUG "${_CMAKE_C_FLAGS_DEBUG} -fno-strict-aliasing -fno-omit-frame-pointer -DDEBUG -D_DEBUG" )

#ABI-specific flags
if( ARMEABI_V7A )
Expand Down Expand Up @@ -928,12 +928,12 @@ if( ARMEABI_V7A )
endif()

#cache flags
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "c++ Release flags" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}" CACHE STRING "c Release flags" )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING "c++ Debug flags" )
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}" CACHE STRING "c Debug flags" )
set( CMAKE_CXX_FLAGS "${_CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags" )
set( CMAKE_C_FLAGS "${_CMAKE_C_FLAGS}" CACHE STRING "c flags" )
set( CMAKE_CXX_FLAGS_RELEASE "${_CMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "c++ Release flags" )
set( CMAKE_C_FLAGS_RELEASE "${_CMAKE_C_FLAGS_RELEASE}" CACHE STRING "c Release flags" )
set( CMAKE_CXX_FLAGS_DEBUG "${_CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING "c++ Debug flags" )
set( CMAKE_C_FLAGS_DEBUG "${_CMAKE_C_FLAGS_DEBUG}" CACHE STRING "c Debug flags" )
set( CMAKE_SHARED_LINKER_FLAGS "" CACHE STRING "linker flags" )
set( CMAKE_MODULE_LINKER_FLAGS "" CACHE STRING "linker flags" )
set( CMAKE_EXE_LINKER_FLAGS "-Wl,-z,nocopyreloc" CACHE STRING "linker flags" )
Expand Down
19 changes: 15 additions & 4 deletions cmake/OpenCVCompilerOptions.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
if (WIN32 AND CMAKE_GENERATOR MATCHES "(MinGW)|(MSYS)")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "")
endif()

if(MSVC)
if(CMAKE_CXX_FLAGS STREQUAL CMAKE_CXX_FLAGS_INIT)
# override cmake default exception handling option
Expand All @@ -17,6 +13,21 @@ set(OPENCV_EXTRA_EXE_LINKER_FLAGS "")
set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "")
set(OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG "")

if(MINGW)
# mingw compiler is known to produce unstable SSE code
# here we are trying to workaround the problem
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG(-mstackrealign HAVE_STACKREALIGN_FLAG)
if(HAVE_STACKREALIGN_FLAG)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -mstackrealign")
else()
CHECK_CXX_COMPILER_FLAG(-mpreferred-stack-boundary=2 HAVE_PREFERRED_STACKBOUNDARY_FLAG)
if(HAVE_PREFERRED_STACKBOUNDARY_FLAG)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -mstackrealign")
endif()
endif()
endif()

if(CMAKE_COMPILER_IS_GNUCXX)
# High level of warnings.
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -Wall")
Expand Down
2 changes: 1 addition & 1 deletion cmake/OpenCVDetectCXXCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if(NOT APPLE)
unset(ENABLE_PRECOMPILED_HEADERS CACHE)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
set(CMAKE_COMPILER_IS_GNUC 1)
set(CMAKE_COMPILER_IS_GNUCC 1)
unset(ENABLE_PRECOMPILED_HEADERS CACHE)
endif()
endif()
Expand Down
18 changes: 8 additions & 10 deletions cmake/OpenCVDetectPython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ if(MSVC AND NOT PYTHON_EXECUTABLE)
)
endforeach()
endif()

find_host_package(PythonInterp 2.0)

unset(PYTHON_USE_NUMPY CACHE)
unset(HAVE_SPHINX CACHE)

if(PYTHON_EXECUTABLE)
if(PYTHON_VERSION_STRING)
set(PYTHON_VERSION_MAJOR_MINOR "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
Expand Down Expand Up @@ -46,16 +44,15 @@ if(PYTHON_EXECUTABLE)
OUTPUT_VARIABLE PYTHON_STD_PACKAGES_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE)
if("${PYTHON_STD_PACKAGES_PATH}" MATCHES "site-packages")
set(PYTHON_PACKAGES_PATH "python${PYTHON_VERSION_MAJOR_MINOR}/site-packages")
set(_PYTHON_PACKAGES_PATH "python${PYTHON_VERSION_MAJOR_MINOR}/site-packages")
else() #debian based assumed, install to the dist-packages.
set(PYTHON_PACKAGES_PATH "python${PYTHON_VERSION_MAJOR_MINOR}/dist-packages")
set(_PYTHON_PACKAGES_PATH "python${PYTHON_VERSION_MAJOR_MINOR}/dist-packages")
endif()
if(EXISTS "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/${PYTHON_PACKAGES_PATH}")
set(PYTHON_PACKAGES_PATH "lib${LIB_SUFFIX}/${PYTHON_PACKAGES_PATH}")
set(_PYTHON_PACKAGES_PATH "lib${LIB_SUFFIX}/${_PYTHON_PACKAGES_PATH}")
else()
set(PYTHON_PACKAGES_PATH "lib/${PYTHON_PACKAGES_PATH}")
set(_PYTHON_PACKAGES_PATH "lib/${_PYTHON_PACKAGES_PATH}")
endif()
set(PYTHON_PACKAGES_PATH "${PYTHON_PACKAGES_PATH}" CACHE PATH "Where to install the python packages.")
elseif(CMAKE_HOST_WIN32)
get_filename_component(PYTHON_PATH "${PYTHON_EXECUTABLE}" PATH)
file(TO_CMAKE_PATH "${PYTHON_PATH}" PYTHON_PATH)
Expand All @@ -67,8 +64,9 @@ if(PYTHON_EXECUTABLE)
endif()
file(TO_CMAKE_PATH "${PYTHON_PATH}" PYTHON_PATH)
endif()
set(PYTHON_PACKAGES_PATH "${PYTHON_PATH}/Lib/site-packages")
set(_PYTHON_PACKAGES_PATH "${PYTHON_PATH}/Lib/site-packages")
endif()
SET(PYTHON_PACKAGES_PATH "${_PYTHON_PACKAGES_PATH}" CACHE PATH "Where to install the python packages.")

if(NOT PYTHON_NUMPY_INCLUDE_DIR)
# Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy
Expand All @@ -78,8 +76,8 @@ if(PYTHON_EXECUTABLE)
OUTPUT_STRIP_TRAILING_WHITESPACE)

if(PYTHON_NUMPY_PROCESS EQUAL 0)
file(TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIR}" PYTHON_NUMPY_INCLUDE_DIR)
set(PYTHON_NUMPY_INCLUDE_DIR ${PYTHON_NUMPY_INCLUDE_DIR} CACHE PATH "Path to numpy headers")
file(TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIR}" _PYTHON_NUMPY_INCLUDE_DIR)
set(PYTHON_NUMPY_INCLUDE_DIR ${_PYTHON_NUMPY_INCLUDE_DIR} CACHE PATH "Path to numpy headers")
endif()
endif()

Expand Down
118 changes: 66 additions & 52 deletions cmake/OpenCVFindIPP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -220,45 +220,40 @@ function(set_ipp_variables _LATEST_VERSION)
endfunction()


# ------------------------------------------------------------------------
# This section will look for IPP through IPPROOT env variable
# Note, IPPROOT is not set by IPP installer, you may need to set it manually
# ------------------------------------------------------------------------
find_path(
IPP_H_PATH
NAMES ippversion.h
PATHS $ENV{IPPROOT}
PATH_SUFFIXES include
DOC "The path to Intel(R) IPP header files"
NO_DEFAULT_PATH
NO_CMAKE_PATH)

if(IPP_H_PATH)

set(IPP_FOUND 1)

# traverse up to IPPROOT level
get_filename_component(IPP_ROOT_DIR ${IPP_H_PATH} PATH)

# extract IPP version info
get_ipp_version(${IPP_ROOT_DIR})

# keep info in the same vars for auto search and search by IPPROOT
set(IPP_LATEST_VERSION_STR ${IPP_VERSION_STR})
set(IPP_LATEST_VERSION_MAJOR ${IPP_VERSION_MAJOR})
set(IPP_LATEST_VERSION_MINOR ${IPP_VERSION_MINOR})
set(IPP_LATEST_VERSION_BUILD ${IPP_VERSION_BUILD})

# set IPP INCLUDE, LIB dirs and library names
set_ipp_variables(${IPP_LATEST_VERSION_STR})

endif()

# ------------------------------------------------------------------------
# This section will look for IPP through IPPROOT env variable
# Note, IPPROOT is not set by IPP installer, you may need to set it manually
# ------------------------------------------------------------------------
find_path(
IPP_H_PATH
NAMES ippversion.h
PATHS $ENV{IPPROOT}
PATH_SUFFIXES include
DOC "The path to Intel(R) IPP header files"
NO_DEFAULT_PATH
NO_CMAKE_PATH)

if(IPP_H_PATH)
set(IPP_FOUND 1)

# traverse up to IPPROOT level
get_filename_component(IPP_ROOT_DIR ${IPP_H_PATH} PATH)

# extract IPP version info
get_ipp_version(${IPP_ROOT_DIR})

# keep info in the same vars for auto search and search by IPPROOT
set(IPP_LATEST_VERSION_STR ${IPP_VERSION_STR})
set(IPP_LATEST_VERSION_MAJOR ${IPP_VERSION_MAJOR})
set(IPP_LATEST_VERSION_MINOR ${IPP_VERSION_MINOR})
set(IPP_LATEST_VERSION_BUILD ${IPP_VERSION_BUILD})

# set IPP INCLUDE, LIB dirs and library names
set_ipp_variables(${IPP_LATEST_VERSION_STR})
endif()

if(IPP_FOUND)
return()
endif()

if(NOT IPP_FOUND)
# reset var from previous search
set(IPP_H_PATH)

Expand Down Expand Up @@ -304,19 +299,38 @@ endfunction()
endforeach()
endif()
endforeach()
endif()

if(IPP_FOUND)
# set IPP INCLUDE, LIB dirs and library names
set_ipp_variables(${IPP_LATEST_VERSION_STR})

# set CACHE variable IPP_H_PATH,
# path to IPP header files for the latest version
find_path(
IPP_H_PATH
NAMES ippversion.h
PATHS ${IPP_ROOT_DIR}
PATH_SUFFIXES include
DOC "The path to Intel(R) IPP header files"
NO_DEFAULT_PATH
NO_CMAKE_PATH)
endif()
if(IPP_FOUND)
# set IPP INCLUDE, LIB dirs and library names
set_ipp_variables(${IPP_LATEST_VERSION_STR})

# set CACHE variable IPP_H_PATH,
# path to IPP header files for the latest version
find_path(
IPP_H_PATH
NAMES ippversion.h
PATHS ${IPP_ROOT_DIR}
PATH_SUFFIXES include
DOC "The path to Intel(R) IPP header files"
NO_DEFAULT_PATH
NO_CMAKE_PATH)
endif()

if(WIN32 AND MINGW AND NOT IPP_LATEST_VERSION_MAJOR LESS 7)
# Since IPP built with Microsoft compiler and /GS option
# ======================================================
# From Windows SDK 7.1
# (usually in "C:\Program Files\Microsoft Visual Studio 10.0\VC\lib"),
# to avoid undefined reference to __security_cookie and _chkstk:
set(MSV_RUNTMCHK "RunTmChk")
set(IPP_LIBRARIES ${IPP_LIBRARIES} ${MSV_RUNTMCHK}${IPP_LIB_SUFFIX})

# To avoid undefined reference to _alldiv and _chkstk
# ===================================================
# NB: it may require a recompilation of w32api (after having modified
# the file ntdll.def) to export the required functions
# See http://code.opencv.org/issues/1906 for additional details
set(MSV_NTDLL "ntdll")
set(IPP_LIBRARIES ${IPP_LIBRARIES} ${MSV_NTDLL}${IPP_LIB_SUFFIX})
endif()
9 changes: 5 additions & 4 deletions modules/core/doc/basic_structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2324,6 +2324,7 @@ The class provides the following features for all derived classes:
Here is example of SIFT use in your application via Algorithm interface: ::

#include "opencv2/opencv.hpp"
#include "opencv2/nonfree/nonfree.hpp"

...

Expand All @@ -2334,22 +2335,22 @@ Here is example of SIFT use in your application via Algorithm interface: ::
FileStorage fs("sift_params.xml", FileStorage::READ);
if( fs.isOpened() ) // if we have file with parameters, read them
{
sift.read(fs["sift_params"]);
sift->read(fs["sift_params"]);
fs.release();
}
else // else modify the parameters and store them; user can later edit the file to use different parameters
{
sift.set("contrastThreshold", 0.01f); // lower the contrast threshold, compared to the default value
sift->set("contrastThreshold", 0.01f); // lower the contrast threshold, compared to the default value
{
WriteStructContext ws(fs, "sift_params", CV_NODE_MAP);
sift.write(fs);
sift->write(fs);
}
}
Mat image = imread("myimage.png", 0), descriptors;
vector<KeyPoint> keypoints;
sift(image, noArray(), keypoints, descriptors);
(*sift)(image, noArray(), keypoints, descriptors);

Algorithm::get
Expand Down
10 changes: 9 additions & 1 deletion modules/core/src/matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2897,8 +2897,16 @@ cvKMeans2( const CvArr* _samples, int cluster_count, CvArr* _labels,
namespace cv
{

Mat Mat::reshape(int, int, const int*) const
Mat Mat::reshape(int _cn, int _newndims, const int* _newsz) const
{
if(_newndims == dims)
{
if(_newsz == 0)
return reshape(_cn);
if(_newndims == 2)
return reshape(_cn, _newsz[0]);
}

CV_Error(CV_StsNotImplemented, "");
// TBD
return Mat();
Expand Down
Loading

0 comments on commit e1c4fd9

Please sign in to comment.