Merge pull request #1348 from SpecLad:merge-2.4

pull/1356/merge
Roman Donchenko 12 years ago committed by OpenCV Buildbot
commit e59c74e1c7
  1. 82
      .gitattributes
  2. 1
      3rdparty/.gitattributes
  3. 2
      3rdparty/ffmpeg/ffmpeg_version.cmake
  4. 2
      3rdparty/ffmpeg/make.bat
  5. 2
      3rdparty/ffmpeg/readme.txt
  6. 0
      3rdparty/libpng/opencv-libpng.patch
  7. 1
      3rdparty/libtiff/tif_config.h.cmakein
  8. 2
      3rdparty/tbb/.gitignore
  9. 3
      CMakeLists.txt
  10. 1
      apps/CMakeLists.txt
  11. 1
      apps/haartraining/CMakeLists.txt
  12. 1
      apps/haartraining/_cvcommon.h
  13. 1
      apps/haartraining/performance.cpp
  14. 2
      apps/sft/CMakeLists.txt
  15. 2
      apps/sft/config.cpp
  16. 2
      apps/sft/include/sft/common.hpp
  17. 2
      apps/sft/include/sft/config.hpp
  18. 2
      apps/sft/include/sft/dataset.hpp
  19. 2
      apps/sft/sft.cpp
  20. 1
      apps/traincascade/CMakeLists.txt
  21. 5
      cmake/OpenCVCRTLinkage.cmake
  22. 6
      cmake/OpenCVCompilerOptions.cmake
  23. 17
      cmake/OpenCVFindIPP.cmake
  24. 9
      cmake/OpenCVFindLibsGUI.cmake
  25. 2
      cmake/OpenCVFindLibsGrfmt.cmake
  26. 2
      cmake/OpenCVFindLibsPerf.cmake
  27. 21
      cmake/OpenCVFindLibsVideo.cmake
  28. 4
      cmake/OpenCVFindXimea.cmake
  29. 4
      cmake/OpenCVGenInfoPlist.cmake
  30. 4
      cmake/OpenCVUtils.cmake
  31. 2
      cmake/checks/OpenCVDetectCudaArch.cu
  32. 2
      cmake/checks/vfwtest.cpp
  33. 2
      cmake/checks/winrttest.cpp
  34. 2
      cmake/cl2cpp.cmake
  35. 2
      cmake/templates/cmake_uninstall.cmake.in
  36. 2
      cmake/templates/opencv_modules.hpp.in
  37. 3
      doc/_static/insertIframe.js
  38. 2
      doc/_themes/blue/static/default.css_t
  39. 2
      doc/_themes/blue/theme.conf
  40. 2
      doc/check_docs.py
  41. 1
      doc/mymath.sty
  42. 10
      doc/opencv_cheatsheet.tex
  43. 1
      doc/pattern_tools/svgfig.py
  44. 2
      doc/tutorials/bioinspired/retina_model/retina_model.rst
  45. 38
      doc/tutorials/calib3d/camera_calibration/camera_calibration.rst
  46. 2
      doc/tutorials/calib3d/camera_calibration_square_chess/camera_calibration_square_chess.rst
  47. 1
      doc/tutorials/core/file_input_output_with_xml_yml/file_input_output_with_xml_yml.rst
  48. 3
      doc/tutorials/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.rst
  49. 2
      doc/tutorials/core/table_of_content_core/table_of_content_core.rst
  50. 2
      doc/tutorials/definitions/README.txt
  51. 3
      doc/tutorials/features2d/feature_description/feature_description.rst
  52. 1
      doc/tutorials/features2d/table_of_content_features2d/table_of_content_features2d.rst
  53. 1
      doc/tutorials/features2d/trackingmotion/corner_subpixeles/corner_subpixeles.rst
  54. 1
      doc/tutorials/features2d/trackingmotion/generic_corner_detector/generic_corner_detector.rst
  55. 2
      doc/tutorials/features2d/trackingmotion/good_features_to_track/good_features_to_track.rst
  56. 2
      doc/tutorials/features2d/trackingmotion/harris_detector/harris_detector.rst
  57. 1
      doc/tutorials/general/table_of_content_general/table_of_content_general.rst
  58. 2
      doc/tutorials/highgui/table_of_content_highgui/table_of_content_highgui.rst
  59. 5
      doc/tutorials/highgui/trackbar/trackbar.rst
  60. 1
      doc/tutorials/imgproc/histograms/histogram_calculation/histogram_calculation.rst
  61. 1
      doc/tutorials/imgproc/histograms/template_matching/template_matching.rst
  62. 3
      doc/tutorials/imgproc/imgtrans/canny_detector/canny_detector.rst
  63. 1
      doc/tutorials/imgproc/imgtrans/hough_lines/hough_lines.rst
  64. 1
      doc/tutorials/imgproc/imgtrans/remap/remap.rst
  65. 1
      doc/tutorials/imgproc/imgtrans/warp_affine/warp_affine.rst
  66. 1
      doc/tutorials/imgproc/opening_closing_hats/opening_closing_hats.rst
  67. 2
      doc/tutorials/imgproc/pyramids/pyramids.rst
  68. 1
      doc/tutorials/imgproc/shapedescriptors/bounding_rects_circles/bounding_rects_circles.rst
  69. 1
      doc/tutorials/imgproc/shapedescriptors/bounding_rotated_ellipses/bounding_rotated_ellipses.rst
  70. 1
      doc/tutorials/imgproc/shapedescriptors/find_contours/find_contours.rst
  71. 1
      doc/tutorials/imgproc/shapedescriptors/hull/hull.rst
  72. 1
      doc/tutorials/imgproc/shapedescriptors/moments/moments.rst
  73. 1
      doc/tutorials/imgproc/shapedescriptors/point_polygon_test/point_polygon_test.rst
  74. 3
      doc/tutorials/imgproc/table_of_content_imgproc/table_of_content_imgproc.rst
  75. 4
      doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.rst
  76. 3
      doc/tutorials/introduction/linux_eclipse/linux_eclipse.rst
  77. 1
      doc/tutorials/introduction/linux_install/linux_install.rst
  78. 1
      doc/tutorials/ios/hello/hello.rst
  79. 2
      doc/tutorials/ios/image_manipulation/image_manipulation.rst
  80. 1
      doc/tutorials/ml/introduction_to_svm/introduction_to_svm.rst
  81. 1
      doc/tutorials/objdetect/cascade_classifier/cascade_classifier.rst
  82. 2
      include/CMakeLists.txt
  83. 1
      include/opencv/cv.h
  84. 1
      include/opencv/cxeigen.hpp
  85. 1
      modules/androidcamera/camera_wrapper/camera_wrapper.h
  86. 2
      modules/androidcamera/include/camera_activity.hpp
  87. 1
      modules/calib3d/doc/calib3d.rst
  88. 2
      modules/calib3d/include/opencv2/calib3d/calib3d.hpp
  89. 2
      modules/calib3d/src/calib3d_init.cpp
  90. 1
      modules/calib3d/src/compat_ptsetreg.cpp
  91. 1
      modules/calib3d/src/epnp.cpp
  92. 12
      modules/calib3d/src/five-point.cpp
  93. 36
      modules/calib3d/src/levmarq.cpp
  94. 1
      modules/calib3d/src/p3p.cpp
  95. 1
      modules/calib3d/src/p3p.h
  96. 1
      modules/calib3d/src/ptsetreg.cpp
  97. 1
      modules/calib3d/src/solvepnp.cpp
  98. 1
      modules/calib3d/src/stereosgbm.cpp
  99. 22
      modules/calib3d/test/test_affine3.cpp
  100. 1
      modules/calib3d/test/test_affine3d_estimator.cpp
  101. Some files were not shown because too many files have changed in this diff Show More

82
.gitattributes vendored

@ -1,42 +1,58 @@
.git* export-ignore
* text=auto whitespace=trailing-space,space-before-tab,-indent-with-non-tab,tab-in-indent,tabwidth=4 * text=auto whitespace=trailing-space,space-before-tab,-indent-with-non-tab,tab-in-indent,tabwidth=4
*.py text .git* text export-ignore
*.cpp text
*.hpp text *.aidl text
*.cxx text *.appxmanifest text
*.hxx text *.bib text
*.mm text *.c text
*.c text *.cl text
*.h text *.conf text
*.i text *.cpp text
*.js text *.css_t text
*.java text *.cu text
*.scala text *.cxx text
*.cu text *.def text
*.cl text *.filelist text
*.css_t text *.h text
*.qrc text *.hpp text
*.qss text *.htm text
*.S text *.html text
*.rst text *.hxx text
*.tex text *.i text
*.sty text *.idl text
*.java text
*.aidl text *.js text
*.mk text *.mk text
*.mm text
*.plist text
*.properties text
*.py text
*.qrc text
*.qss text
*.S text
*.sbt text
*.scala text
*.sty text
*.tex text
*.txt text
*.xaml text
# reST underlines/overlines can look like conflict markers
*.rst text conflict-marker-size=80
*.cmake text whitespace=tabwidth=2 *.cmake text whitespace=tabwidth=2
*.cmakein text whitespace=tabwidth=2 *.cmakein text whitespace=tabwidth=2
*.in text whitespace=tabwidth=2 *.in text whitespace=tabwidth=2
CMakeLists.txt text whitespace=tabwidth=2 CMakeLists.txt text whitespace=tabwidth=2
*.png binary *.avi binary
*.jpeg binary *.bmp binary
*.jpg binary
*.exr binary *.exr binary
*.ico binary *.ico binary
*.jpeg binary
*.jpg binary
*.png binary
*.a binary *.a binary
*.so binary *.so binary
@ -47,6 +63,7 @@ CMakeLists.txt text whitespace=tabwidth=2
*.pbxproj binary *.pbxproj binary
*.vec binary *.vec binary
*.doc binary *.doc binary
*.dia binary
*.xml -text whitespace=cr-at-eol *.xml -text whitespace=cr-at-eol
*.yml -text whitespace=cr-at-eol *.yml -text whitespace=cr-at-eol
@ -55,9 +72,12 @@ CMakeLists.txt text whitespace=tabwidth=2
.cproject -text whitespace=cr-at-eol merge=union .cproject -text whitespace=cr-at-eol merge=union
org.eclipse.jdt.core.prefs -text whitespace=cr-at-eol merge=union org.eclipse.jdt.core.prefs -text whitespace=cr-at-eol merge=union
*.vcproj text eol=crlf merge=union
*.bat text eol=crlf *.bat text eol=crlf
*.cmd text eol=crlf *.cmd text eol=crlf
*.cmd.tmpl text eol=crlf *.cmd.tmpl text eol=crlf
*.dsp text eol=crlf -whitespace
*.sln text eol=crlf -whitespace
*.vcproj text eol=crlf -whitespace merge=union
*.vcxproj text eol=crlf -whitespace merge=union
*.sh text eol=lf *.sh text eol=lf

@ -0,0 +1 @@
* -whitespace

@ -8,4 +8,4 @@ set(HAVE_GENTOO_FFMPEG 1)
set(ALIASOF_libavcodec_VERSION 53.61.100) set(ALIASOF_libavcodec_VERSION 53.61.100)
set(ALIASOF_libavformat_VERSION 53.32.100) set(ALIASOF_libavformat_VERSION 53.32.100)
set(ALIASOF_libavutil_VERSION 51.35.100) set(ALIASOF_libavutil_VERSION 51.35.100)
set(ALIASOF_libswscale_VERSION 2.1.100) set(ALIASOF_libswscale_VERSION 2.1.100)

@ -1,2 +1,2 @@
set path=c:\dev\msys32\bin;%path% & gcc -Wall -shared -o opencv_ffmpeg.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat -lavcodec -lavdevice -lswscale -lavutil -lwsock32 set path=c:\dev\msys32\bin;%path% & gcc -Wall -shared -o opencv_ffmpeg.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat -lavcodec -lavdevice -lswscale -lavutil -lwsock32
set path=c:\dev\msys64\bin;%path% & gcc -m64 -Wall -shared -o opencv_ffmpeg_64.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat64 -lavcodec64 -lavdevice64 -lswscale64 -lavutil64 -lavcore64 -lwsock32 -lws2_32 set path=c:\dev\msys64\bin;%path% & gcc -m64 -Wall -shared -o opencv_ffmpeg_64.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat64 -lavcodec64 -lavdevice64 -lswscale64 -lavutil64 -lavcore64 -lwsock32 -lws2_32

@ -40,5 +40,3 @@ How to update opencv_ffmpeg.dll and opencv_ffmpeg_64.dll when a new version of F
8. Then, go to <opencv>\3rdparty\ffmpeg, edit make.bat 8. Then, go to <opencv>\3rdparty\ffmpeg, edit make.bat
(change paths to the actual paths to your msys32 and msys64 distributions) and then run make.bat (change paths to the actual paths to your msys32 and msys64 distributions) and then run make.bat

@ -168,4 +168,3 @@
/* Support Deflate compression */ /* Support Deflate compression */
#define ZIP_SUPPORT 1 #define ZIP_SUPPORT 1

@ -1 +1 @@
tbb*.tgz tbb*.tgz

@ -460,6 +460,8 @@ include(cmake/OpenCVGenAndroidMK.cmake)
# Generate OpenCVСonfig.cmake and OpenCVConfig-version.cmake for cmake projects # Generate OpenCVСonfig.cmake and OpenCVConfig-version.cmake for cmake projects
include(cmake/OpenCVGenConfig.cmake) include(cmake/OpenCVGenConfig.cmake)
# Generate Info.plist for the IOS framework
include(cmake/OpenCVGenInfoPlist.cmake)
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Summary: # Summary:
@ -863,4 +865,3 @@ ocv_finalize_status()
if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
message(WARNING "The source directory is the same as binary directory. \"make clean\" may damage the source tree") message(WARNING "The source directory is the same as binary directory. \"make clean\" may damage the source tree")
endif() endif()

@ -3,4 +3,3 @@ add_definitions(-D__OPENCV_BUILD=1)
add_subdirectory(haartraining) add_subdirectory(haartraining)
add_subdirectory(traincascade) add_subdirectory(traincascade)
add_subdirectory(sft) add_subdirectory(sft)

@ -79,4 +79,3 @@ if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(opencv_haartraining PROPERTIES FOLDER "applications") set_target_properties(opencv_haartraining PROPERTIES FOLDER "applications")
set_target_properties(opencv_haartraining_engine PROPERTIES FOLDER "applications") set_target_properties(opencv_haartraining_engine PROPERTIES FOLDER "applications")
endif() endif()

@ -90,4 +90,3 @@ int icvGetIdxAt( CvMat* idx, int pos )
void icvSave( const CvArr* ptr, const char* filename, int line ); void icvSave( const CvArr* ptr, const char* filename, int line );
#endif /* __CVCOMMON_H_ */ #endif /* __CVCOMMON_H_ */

@ -375,4 +375,3 @@ int main( int argc, char* argv[] )
return 0; return 0;
} }

@ -30,4 +30,4 @@ if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "applications") set_target_properties(${the_target} PROPERTIES FOLDER "applications")
endif() endif()
install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main) install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main)

@ -159,4 +159,4 @@ std::ostream& sft::operator<<(std::ostream& out, const Config& m)
<< std::setw(14) << std::left << "featureType" << m.featureType << std::endl; << std::setw(14) << std::left << "featureType" << m.featureType << std::endl;
return out; return out;
} }

@ -71,4 +71,4 @@ namespace sft
# define dprintf(format, ...) # define dprintf(format, ...)
#endif #endif
#endif #endif

@ -135,4 +135,4 @@ std::ostream& operator<<(std::ostream& out, const Config& m);
} }
#endif #endif

@ -64,4 +64,4 @@ private:
}; };
} }
#endif #endif

@ -165,4 +165,4 @@ int main(int argc, char** argv)
fso.release(); fso.release();
std::cout << "Training complete..." << std::endl; std::cout << "Training complete..." << std::endl;
return 0; return 0;
} }

@ -34,4 +34,3 @@ if(ENABLE_SOLUTION_FOLDERS)
endif() endif()
install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main) install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main)

@ -26,8 +26,8 @@ else()
set(HAVE_MSVC2012 TRUE) set(HAVE_MSVC2012 TRUE)
endif() endif()
TRY_COMPILE(HAVE_WINRT_SDK try_compile(HAVE_WINRT_SDK
"${OPENCV_BINARY_DIR}/CMakeFiles/CMakeTmp" "${OpenCV_BINARY_DIR}"
"${OpenCV_SOURCE_DIR}/cmake/checks/winrttest.cpp") "${OpenCV_SOURCE_DIR}/cmake/checks/winrttest.cpp")
if (ENABLE_WINRT_MODE AND HAVE_WINRT_SDK AND HAVE_MSVC2012 AND HAVE_MSPDK) if (ENABLE_WINRT_MODE AND HAVE_WINRT_SDK AND HAVE_MSVC2012 AND HAVE_MSPDK)
@ -98,4 +98,3 @@ if(NOT BUILD_WITH_DEBUG_INFO AND NOT MSVC)
string(REPLACE "/Zi" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") string(REPLACE "/Zi" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
endif() endif()

@ -233,6 +233,10 @@ if(MSVC)
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /fp:fast") # !! important - be on the same wave with x64 compilers set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /fp:fast") # !! important - be on the same wave with x64 compilers
endif() endif()
endif() endif()
if(OPENCV_WARNINGS_ARE_ERRORS)
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /WX")
endif()
endif() endif()
# Extra link libs if the user selects building static libs: # Extra link libs if the user selects building static libs:
@ -294,4 +298,4 @@ if(MSVC)
if(NOT ENABLE_NOISY_WARNINGS) if(NOT ENABLE_NOISY_WARNINGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251") #class 'std::XXX' needs to have dll-interface to be used by clients of YYY set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251") #class 'std::XXX' needs to have dll-interface to be used by clients of YYY
endif() endif()
endif() endif()

@ -136,17 +136,20 @@ endfunction()
# ------------------------------------------------------------------------ # ------------------------------------------------------------------------
# This is auxiliary function called from set_ipp_variables() # This is auxiliary function called from set_ipp_variables()
# to set IPP_LIBRARIES variable in IPP 7.x style # to set IPP_LIBRARIES variable in IPP 7.x and 8.x style
# ------------------------------------------------------------------------ # ------------------------------------------------------------------------
function(set_ipp_new_libraries _LATEST_VERSION) function(set_ipp_new_libraries _LATEST_VERSION)
set(IPP_PREFIX "ipp") set(IPP_PREFIX "ipp")
if(${_LATEST_VERSION} VERSION_LESS "8.0") if(${_LATEST_VERSION} VERSION_LESS "8.0")
set(IPP_SUFFIX "_l") # static not threaded libs suffix set(IPP_SUFFIX "_l") # static not threaded libs suffix IPP 7.x
else() else()
set(IPP_SUFFIX "") # static not threaded libs suffix if(WIN32)
set(IPP_SUFFIX "mt") # static not threaded libs suffix IPP 8.x for Windows
else()
set(IPP_SUFFIX "") # static not threaded libs suffix IPP 8.x for Linux/OS X
endif()
endif() endif()
set(IPP_THRD "_t") # static threaded libs suffix
set(IPPCORE "core") # core functionality set(IPPCORE "core") # core functionality
set(IPPSP "s") # signal processing set(IPPSP "s") # signal processing
set(IPPIP "i") # image processing set(IPPIP "i") # image processing
@ -218,7 +221,7 @@ function(set_ipp_variables _LATEST_VERSION)
set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib/ia32 PARENT_SCOPE) set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib/ia32 PARENT_SCOPE)
endif() endif()
# set IPP_LIBRARIES variable (7.x lib names) # set IPP_LIBRARIES variable (7.x or 8.x lib names)
set_ipp_new_libraries(${_LATEST_VERSION}) set_ipp_new_libraries(${_LATEST_VERSION})
set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE) set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE)
message(STATUS "IPP libs: ${IPP_LIBRARIES}") message(STATUS "IPP libs: ${IPP_LIBRARIES}")
@ -343,4 +346,4 @@ if(WIN32 AND MINGW AND NOT IPP_LATEST_VERSION_MAJOR LESS 7)
# See http://code.opencv.org/issues/1906 for additional details # See http://code.opencv.org/issues/1906 for additional details
set(MSV_NTDLL "ntdll") set(MSV_NTDLL "ntdll")
set(IPP_LIBRARIES ${IPP_LIBRARIES} ${MSV_NTDLL}${IPP_LIB_SUFFIX}) set(IPP_LIBRARIES ${IPP_LIBRARIES} ${MSV_NTDLL}${IPP_LIB_SUFFIX})
endif() endif()

@ -5,12 +5,11 @@
#--- Win32 UI --- #--- Win32 UI ---
ocv_clear_vars(HAVE_WIN32UI) ocv_clear_vars(HAVE_WIN32UI)
if(WITH_WIN32UI) if(WITH_WIN32UI)
TRY_COMPILE(HAVE_WIN32UI try_compile(HAVE_WIN32UI
"${OPENCV_BINARY_DIR}/CMakeFiles/CMakeTmp" "${OpenCV_BINARY_DIR}"
"${OpenCV_SOURCE_DIR}/cmake/checks/win32uitest.cpp" "${OpenCV_SOURCE_DIR}/cmake/checks/win32uitest.cpp"
CMAKE_FLAGS "\"user32.lib\" \"gdi32.lib\"" CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=user32;gdi32")
OUTPUT_VARIABLE OUTPUT) endif()
endif(WITH_WIN32UI)
# --- QT4 --- # --- QT4 ---
ocv_clear_vars(HAVE_QT HAVE_QT5) ocv_clear_vars(HAVE_QT HAVE_QT5)

@ -149,7 +149,7 @@ if(WITH_JASPER)
endif() endif()
# --- libpng (optional, should be searched after zlib) --- # --- libpng (optional, should be searched after zlib) ---
if(WITH_PNG AND NOT IOS) if(WITH_PNG)
if(BUILD_PNG) if(BUILD_PNG)
ocv_clear_vars(PNG_FOUND) ocv_clear_vars(PNG_FOUND)
else() else()

@ -27,7 +27,7 @@ endif(WITH_CUDA)
# --- Eigen --- # --- Eigen ---
if(WITH_EIGEN) if(WITH_EIGEN)
find_path(EIGEN_INCLUDE_PATH "Eigen/Core" find_path(EIGEN_INCLUDE_PATH "Eigen/Core"
PATHS /usr/local /opt /usr $ENV{EIGEN_ROOT}/include ENV ProgramFiles ENV ProgramW6432 PATHS /usr/local /opt /usr $ENV{EIGEN_ROOT}/include ENV ProgramFiles ENV ProgramW6432
PATH_SUFFIXES include/eigen3 include/eigen2 Eigen/include/eigen3 Eigen/include/eigen2 PATH_SUFFIXES include/eigen3 include/eigen2 Eigen/include/eigen3 Eigen/include/eigen2
DOC "The path to Eigen3/Eigen2 headers" DOC "The path to Eigen3/Eigen2 headers"
CMAKE_FIND_ROOT_PATH_BOTH) CMAKE_FIND_ROOT_PATH_BOTH)

@ -3,13 +3,12 @@
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
ocv_clear_vars(HAVE_VFW) ocv_clear_vars(HAVE_VFW)
if (WITH_VFW) if(WITH_VFW)
TRY_COMPILE(HAVE_VFW try_compile(HAVE_VFW
"${OPENCV_BINARY_DIR}/CMakeFiles/CMakeTmp" "${OpenCV_BINARY_DIR}"
"${OpenCV_SOURCE_DIR}/cmake/checks/vfwtest.cpp" "${OpenCV_SOURCE_DIR}/cmake/checks/vfwtest.cpp"
CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=vfw32" CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=vfw32")
OUTPUT_VARIABLE OUTPUT) endif(WITH_VFW)
endif(WITH_VFW)
# --- GStreamer --- # --- GStreamer ---
ocv_clear_vars(HAVE_GSTREAMER) ocv_clear_vars(HAVE_GSTREAMER)
@ -271,8 +270,10 @@ if(WITH_AVFOUNDATION)
endif() endif()
# --- QuickTime --- # --- QuickTime ---
if(WITH_QUICKTIME) if (NOT IOS)
set(HAVE_QUICKTIME YES) if(WITH_QUICKTIME)
elseif(APPLE) set(HAVE_QUICKTIME YES)
set(HAVE_QTKIT YES) elseif(APPLE)
set(HAVE_QTKIT YES)
endif()
endif() endif()

@ -19,7 +19,7 @@ set(XIMEA_LIBRARY_DIR)
if(WIN32) if(WIN32)
# Try to find the XIMEA API path in registry. # Try to find the XIMEA API path in registry.
GET_FILENAME_COMPONENT(XIMEA_PATH "[HKEY_CURRENT_USER\\Software\\XIMEA\\CamSupport\\API;Path]" ABSOLUTE) GET_FILENAME_COMPONENT(XIMEA_PATH "[HKEY_CURRENT_USER\\Software\\XIMEA\\CamSupport\\API;Path]" ABSOLUTE)
if(EXISTS ${XIMEA_PATH}) if(EXISTS ${XIMEA_PATH})
set(XIMEA_FOUND 1) set(XIMEA_FOUND 1)
# set LIB folders # set LIB folders
@ -43,4 +43,4 @@ endif()
mark_as_advanced(FORCE XIMEA_FOUND) mark_as_advanced(FORCE XIMEA_FOUND)
mark_as_advanced(FORCE XIMEA_PATH) mark_as_advanced(FORCE XIMEA_PATH)
mark_as_advanced(FORCE XIMEA_LIBRARY_DIR) mark_as_advanced(FORCE XIMEA_LIBRARY_DIR)

@ -0,0 +1,4 @@
if(IOS)
configure_file("${OpenCV_SOURCE_DIR}/platforms/ios/Info.plist.in"
"${CMAKE_BINARY_DIR}/ios/Info.plist")
endif()

@ -77,7 +77,7 @@ MACRO(ocv_check_compiler_flag LANG FLAG RESULT)
if(_fname) if(_fname)
MESSAGE(STATUS "Performing Test ${RESULT}") MESSAGE(STATUS "Performing Test ${RESULT}")
TRY_COMPILE(${RESULT} TRY_COMPILE(${RESULT}
${CMAKE_BINARY_DIR} "${CMAKE_BINARY_DIR}"
"${_fname}" "${_fname}"
COMPILE_DEFINITIONS "${FLAG}" COMPILE_DEFINITIONS "${FLAG}"
OUTPUT_VARIABLE OUTPUT) OUTPUT_VARIABLE OUTPUT)
@ -515,4 +515,4 @@ function(ocv_source_group group)
cmake_parse_arguments(OCV_SOURCE_GROUP "" "" "GLOB" ${ARGN}) cmake_parse_arguments(OCV_SOURCE_GROUP "" "" "GLOB" ${ARGN})
file(GLOB srcs ${OCV_SOURCE_GROUP_GLOB}) file(GLOB srcs ${OCV_SOURCE_GROUP_GLOB})
source_group(${group} FILES ${srcs}) source_group(${group} FILES ${srcs})
endfunction() endfunction()

@ -11,4 +11,4 @@ int main()
printf("%d.%d ", prop.major, prop.minor); printf("%d.%d ", prop.major, prop.minor);
} }
return 0; return 0;
} }

@ -7,4 +7,4 @@ int main()
AVIFileInit(); AVIFileInit();
AVIFileExit(); AVIFileExit();
return 0; return 0;
} }

@ -3,4 +3,4 @@
int main(int, char**) int main(int, char**)
{ {
return 0; return 0;
} }

@ -32,4 +32,4 @@ foreach(cl ${cl_list})
file(APPEND ${OUTPUT} "const char* ${cl_filename}=\"${lines};\n") file(APPEND ${OUTPUT} "const char* ${cl_filename}=\"${lines};\n")
endforeach() endforeach()
file(APPEND ${OUTPUT} "}\n}\n") file(APPEND ${OUTPUT} "}\n}\n")

@ -23,5 +23,3 @@ FOREACH(file ${files})
MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
ENDIF(EXISTS "$ENV{DESTDIR}${file}") ENDIF(EXISTS "$ENV{DESTDIR}${file}")
ENDFOREACH(file) ENDFOREACH(file)

@ -6,4 +6,4 @@
* *
*/ */
@OPENCV_MODULE_DEFINITIONS_CONFIGMAKE@ @OPENCV_MODULE_DEFINITIONS_CONFIGMAKE@

@ -1,4 +1,4 @@
function insertIframe (elementId, iframeSrc) function insertIframe (elementId, iframeSrc)
{ {
var iframe; var iframe;
if (document.createElement && (iframe = document.createElement('iframe'))) if (document.createElement && (iframe = document.createElement('iframe')))
@ -10,4 +10,3 @@ function insertIframe (elementId, iframeSrc)
element.parentNode.replaceChild(iframe, element); element.parentNode.replaceChild(iframe, element);
} }
} }

@ -387,4 +387,4 @@ div.sphinxsidebar #searchbox input[type="text"] {
div.sphinxsidebar #searchbox input[type="submit"] { div.sphinxsidebar #searchbox input[type="submit"] {
width:auto; width:auto;
} }

@ -28,4 +28,4 @@ feedbacklinkcolor = #ffffff
bodyfont = sans-serif bodyfont = sans-serif
headfont = 'Trebuchet MS', sans-serif headfont = 'Trebuchet MS', sans-serif
guifont = "Lucida Sans","Lucida Sans Unicode","Lucida Grande",Verdana,Arial,Helvetica,sans-serif guifont = "Lucida Sans","Lucida Sans Unicode","Lucida Grande",Verdana,Arial,Helvetica,sans-serif
lang = none lang = none

@ -184,5 +184,3 @@ p = RSTParser()
for m in opencv_module_list: for m in opencv_module_list:
print "\n\n*************************** " + m + " *************************\n" print "\n\n*************************** " + m + " *************************\n"
p.check_module_docs(m) p.check_module_docs(m)

@ -39,4 +39,3 @@
#7 & #8 & #9 #7 & #8 & #9
\end{bmatrix} \end{bmatrix}
} }

@ -75,11 +75,11 @@
% if using A4 paper. (This probably isn't strictly necessary.) % if using A4 paper. (This probably isn't strictly necessary.)
% If using another size paper, use default 1cm margins. % If using another size paper, use default 1cm margins.
\ifthenelse{\lengthtest { \paperwidth = 11in}} \ifthenelse{\lengthtest { \paperwidth = 11in}}
{ \geometry{top=.5in,left=.5in,right=.5in,bottom=.5in} } { \geometry{top=.5in,left=.5in,right=.5in,bottom=.5in} }
{\ifthenelse{ \lengthtest{ \paperwidth = 297mm}} {\ifthenelse{ \lengthtest{ \paperwidth = 297mm}}
{\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} } {\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} }
{\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} } {\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} }
} }
% Turn off header and footer % Turn off header and footer
% \pagestyle{empty} % \pagestyle{empty}

@ -3667,4 +3667,3 @@ class YErrorBars:
output.append(LineAxis(x, start, x, end, start, end, bars, False, False, **self.attr).SVG(trans)) output.append(LineAxis(x, start, x, end, start, end, bars, False, False, **self.attr).SVG(trans))
return output return output

@ -130,7 +130,7 @@ To compile it, assuming OpenCV is correctly installed, use the following command
Here is a code explanation : Here is a code explanation :
Retina definition is present in the bioinspired package and a simple include allows to use it. You can rather use the specific header : *opencv2/bioinspired.hpp* if you prefer but then include the other required openv modules : *opencv2/core.hpp* and *opencv2/highgui.hpp* Retina definition is present in the bioinspired package and a simple include allows to use it. You can rather use the specific header : *opencv2/bioinspired.hpp* if you prefer but then include the other required openv modules : *opencv2/core.hpp* and *opencv2/highgui.hpp*
.. code-block:: cpp .. code-block:: cpp

@ -8,23 +8,23 @@ Cameras have been around for a long-long time. However, with the introduction of
Theory Theory
====== ======
For the distortion OpenCV takes into account the radial and tangential factors. For the radial factor one uses the following formula: For the distortion OpenCV takes into account the radial and tangential factors. For the radial factor one uses the following formula:
.. math:: .. math::
x_{corrected} = x( 1 + k_1 r^2 + k_2 r^4 + k_3 r^6) \\ x_{corrected} = x( 1 + k_1 r^2 + k_2 r^4 + k_3 r^6) \\
y_{corrected} = y( 1 + k_1 r^2 + k_2 r^4 + k_3 r^6) y_{corrected} = y( 1 + k_1 r^2 + k_2 r^4 + k_3 r^6)
So for an old pixel point at :math:`(x,y)` coordinates in the input image, its position on the corrected output image will be :math:`(x_{corrected} y_{corrected})`. The presence of the radial distortion manifests in form of the "barrel" or "fish-eye" effect. So for an old pixel point at :math:`(x,y)` coordinates in the input image, its position on the corrected output image will be :math:`(x_{corrected} y_{corrected})`. The presence of the radial distortion manifests in form of the "barrel" or "fish-eye" effect.
Tangential distortion occurs because the image taking lenses are not perfectly parallel to the imaging plane. It can be corrected via the formulas: Tangential distortion occurs because the image taking lenses are not perfectly parallel to the imaging plane. It can be corrected via the formulas:
.. math:: .. math::
x_{corrected} = x + [ 2p_1xy + p_2(r^2+2x^2)] \\ x_{corrected} = x + [ 2p_1xy + p_2(r^2+2x^2)] \\
y_{corrected} = y + [ p_1(r^2+ 2y^2)+ 2p_2xy] y_{corrected} = y + [ p_1(r^2+ 2y^2)+ 2p_2xy]
So we have five distortion parameters which in OpenCV are presented as one row matrix with 5 columns: So we have five distortion parameters which in OpenCV are presented as one row matrix with 5 columns:
.. math:: .. math::
@ -38,7 +38,7 @@ Now for the unit conversion we use the following formula:
Here the presence of :math:`w` is explained by the use of homography coordinate system (and :math:`w=Z`). The unknown parameters are :math:`f_x` and :math:`f_y` (camera focal lengths) and :math:`(c_x, c_y)` which are the optical centers expressed in pixels coordinates. If for both axes a common focal length is used with a given :math:`a` aspect ratio (usually 1), then :math:`f_y=f_x*a` and in the upper formula we will have a single focal length :math:`f`. The matrix containing these four parameters is referred to as the *camera matrix*. While the distortion coefficients are the same regardless of the camera resolutions used, these should be scaled along with the current resolution from the calibrated resolution. Here the presence of :math:`w` is explained by the use of homography coordinate system (and :math:`w=Z`). The unknown parameters are :math:`f_x` and :math:`f_y` (camera focal lengths) and :math:`(c_x, c_y)` which are the optical centers expressed in pixels coordinates. If for both axes a common focal length is used with a given :math:`a` aspect ratio (usually 1), then :math:`f_y=f_x*a` and in the upper formula we will have a single focal length :math:`f`. The matrix containing these four parameters is referred to as the *camera matrix*. While the distortion coefficients are the same regardless of the camera resolutions used, these should be scaled along with the current resolution from the calibrated resolution.
The process of determining these two matrices is the calibration. Calculation of these parameters is done through basic geometrical equations. The equations used depend on the chosen calibrating objects. Currently OpenCV supports three types of objects for calibration: The process of determining these two matrices is the calibration. Calculation of these parameters is done through basic geometrical equations. The equations used depend on the chosen calibrating objects. Currently OpenCV supports three types of objects for calibration:
.. container:: enumeratevisibleitemswithsquare .. container:: enumeratevisibleitemswithsquare
@ -148,7 +148,7 @@ Explanation
Depending on the type of the input pattern you use either the :calib3d:`findChessboardCorners <findchessboardcorners>` or the :calib3d:`findCirclesGrid <findcirclesgrid>` function. For both of them you pass the current image and the size of the board and you'll get the positions of the patterns. Furthermore, they return a boolean variable which states if the pattern was found in the input (we only need to take into account those images where this is true!). Depending on the type of the input pattern you use either the :calib3d:`findChessboardCorners <findchessboardcorners>` or the :calib3d:`findCirclesGrid <findcirclesgrid>` function. For both of them you pass the current image and the size of the board and you'll get the positions of the patterns. Furthermore, they return a boolean variable which states if the pattern was found in the input (we only need to take into account those images where this is true!).
Then again in case of cameras we only take camera images when an input delay time is passed. This is done in order to allow user moving the chessboard around and getting different images. Similar images result in similar equations, and similar equations at the calibration step will form an ill-posed problem, so the calibration will fail. For square images the positions of the corners are only approximate. We may improve this by calling the :feature2d:`cornerSubPix <cornersubpix>` function. It will produce better calibration result. After this we add a valid inputs result to the *imagePoints* vector to collect all of the equations into a single container. Finally, for visualization feedback purposes we will draw the found points on the input image using :calib3d:`findChessboardCorners <drawchessboardcorners>` function. Then again in case of cameras we only take camera images when an input delay time is passed. This is done in order to allow user moving the chessboard around and getting different images. Similar images result in similar equations, and similar equations at the calibration step will form an ill-posed problem, so the calibration will fail. For square images the positions of the corners are only approximate. We may improve this by calling the :feature2d:`cornerSubPix <cornersubpix>` function. It will produce better calibration result. After this we add a valid inputs result to the *imagePoints* vector to collect all of the equations into a single container. Finally, for visualization feedback purposes we will draw the found points on the input image using :calib3d:`findChessboardCorners <drawchessboardcorners>` function.
.. code-block:: cpp .. code-block:: cpp
@ -175,7 +175,7 @@ Explanation
drawChessboardCorners( view, s.boardSize, Mat(pointBuf), found ); drawChessboardCorners( view, s.boardSize, Mat(pointBuf), found );
} }
#. **Show state and result to the user, plus command line control of the application**. This part shows text output on the image. #. **Show state and result to the user, plus command line control of the application**. This part shows text output on the image.
.. code-block:: cpp .. code-block:: cpp
@ -199,7 +199,7 @@ Explanation
if( blinkOutput ) if( blinkOutput )
bitwise_not(view, view); bitwise_not(view, view);
If we ran calibration and got camera's matrix with the distortion coefficients we may want to correct the image using :imgproc_geometric:`undistort <undistort>` function: If we ran calibration and got camera's matrix with the distortion coefficients we may want to correct the image using :imgproc_geometric:`undistort <undistort>` function:
.. code-block:: cpp .. code-block:: cpp
@ -229,7 +229,7 @@ Explanation
imagePoints.clear(); imagePoints.clear();
} }
#. **Show the distortion removal for the images too**. When you work with an image list it is not possible to remove the distortion inside the loop. Therefore, you must do this after the loop. Taking advantage of this now I'll expand the :imgproc_geometric:`undistort <undistort>` function, which is in fact first calls :imgproc_geometric:`initUndistortRectifyMap <initundistortrectifymap>` to find transformation matrices and then performs transformation using :imgproc_geometric:`remap <remap>` function. Because, after successful calibration map calculation needs to be done only once, by using this expanded form you may speed up your application: #. **Show the distortion removal for the images too**. When you work with an image list it is not possible to remove the distortion inside the loop. Therefore, you must do this after the loop. Taking advantage of this now I'll expand the :imgproc_geometric:`undistort <undistort>` function, which is in fact first calls :imgproc_geometric:`initUndistortRectifyMap <initundistortrectifymap>` to find transformation matrices and then performs transformation using :imgproc_geometric:`remap <remap>` function. Because, after successful calibration map calculation needs to be done only once, by using this expanded form you may speed up your application:
.. code-block:: cpp .. code-block:: cpp
@ -256,7 +256,7 @@ Explanation
The calibration and save The calibration and save
======================== ========================
Because the calibration needs to be done only once per camera, it makes sense to save it after a successful calibration. This way later on you can just load these values into your program. Due to this we first make the calibration, and if it succeeds we save the result into an OpenCV style XML or YAML file, depending on the extension you give in the configuration file. Because the calibration needs to be done only once per camera, it makes sense to save it after a successful calibration. This way later on you can just load these values into your program. Due to this we first make the calibration, and if it succeeds we save the result into an OpenCV style XML or YAML file, depending on the extension you give in the configuration file.
Therefore in the first function we just split up these two processes. Because we want to save many of the calibration variables we'll create these variables here and pass on both of them to the calibration and saving function. Again, I'll not show the saving part as that has little in common with the calibration. Explore the source file in order to find out how and what: Therefore in the first function we just split up these two processes. Because we want to save many of the calibration variables we'll create these variables here and pass on both of them to the calibration and saving function. Again, I'll not show the saving part as that has little in common with the calibration. Explore the source file in order to find out how and what:
@ -280,7 +280,7 @@ Therefore in the first function we just split up these two processes. Because we
return ok; return ok;
} }
We do the calibration with the help of the :calib3d:`calibrateCamera <calibratecamera>` function. It has the following parameters: We do the calibration with the help of the :calib3d:`calibrateCamera <calibratecamera>` function. It has the following parameters:
.. container:: enumeratevisibleitemswithsquare .. container:: enumeratevisibleitemswithsquare
@ -318,11 +318,11 @@ We do the calibration with the help of the :calib3d:`calibrateCamera <calibratec
calcBoardCornerPositions(s.boardSize, s.squareSize, objectPoints[0], s.calibrationPattern); calcBoardCornerPositions(s.boardSize, s.squareSize, objectPoints[0], s.calibrationPattern);
objectPoints.resize(imagePoints.size(),objectPoints[0]); objectPoints.resize(imagePoints.size(),objectPoints[0]);
+ The image points. This is a vector of *Point2f* vector which for each input image contains coordinates of the important points (corners for chessboard and centers of the circles for the circle pattern). We have already collected this from :calib3d:`findChessboardCorners <findchessboardcorners>` or :calib3d:`findCirclesGrid <findcirclesgrid>` function. We just need to pass it on. + The image points. This is a vector of *Point2f* vector which for each input image contains coordinates of the important points (corners for chessboard and centers of the circles for the circle pattern). We have already collected this from :calib3d:`findChessboardCorners <findchessboardcorners>` or :calib3d:`findCirclesGrid <findcirclesgrid>` function. We just need to pass it on.
+ The size of the image acquired from the camera, video file or the images. + The size of the image acquired from the camera, video file or the images.
+ The camera matrix. If we used the fixed aspect ratio option we need to set the :math:`f_x` to zero: + The camera matrix. If we used the fixed aspect ratio option we need to set the :math:`f_x` to zero:
.. code-block:: cpp .. code-block:: cpp
@ -336,16 +336,16 @@ We do the calibration with the help of the :calib3d:`calibrateCamera <calibratec
distCoeffs = Mat::zeros(8, 1, CV_64F); distCoeffs = Mat::zeros(8, 1, CV_64F);
+ For all the views the function will calculate rotation and translation vectors which transform the object points (given in the model coordinate space) to the image points (given in the world coordinate space). The 7-th and 8-th parameters are the output vector of matrices containing in the i-th position the rotation and translation vector for the i-th object point to the i-th image point. + For all the views the function will calculate rotation and translation vectors which transform the object points (given in the model coordinate space) to the image points (given in the world coordinate space). The 7-th and 8-th parameters are the output vector of matrices containing in the i-th position the rotation and translation vector for the i-th object point to the i-th image point.
+ The final argument is the flag. You need to specify here options like fix the aspect ratio for the focal length, assume zero tangential distortion or to fix the principal point. + The final argument is the flag. You need to specify here options like fix the aspect ratio for the focal length, assume zero tangential distortion or to fix the principal point.
.. code-block:: cpp .. code-block:: cpp
double rms = calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, double rms = calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix,
distCoeffs, rvecs, tvecs, s.flag|CV_CALIB_FIX_K4|CV_CALIB_FIX_K5); distCoeffs, rvecs, tvecs, s.flag|CV_CALIB_FIX_K4|CV_CALIB_FIX_K5);
+ The function returns the average re-projection error. This number gives a good estimation of precision of the found parameters. This should be as close to zero as possible. Given the intrinsic, distortion, rotation and translation matrices we may calculate the error for one view by using the :calib3d:`projectPoints <projectpoints>` to first transform the object point to image point. Then we calculate the absolute norm between what we got with our transformation and the corner/circle finding algorithm. To find the average error we calculate the arithmetical mean of the errors calculated for all the calibration images. + The function returns the average re-projection error. This number gives a good estimation of precision of the found parameters. This should be as close to zero as possible. Given the intrinsic, distortion, rotation and translation matrices we may calculate the error for one view by using the :calib3d:`projectPoints <projectpoints>` to first transform the object point to image point. Then we calculate the absolute norm between what we got with our transformation and the corner/circle finding algorithm. To find the average error we calculate the arithmetical mean of the errors calculated for all the calibration images.
.. code-block:: cpp .. code-block:: cpp
@ -378,7 +378,7 @@ We do the calibration with the help of the :calib3d:`calibrateCamera <calibratec
Results Results
======= =======
Let there be :download:`this input chessboard pattern <../../../pattern.png>` which has a size of 9 X 6. I've used an AXIS IP camera to create a couple of snapshots of the board and saved it into VID5 directory. I've put this inside the :file:`images/CameraCalibration` folder of my working directory and created the following :file:`VID5.XML` file that describes which images to use: Let there be :download:`this input chessboard pattern <../../../pattern.png>` which has a size of 9 X 6. I've used an AXIS IP camera to create a couple of snapshots of the board and saved it into VID5 directory. I've put this inside the :file:`images/CameraCalibration` folder of my working directory and created the following :file:`VID5.XML` file that describes which images to use:
.. code-block:: xml .. code-block:: xml
@ -396,7 +396,7 @@ Let there be :download:`this input chessboard pattern <../../../pattern.png>` wh
</images> </images>
</opencv_storage> </opencv_storage>
Then passed :file:`images/CameraCalibration/VID5/VID5.XML` as an input in the configuration file. Here's a chessboard pattern found during the runtime of the application: Then passed :file:`images/CameraCalibration/VID5/VID5.XML` as an input in the configuration file. Here's a chessboard pattern found during the runtime of the application:
.. image:: images/fileListImage.jpg .. image:: images/fileListImage.jpg
:alt: A found chessboard :alt: A found chessboard
@ -433,7 +433,7 @@ In both cases in the specified output XML/YAML file you'll find the camera and d
-4.1802327176423804e-001 5.0715244063187526e-001 0. 0. -4.1802327176423804e-001 5.0715244063187526e-001 0. 0.
-5.7843597214487474e-001</data></Distortion_Coefficients> -5.7843597214487474e-001</data></Distortion_Coefficients>
Add these values as constants to your program, call the :imgproc_geometric:`initUndistortRectifyMap <initundistortrectifymap>` and the :imgproc_geometric:`remap <remap>` function to remove distortion and enjoy distortion free inputs for cheap and low quality cameras. Add these values as constants to your program, call the :imgproc_geometric:`initUndistortRectifyMap <initundistortrectifymap>` and the :imgproc_geometric:`remap <remap>` function to remove distortion and enjoy distortion free inputs for cheap and low quality cameras.
You may observe a runtime instance of this on the `YouTube here <https://www.youtube.com/watch?v=ViPN810E0SU>`_. You may observe a runtime instance of this on the `YouTube here <https://www.youtube.com/watch?v=ViPN810E0SU>`_.

@ -59,4 +59,4 @@ Now, let us write a code that detects a chessboard in a new image and finds its
#. #.
Calculate reprojection error like it is done in ``calibration`` sample (see ``opencv/samples/cpp/calibration.cpp``, function ``computeReprojectionErrors``). Calculate reprojection error like it is done in ``calibration`` sample (see ``opencv/samples/cpp/calibration.cpp``, function ``computeReprojectionErrors``).
Question: how to calculate the distance from the camera origin to any of the corners? Question: how to calculate the distance from the camera origin to any of the corners?

@ -277,4 +277,3 @@ You may observe a runtime instance of this on the `YouTube here <https://www.you
<div align="center"> <div align="center">
<iframe title="File Input and Output using XML and YAML files in OpenCV" width="560" height="349" src="http://www.youtube.com/embed/A4yqVnByMMM?rel=0&loop=1" frameborder="0" allowfullscreen align="middle"></iframe> <iframe title="File Input and Output using XML and YAML files in OpenCV" width="560" height="349" src="http://www.youtube.com/embed/A4yqVnByMMM?rel=0&loop=1" frameborder="0" allowfullscreen align="middle"></iframe>
</div> </div>

@ -127,6 +127,3 @@ You may observe a runtime instance of this on the `YouTube here <https://www.you
<div align="center"> <div align="center">
<iframe title="Interoperability with OpenCV 1" width="560" height="349" src="http://www.youtube.com/embed/qckm-zvo31w?rel=0&loop=1" frameborder="0" allowfullscreen align="middle"></iframe> <iframe title="Interoperability with OpenCV 1" width="560" height="349" src="http://www.youtube.com/embed/qckm-zvo31w?rel=0&loop=1" frameborder="0" allowfullscreen align="middle"></iframe>
</div> </div>

@ -218,4 +218,4 @@ Here you will learn the about the basic building blocks of the library. A must r
../random_generator_and_text/random_generator_and_text ../random_generator_and_text/random_generator_and_text
../discrete_fourier_transform/discrete_fourier_transform ../discrete_fourier_transform/discrete_fourier_transform
../file_input_output_with_xml_yml/file_input_output_with_xml_yml ../file_input_output_with_xml_yml/file_input_output_with_xml_yml
../interoperability_with_OpenCV_1/interoperability_with_OpenCV_1 ../interoperability_with_OpenCV_1/interoperability_with_OpenCV_1

@ -1 +1 @@
Include in this directory only defintion files. None of the reST files entered here will be parsed by the Sphinx Builder. Include in this directory only defintion files. None of the reST files entered here will be parsed by the Sphinx Builder.

@ -100,6 +100,3 @@ Result
.. image:: images/Feature_Description_BruteForce_Result.jpg .. image:: images/Feature_Description_BruteForce_Result.jpg
:align: center :align: center
:height: 200pt :height: 200pt

@ -201,4 +201,3 @@ Learn about how to use the feature points detectors, descriptors and matching f
../feature_flann_matcher/feature_flann_matcher ../feature_flann_matcher/feature_flann_matcher
../feature_homography/feature_homography ../feature_homography/feature_homography
../detection_of_planar_objects/detection_of_planar_objects ../detection_of_planar_objects/detection_of_planar_objects

@ -135,4 +135,3 @@ Here is the result:
.. image:: images/Corner_Subpixeles_Result.jpg .. image:: images/Corner_Subpixeles_Result.jpg
:align: center :align: center

@ -37,4 +37,3 @@ Result
.. image:: images/My_Shi_Tomasi_corner_detector_Result.jpg .. image:: images/My_Shi_Tomasi_corner_detector_Result.jpg
:align: center :align: center

@ -118,5 +118,3 @@ Result
.. image:: images/Feature_Detection_Result_a.jpg .. image:: images/Feature_Detection_Result_a.jpg
:align: center :align: center

@ -243,5 +243,3 @@ The detected corners are surrounded by a small black circle
.. image:: images/Harris_Detector_Result.jpg .. image:: images/Harris_Detector_Result.jpg
:align: center :align: center

@ -10,4 +10,3 @@ These tutorials are the bottom of the iceberg as they link together multiple of
.. raw:: latex .. raw:: latex
\pagebreak \pagebreak

@ -74,4 +74,4 @@ This section contains valuable tutorials about how to read/save your image/video
../trackbar/trackbar ../trackbar/trackbar
../video-input-psnr-ssim/video-input-psnr-ssim ../video-input-psnr-ssim/video-input-psnr-ssim
../video-write/video-write ../video-write/video-write

@ -152,8 +152,3 @@ Result
.. image:: images/Adding_Trackbars_Tutorial_Result_1.jpg .. image:: images/Adding_Trackbars_Tutorial_Result_1.jpg
:alt: Adding Trackbars - Lena :alt: Adding Trackbars - Lena
:align: center :align: center

@ -329,4 +329,3 @@ Result
.. image:: images/Histogram_Calculation_Result.jpg .. image:: images/Histogram_Calculation_Result.jpg
:align: center :align: center

@ -369,4 +369,3 @@ Results
.. image:: images/Template_Matching_Image_Result.jpg .. image:: images/Template_Matching_Image_Result.jpg
:align: center :align: center

@ -282,6 +282,3 @@ Result
:align: center :align: center
* Notice how the image is superposed to the black background on the edge regions. * Notice how the image is superposed to the black background on the edge regions.

@ -290,4 +290,3 @@ We get the following result by using the Probabilistic Hough Line Transform:
:align: center :align: center
You may observe that the number of lines detected vary while you change the *threshold*. The explanation is sort of evident: If you establish a higher threshold, fewer lines will be detected (since you will need more points to declare a line detected). You may observe that the number of lines detected vary while you change the *threshold*. The explanation is sort of evident: If you establish a higher threshold, fewer lines will be detected (since you will need more points to declare a line detected).

@ -311,4 +311,3 @@ Result
:alt: Result 0 for remapping :alt: Result 0 for remapping
:width: 250pt :width: 250pt
:align: center :align: center

@ -306,4 +306,3 @@ Result
:alt: Original image :alt: Original image
:width: 250pt :width: 250pt
:align: center :align: center

@ -279,4 +279,3 @@ Results
.. image:: images/Morphology_2_Tutorial_Cover.jpg .. image:: images/Morphology_2_Tutorial_Cover.jpg
:alt: Morphology 2: Result sample :alt: Morphology 2: Result sample
:align: center :align: center

@ -259,5 +259,3 @@ Results
.. image:: images/Pyramids_Tutorial_PyrUp_Result.jpg .. image:: images/Pyramids_Tutorial_PyrUp_Result.jpg
:alt: Pyramids: PyrUp Result :alt: Pyramids: PyrUp Result
:align: center :align: center

@ -121,4 +121,3 @@ Result
.. |BRC_1| image:: images/Bounding_Rects_Circles_Result.jpg .. |BRC_1| image:: images/Bounding_Rects_Circles_Result.jpg
:align: middle :align: middle

@ -123,4 +123,3 @@ Result
.. |BRE_1| image:: images/Bounding_Rotated_Ellipses_Result.jpg .. |BRE_1| image:: images/Bounding_Rotated_Ellipses_Result.jpg
:align: middle :align: middle

@ -104,4 +104,3 @@ Result
.. |contour_1| image:: images/Find_Contours_Result.jpg .. |contour_1| image:: images/Find_Contours_Result.jpg
:align: middle :align: middle

@ -113,4 +113,3 @@ Result
.. |Hull_1| image:: images/Hull_Result.jpg .. |Hull_1| image:: images/Hull_Result.jpg
:align: middle :align: middle

@ -133,4 +133,3 @@ Result
.. |MU_2| image:: images/Moments_Result2.jpg .. |MU_2| image:: images/Moments_Result2.jpg
:width: 250pt :width: 250pt
:align: middle :align: middle

@ -114,4 +114,3 @@ Result
.. |PPT_1| image:: images/Point_Polygon_Test_Result.jpg .. |PPT_1| image:: images/Point_Polygon_Test_Result.jpg
:align: middle :align: middle

@ -539,6 +539,3 @@ In this section you will learn about the image processing (manipulation) functio
../shapedescriptors/bounding_rotated_ellipses/bounding_rotated_ellipses ../shapedescriptors/bounding_rotated_ellipses/bounding_rotated_ellipses
../shapedescriptors/moments/moments ../shapedescriptors/moments/moments
../shapedescriptors/point_polygon_test/point_polygon_test ../shapedescriptors/point_polygon_test/point_polygon_test

@ -125,9 +125,9 @@ designed mostly for development purposes. This approach is deprecated for the pr
release package is recommended to communicate with OpenCV Manager via the async initialization release package is recommended to communicate with OpenCV Manager via the async initialization
described above. described above.
#. Add the OpenCV library project to your workspace the same way as for the async initialization #. Add the OpenCV library project to your workspace the same way as for the async initialization
above. Use menu :guilabel:`File -> Import -> Existing project in your workspace`, above. Use menu :guilabel:`File -> Import -> Existing project in your workspace`,
press :guilabel:`Browse` button and select OpenCV SDK path press :guilabel:`Browse` button and select OpenCV SDK path
(:file:`OpenCV-2.4.6-android-sdk/sdk`). (:file:`OpenCV-2.4.6-android-sdk/sdk`).
.. image:: images/eclipse_opencv_dependency0.png .. image:: images/eclipse_opencv_dependency0.png

@ -245,6 +245,3 @@ Say you have or create a new file, *helloworld.cpp* in a directory called *foo*:
a. You can also optionally modify the ``Build command:`` from ``make`` to something like ``make VERBOSE=1 -j4`` which tells the compiler to produce detailed symbol files for debugging and also to compile in 4 parallel threads. a. You can also optionally modify the ``Build command:`` from ``make`` to something like ``make VERBOSE=1 -j4`` which tells the compiler to produce detailed symbol files for debugging and also to compile in 4 parallel threads.
#. Done! #. Done!

@ -80,4 +80,3 @@ Building OpenCV from Source Using CMake, Using the Command Line
.. note:: .. note::
If the size of the created library is a critical issue (like in case of an Android build) you can use the ``install/strip`` command to get the smallest size as possible. The *stripped* version appears to be twice as small. However, we do not recommend using this unless those extra megabytes do really matter. If the size of the created library is a critical issue (like in case of an Android build) you can use the ``install/strip`` command to get the smallest size as possible. The *stripped* version appears to be twice as small. However, we do not recommend using this unless those extra megabytes do really matter.

@ -73,4 +73,3 @@ Now we will learn how to write a simple Hello World Application in Xcode using O
.. image:: images/output.png .. image:: images/output.png
:alt: output :alt: output
:align: center :align: center

@ -127,4 +127,4 @@ Check out an instance of running code with more Image Effects on `YouTube <http:
<div align="center"> <div align="center">
<iframe width="560" height="350" src="http://www.youtube.com/embed/Ko3K_xdhJ1I" frameborder="0" allowfullscreen></iframe> <iframe width="560" height="350" src="http://www.youtube.com/embed/Ko3K_xdhJ1I" frameborder="0" allowfullscreen></iframe>
</div> </div>

@ -185,4 +185,3 @@ Results
.. image:: images/result.png .. image:: images/result.png
:alt: The seperated planes :alt: The seperated planes
:align: center :align: center

@ -130,4 +130,3 @@ Result
.. image:: images/Cascade_Classifier_Tutorial_Result_LBP.jpg .. image:: images/Cascade_Classifier_Tutorial_Result_LBP.jpg
:align: center :align: center
:height: 300pt :height: 300pt

@ -5,5 +5,3 @@ install(FILES ${old_hdrs}
install(FILES "opencv2/opencv.hpp" install(FILES "opencv2/opencv.hpp"
DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2
COMPONENT main) COMPONENT main)

@ -73,4 +73,3 @@
#endif //CV_IMPL #endif //CV_IMPL
#endif // __OPENCV_OLD_CV_H_ #endif // __OPENCV_OLD_CV_H_

@ -46,4 +46,3 @@
#include "opencv2/core/eigen.hpp" #include "opencv2/core/eigen.hpp"
#endif #endif

@ -14,4 +14,3 @@ double getCameraPropertyC(void* camera, int propIdx);
void setCameraPropertyC(void* camera, int propIdx, double value); void setCameraPropertyC(void* camera, int propIdx, double value);
void applyCameraPropertiesC(void** camera); void applyCameraPropertiesC(void** camera);
} }

@ -44,4 +44,4 @@ private:
int frameHeight; int frameHeight;
}; };
#endif #endif

@ -6,4 +6,3 @@ calib3d. Camera Calibration and 3D Reconstruction
:maxdepth: 2 :maxdepth: 2
camera_calibration_and_3d_reconstruction camera_calibration_and_3d_reconstruction

@ -45,4 +45,4 @@
#error this is a compatibility header which should not be used inside the OpenCV library #error this is a compatibility header which should not be used inside the OpenCV library
#endif #endif
#include "opencv2/calib3d.hpp" #include "opencv2/calib3d.hpp"

@ -47,7 +47,7 @@ using namespace cv;
////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////

@ -428,4 +428,3 @@ CV_IMPL void cvConvertPointsHomogeneous( const CvMat* _src, CvMat* _dst )
dst.convertTo(dst0, dst0.type()); dst.convertTo(dst0, dst0.type());
} }
} }

@ -621,4 +621,3 @@ void epnp::qr_solve(CvMat * A, CvMat * b, CvMat * X)
pX[i] = (pb[i] - sum) / A2[i]; pX[i] = (pb[i] - sum) / A2[i];
} }
} }

@ -529,16 +529,16 @@ int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2, Out
mask4 = (Q.row(2) > 0) & mask4; mask4 = (Q.row(2) > 0) & mask4;
mask4 = (Q.row(2) < dist) & mask4; mask4 = (Q.row(2) < dist) & mask4;
mask1 = mask1.t(); mask1 = mask1.t();
mask2 = mask2.t(); mask2 = mask2.t();
mask3 = mask3.t(); mask3 = mask3.t();
mask4 = mask4.t(); mask4 = mask4.t();
// If _mask is given, then use it to filter outliers. // If _mask is given, then use it to filter outliers.
if (!_mask.empty()) if (!_mask.empty())
{ {
Mat mask = _mask.getMat(); Mat mask = _mask.getMat();
CV_Assert(mask.size() == mask1.size()); CV_Assert(mask.size() == mask1.size());
bitwise_and(mask, mask1, mask1); bitwise_and(mask, mask1, mask1);
bitwise_and(mask, mask2, mask2); bitwise_and(mask, mask2, mask2);
bitwise_and(mask, mask3, mask3); bitwise_and(mask, mask3, mask3);
@ -546,7 +546,7 @@ int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2, Out
} }
if (_mask.empty() && _mask.needed()) if (_mask.empty() && _mask.needed())
{ {
_mask.create(mask1.size(), CV_8U); _mask.create(mask1.size(), CV_8U);
} }
CV_Assert(_R.needed() && _t.needed()); CV_Assert(_R.needed() && _t.needed());

@ -47,30 +47,30 @@
This is translation to C++ of the Matlab's LMSolve package by Miroslav Balda. This is translation to C++ of the Matlab's LMSolve package by Miroslav Balda.
Here is the original copyright: Here is the original copyright:
============================================================================ ============================================================================
Copyright (c) 2007, Miroslav Balda Copyright (c) 2007, Miroslav Balda
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are modification, are permitted provided that the following conditions are
met: met:
* Redistributions of source code must retain the above copyright * Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright * Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution the documentation and/or other materials provided with the distribution
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
@ -112,7 +112,7 @@ public:
gemm(J, r, 1, noArray(), 0, v, GEMM_1_T); gemm(J, r, 1, noArray(), 0, v, GEMM_1_T);
Mat D = A.diag().clone(); Mat D = A.diag().clone();
const double Rlo = 0.25, Rhi = 0.75; const double Rlo = 0.25, Rhi = 0.75;
double lambda = 1, lc = 0.75; double lambda = 1, lc = 0.75;
int i, iter = 0; int i, iter = 0;
@ -222,5 +222,5 @@ Ptr<LMSolver> createLMSolver(const Ptr<LMSolver::Callback>& cb, int maxIters)
CV_Assert( !LMSolverImpl_info_auto.name().empty() ); CV_Assert( !LMSolverImpl_info_auto.name().empty() );
return new LMSolverImpl(cb, maxIters); return new LMSolverImpl(cb, maxIters);
} }
} }

@ -411,4 +411,3 @@ bool p3p::jacobi_4x4(double * A, double * D, double * U)
return false; return false;
} }

@ -59,4 +59,3 @@ class p3p
}; };
#endif // P3P_H #endif // P3P_H

@ -534,4 +534,3 @@ int cv::estimateAffine3D(InputArray _from, InputArray _to,
return createRANSACPointSetRegistrator(new Affine3DEstimatorCallback, 4, param1, param2)->run(dFrom, dTo, _out, _inliers); return createRANSACPointSetRegistrator(new Affine3DEstimatorCallback, 4, param1, param2)->run(dFrom, dTo, _out, _inliers);
} }

@ -348,4 +348,3 @@ void cv::solvePnPRansac(InputArray _opoints, InputArray _ipoints,
} }
return; return;
} }

@ -1169,4 +1169,3 @@ void cv::validateDisparity( InputOutputArray _disp, InputArray _cost, int minDis
} }
} }
} }

@ -52,30 +52,30 @@ TEST(Calib3d_Affine3f, accuracy)
cv::Mat expected; cv::Mat expected;
cv::Rodrigues(rvec, expected); cv::Rodrigues(rvec, expected);
ASSERT_EQ(0, norm(cv::Mat(affine.matrix, false).colRange(0, 3).rowRange(0, 3) != expected)); ASSERT_EQ(0, norm(cv::Mat(affine.matrix, false).colRange(0, 3).rowRange(0, 3) != expected));
ASSERT_EQ(0, norm(cv::Mat(affine.linear()) != expected)); ASSERT_EQ(0, norm(cv::Mat(affine.linear()) != expected));
cv::Matx33d R = cv::Matx33d::eye(); cv::Matx33d R = cv::Matx33d::eye();
double angle = 50; double angle = 50;
R.val[0] = R.val[4] = std::cos(CV_PI*angle/180.0); R.val[0] = R.val[4] = std::cos(CV_PI*angle/180.0);
R.val[3] = std::sin(CV_PI*angle/180.0); R.val[3] = std::sin(CV_PI*angle/180.0);
R.val[1] = -R.val[3]; R.val[1] = -R.val[3];
cv::Affine3d affine1(cv::Mat(cv::Vec3d(0.2, 0.5, 0.3)).reshape(1, 1), cv::Vec3d(4, 5, 6)); cv::Affine3d affine1(cv::Mat(cv::Vec3d(0.2, 0.5, 0.3)).reshape(1, 1), cv::Vec3d(4, 5, 6));
cv::Affine3d affine2(R, cv::Vec3d(1, 1, 0.4)); cv::Affine3d affine2(R, cv::Vec3d(1, 1, 0.4));
cv::Affine3d result = affine1.inv() * affine2; cv::Affine3d result = affine1.inv() * affine2;
expected = cv::Mat(affine1.matrix.inv(cv::DECOMP_SVD)) * cv::Mat(affine2.matrix, false); expected = cv::Mat(affine1.matrix.inv(cv::DECOMP_SVD)) * cv::Mat(affine2.matrix, false);
cv::Mat diff; cv::Mat diff;
cv::absdiff(expected, result.matrix, diff); cv::absdiff(expected, result.matrix, diff);
ASSERT_LT(cv::norm(diff, cv::NORM_INF), 1e-15); ASSERT_LT(cv::norm(diff, cv::NORM_INF), 1e-15);
} }

@ -195,4 +195,3 @@ void CV_Affine3D_EstTest::run( int /* start_from */)
} }
TEST(Calib3d_EstimateAffineTransform, accuracy) { CV_Affine3D_EstTest test; test.safe_run(); } TEST(Calib3d_EstimateAffineTransform, accuracy) { CV_Affine3D_EstTest test; test.safe_run(); }

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

Loading…
Cancel
Save