set(WITH_EIGEN2 ON CACHE BOOL "Include Eigen2 support")\r
set(WITH_CUDA OFF CACHE BOOL "Include NVidia Cuda Runtime support")\r
\r
+if(WIN32)\r
+ set(WITH_VIDEOINPUT ON CACHE BOOL "Enable VideoInput support")\r
+endif()\r
+\r
# ===================================================\r
# Macros that checks if module have been installed.\r
# After it adds module to build and define\r
endif()\r
endif()\r
\r
-############################### TBB ################################\r
+############################### CUDA ################################\r
\r
if (WITH_CUDA)\r
find_package(CUDA) \r
endif()\r
endif()\r
\r
+############################### VideoInput ################################\r
+\r
+if (WIN32 AND WITH_VIDEOINPUT)\r
+ if(CMAKE_CXX_COMPILER MATCHES "dw2")\r
+ else()\r
+ set(HAVE_VIDEOINPUT 1)\r
+ endif()\r
+endif()\r
+\r
############################## Eigen2 ##############################\r
\r
if(WITH_EIGEN2)\r
endif()\r
endif()\r
\r
+if(WIN32)\r
+message(STATUS "")\r
+message(STATUS " Video I/O: ")\r
+if(HAVE_VIDEOINPUT)\r
+message(STATUS " VideoInput: 1")\r
+else()\r
+message(STATUS " VideoInput: 0")\r
+endif()\r
+endif()\r
+\r
message(STATUS "")\r
message(STATUS " Interfaces: ")\r
message(STATUS " Python: ${BUILD_NEW_PYTHON_SUPPORT}")\r
/* NVidia Cuda Runtime API*/
#cmakedefine HAVE_CUDA
+
+/* VideoInput library */
+#cmakedefine HAVE_VIDEOINPUT
+
from.depth() == CV_32F && to.depth() == CV_32F &&
((from.rows == 1 && from.channels() == 3) || from.cols*from.channels() == 3) &&
((to.rows == 1 && to.channels() == 3) || to.cols*to.channels() == 3) &&
- count == (size_t)to.cols*to.rows*to.channels()/3);
+ count == to.cols*to.rows*to.channels()/3);
out.create(3, 4, CV_64F);
outliers.resize(count);
#ifdef __GNUC__
#undef alloca
#define alloca __builtin_alloca
-#elif defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64 || \
+#elif defined WIN32 || defined _WIN32 || \
defined WINCE || defined _MSC_VER || defined __BORLANDC__
#include <malloc.h>
#elif defined HAVE_ALLOCA_H
#elif defined WIN32 || defined _WIN32
- #if defined _MSC_VER && !defined WIN64 && !defined _WIN64
+ #if defined _MSC_VER && defined _M_IX86
static inline int CV_XADD( int* addr, int delta )
{
int tmp;
#endif
#if (_MSC_VER >= 1400 && defined _M_X64) || (__GNUC__ >= 4 && defined __x86_64__)
- #if defined WIN64
+ #if defined WIN32
#include <intrin.h>
#endif
#include <emmintrin.h>
#ifdef HAVE_IPL
#ifndef __IPL_H__
- #if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64
+ #if defined WIN32 || defined _WIN32
#include <ipl.h>
#else
#include <ipl/ipl.h>
#endif
#endif // SKIP_INCLUDES
-#if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64
+#if defined WIN32 || defined _WIN32
#define CV_CDECL __cdecl
#define CV_STDCALL __stdcall
#else
#ifndef CV_INLINE
#if defined __cplusplus
#define CV_INLINE inline
-#elif (defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64 || defined WINCE) && !defined __GNUC__
+#elif (defined WIN32 || defined _WIN32 || defined WINCE) && !defined __GNUC__
#define CV_INLINE __inline
#else
#define CV_INLINE static
#endif
#endif /* CV_INLINE */
-#if (defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64 || defined WINCE) && defined CVAPI_EXPORTS
+#if (defined WIN32 || defined _WIN32 || defined WINCE) && defined CVAPI_EXPORTS
#define CV_EXPORTS __declspec(dllexport)
#else
#define CV_EXPORTS
{
// On Win64 optimized versions of DFT and DCT fail the tests (fixed in VS2010)
-#if (defined WIN64 || defined _WIN64) && defined _MSC_VER && _MSC_VER < 1600
+#if defined _MSC_VER && !defined CV_ICC && defined _M_X64 && _MSC_VER < 1600
#pragma optimize("", off)
#endif
#include "precomp.hpp"
-#if defined WIN32 || defined WIN64 || defined _WIN64 || defined WINCE
+#if defined WIN32 || defined _WIN32 || defined WINCE
#include <tchar.h>
#if defined _MSC_VER
#if _MSC_VER >= 1400
int64 getTickCount()
{
-#if defined WIN32 || defined WIN64 || defined _WIN64 || defined WINCE
+#if defined WIN32 || defined _WIN32 || defined WINCE
LARGE_INTEGER counter;
QueryPerformanceCounter( &counter );
return (int64)counter.QuadPart;
double getTickFrequency()
{
-#if defined WIN32 || defined WIN64 || defined _WIN64 || defined WINCE
+#if defined WIN32 || defined _WIN32 || defined WINCE
LARGE_INTEGER freq;
QueryPerformanceFrequency(&freq);
return (double)freq.QuadPart;
#endif
-#elif defined _MSC_VER && defined WIN32 && !defined _WIN64
+#elif defined _MSC_VER && defined WIN32 && defined _M_IX86
int64 getCPUTickCount(void)
{
cvGuiBoxReport( int code, const char *func_name, const char *err_msg,
const char *file, int line, void* )
{
-#if (!defined WIN32 && !defined WIN64) || defined WINCE
+#if (!defined WIN32 && !defined _WIN32) || defined WINCE
return cvStdErrReport( code, func_name, err_msg, file, line, 0 );
#else
if( code != CV_StsBackTrace && code != CV_StsAutoTrace )
#pragma comment(lib, "libgcc_.a")
#pragma comment(lib, "libmingwex_.a")
#pragma comment(lib, "libcoldname_.a")
-#ifdef WIN64
+#ifdef _M_X64
#pragma comment(lib, "libavformat64.a")
#pragma comment(lib, "libavcodec64.a")
#pragma comment(lib, "libavutil64.a")
if(MINGW)
if(MINGW64)
- target_link_libraries(${the_target} msvfw32 avifil32 avicap32 winmm videoInput64 strmiids)
+ target_link_libraries(${the_target} msvfw32 avifil32 avicap32 winmm)
+ if(HAVE_VIDEOINPUT)
+ target_link_libraries(${the_target} videoInput64 strmiids)
+ endif()
else()
- target_link_libraries(${the_target} vfw32 winmm videoInput strmiids)
+ target_link_libraries(${the_target} vfw32 winmm)
+ if(HAVE_VIDEOINPUT)
+ target_link_libraries(${the_target} videoInput strmiids)
+ endif()
endif()
endif()
endif()
#define __OPENCV_HIGHGUI_H__
#include "opencv2/core/core_c.h"
-#if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64
+#if defined WIN32 || defined _WIN32
#include <windows.h>
#undef min
#undef max
#pragma warning( disable: 4711 )
#endif
-#if (defined WIN64 || defined _WIN64) && defined _MSC_VER && !defined __ICL
+#if defined _M_X64 && defined _MSC_VER && !defined CV_ICC
#pragma optimize("",off)
#endif
#include "precomp.hpp"
-#ifdef HAVE_VIDEOINPUT
+#if defined HAVE_VIDEOINPUT && (_MSC_VER >= 1400 || defined __GNUC__)
+
#include "videoinput.h"
/********************* Capturing video from camera via VFW *********************/
}
#ifdef _MSC_VER
+#if defined _M_X64
+#pragma comment(lib, "videoInput64.lib")
+#else
#pragma comment(lib, "videoInput.lib")
#endif
+#endif
#endif
#pragma comment(lib,"milmet2.lib")
#endif
-#if defined WIN64 && defined EM64T && defined _MSC_VER && !defined __ICL
+#if defined _M_X64
#pragma optimize("",off)
#endif
#define _LINUX
#endif
-#if defined(_x64) || defined (__x86_64) || defined (_WIN64)
+#if defined(_x64) || defined (__x86_64) || defined (_M_X64)
#define _x64 1
-#elif defined(_x86) || defined(__i386) || defined (_WIN32)
+#elif defined(_x86) || defined(__i386) || defined (_M_IX86)
#define _x86 1
#endif
#define capSendMessage(hwnd,m,w,l) (IsWindow(hwnd)?SendMessage(hwnd,m,w,l):0)
#endif
-#if (defined WIN64 || defined _WIN64) && defined _MSC_VER && !defined __ICL
+#if defined _M_X64
#pragma optimize("",off)
#endif
#if defined WIN32 || defined _WIN32
#define HAVE_VFW 1
-#if (_MSC_VER >= 1400 || defined __GNUC__) && !defined WIN64 && !defined _WIN64
-#define HAVE_VIDEOINPUT 1
-#endif
-
-/* uncomment to enable OpenEXR codec (will not compile under MSVC6) */
-//#define HAVE_OPENEXR 1
-
/* uncomment to enable CMUCamera1394 fireware camera module */
//#define HAVE_CMU1394 1
#endif
waitCondition.wait(&dummy, 2);
*/
-#if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64
+#if defined WIN32 || defined _WIN32
sleep(2);
#else
usleep(2);//to decrease CPU usage
#include "precomp.hpp"
-#if defined WIN32 || defined WIN64 || defined _WIN64
+#if defined WIN32 || defined _WIN32
#if _MSC_VER >= 1200
#pragma warning( disable: 4710 )
static const char* trackbar_text =
" ";
-#if defined WIN64 || defined _WIN64
+#if defined _M_X64 || defined __x86_64
#define icvGetWindowLongPtr GetWindowLongPtr
#define icvSetWindowLongPtr( hwnd, id, ptr ) SetWindowLongPtr( hwnd, id, (LONG_PTR)(ptr) )
#include "opencv2/core/core.hpp"
#include <limits.h>
- #if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64
+ #if defined WIN32 || defined _WIN32
#include <windows.h>
#endif
#else // SKIP_INCLUDES
- #if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64
+ #if defined WIN32 || defined _WIN32
#define CV_CDECL __cdecl
#define CV_STDCALL __stdcall
#else
#ifndef CV_INLINE
#if defined __cplusplus
#define CV_INLINE inline
- #elif (defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64) && !defined __GNUC__
+ #elif (defined WIN32 || defined _WIN32) && !defined __GNUC__
#define CV_INLINE __inline
#else
#define CV_INLINE static
#endif
#endif /* CV_INLINE */
- #if (defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64) && defined CVAPI_EXPORTS
+ #if (defined WIN32 || defined _WIN32) && defined CVAPI_EXPORTS
#define CV_EXPORTS __declspec(dllexport)
#else
#define CV_EXPORTS
using namespace cv;\r
using namespace std;\r
\r
-#if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64\r
+#if defined WIN32 || defined _WIN32\r
//#if 0\r
\r
#else\r
struct_idx = iter = -1;
t = cvTsRandReal(rng)*(max_log_storage_block_size - min_log_storage_block_size) + min_log_storage_block_size;
int block_size = cvRound( exp(t * CV_LOG2) );
- block_size = MAX(block_size, sizeof(CvGraph) + sizeof(CvMemBlock));
+ block_size = MAX(block_size, (int)(sizeof(CvGraph) + sizeof(CvMemBlock)));
storage = cvCreateMemStorage(block_size);
#ifndef _CXCORE_TEST_H_
#define _CXCORE_TEST_H_
-#if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64
+#if defined WIN32 || defined _WIN32
#include <windows.h>
#undef min
#undef max
#ifndef __CXTS_INTERNAL_H__
#define __CXTS_INTERNAL_H__
-#if (defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64) && (_MSC_VER >= 1200 || defined _ICL)
+#if (defined WIN32 || defined _WIN32) && (_MSC_VER >= 1200 || defined _ICL)
#pragma warning( disable: 4251 4514 4996 )
#endif