opencv_ml opencv_video opencv_objdetect opencv_features2d
opencv_calib3d opencv_legacy opencv_contrib opencv_gpu
opencv_nonfree opencv_softcascade opencv_superres
- opencv_gpucodec opencv_gpuarithm opencv_gpufilters opencv_gpuwarping opencv_gpuimgproc
+ opencv_gpuarithm opencv_gpufilters opencv_gpuwarping opencv_gpuimgproc
opencv_gpufeatures2d opencv_gpuoptflow opencv_gpubgsegm
opencv_gpustereo opencv_gpulegacy)
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/nonfree/include")
endif()
+ if(HAVE_opencv_gpucodec)
+ ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpucodec/include")
+ endif()
+
if(HAVE_CUDA)
ocv_include_directories(${CUDA_INCLUDE_DIRS})
endif()
if(HAVE_opencv_nonfree)
target_link_libraries(${the_target} opencv_nonfree)
endif()
+ if(HAVE_opencv_gpucodec)
+ target_link_libraries(${the_target} opencv_gpucodec)
+ endif()
set_target_properties(${the_target} PROPERTIES
OUTPUT_NAME "${project}-example-${name}"
#include <iostream>
+
+#include "opencv2/opencv_modules.hpp"
+
+#if defined(HAVE_OPENCV_GPUCODEC)
+
#include <string>
#include <vector>
#include <algorithm>
return 0;
}
+
+#else
+
+int main()
+{
+ std::cout << "OpenCV was built without GPU Video decoding support\n" << std::endl;
+ return 0;
+}
+
+#endif
#include <iostream>
+
+#include "opencv2/opencv_modules.hpp"
+
+#if defined(HAVE_OPENCV_GPUCODEC) && defined(WIN32)
+
#include <vector>
#include <numeric>
return 0;
}
+
+#else
+
+int main()
+{
+ std::cout << "OpenCV was built without GPU Video encoding support\n" << std::endl;
+ return 0;
+}
+
+#endif