diff --git a/parallel_worlds_0/src/main.cpp b/parallel_worlds_0/src/main.cpp index 1fac059b6da11934c38b2e662d5268da864c4cce..3b35c77cc1c7160d9335043b1d0dfe11ff878995 100644 --- a/parallel_worlds_0/src/main.cpp +++ b/parallel_worlds_0/src/main.cpp @@ -3,7 +3,6 @@ // Author : // Version : // Copyright : Your copyright notice -// Description : Hello World in C++, Ansi-style //============================================================================ @@ -11,7 +10,7 @@ #include <sstream> #include <stdlib.h> -#include "cl.hpp" +#include "cl2.hpp" /* * VECTOR_CLASS and STRING_CLASS are defined by OpenCL so that @@ -20,10 +19,12 @@ * all these definitions available */ #ifndef STRING_CLASS -#define STRING_CLASS cl::STRING_CLASS +#define STRING_CLASS ::std::string +//cl::STRING_CLASS #endif #ifndef VECTOR_CLASS -#define VECTOR_CLASS cl::VECTOR_CLASS +#define VECTOR_CLASS ::std::vector +//cl::VECTOR_CLASS #endif /* diff --git a/parallel_worlds_1/.cproject b/parallel_worlds_1/.cproject index 57e71594758ba13a7d2f2503db037739abd1d869..37386bc6fc94be5c8ebd7f615fb2a8f32223e60b 100644 --- a/parallel_worlds_1/.cproject +++ b/parallel_worlds_1/.cproject @@ -73,10 +73,16 @@ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.207526064" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug"> - <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.link.option.libs.982738935" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs"> + <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.link.option.libs.982738935" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs"> <listOptionValue builtIn="false" value="opencv_highgui"/> + <listOptionValue builtIn="false" value="opencv_videoio"/> + + <listOptionValue builtIn="false" value="opencv_imgcodecs"/> + + <listOptionValue builtIn="false" value="opencv_imgproc"/> + <listOptionValue builtIn="false" value="opencv_core"/> <listOptionValue builtIn="false" value="OpenCL"/> diff --git a/parallel_worlds_1/src/CMakeLists.txt b/parallel_worlds_1/src/CMakeLists.txt index 1e2bd5914a8c4d6873491200417e2c3991be5423..472549349f53a48400ab144a4e840e12af3b1588 100644 --- a/parallel_worlds_1/src/CMakeLists.txt +++ b/parallel_worlds_1/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required( VERSION 3.1 ) project( parallel_worlds_1 ) -set( EXECUTABLE parallel_worlds_1 ) +set( EXECUTABLE ${PROJECT_NAME} ) if( MSVC ) message( "MSVC: adding compiler flags" ) diff --git a/parallel_worlds_1/src/OpenCLInterface.hpp b/parallel_worlds_1/src/OpenCLInterface.hpp index 3361878b343f46b347df4d5ca71670d0d0a29af9..dd51e534b91c47df5ce076bcfa49d9e07a08c891 100644 --- a/parallel_worlds_1/src/OpenCLInterface.hpp +++ b/parallel_worlds_1/src/OpenCLInterface.hpp @@ -6,19 +6,22 @@ #include <stdlib.h> #include <stdio.h> -#include "cl.hpp" +#include <string> +#include <vector> + +#include "cl2.hpp" /* - * VECTOR_CLASS and STRING_CLASS are defined by OpenCL so that - * the user may use her own implementation of these classes, if she + * VECTOR_CLASS and STRING_CLASS are defined by OpenCL 1.x BUT NOT 2.x(!) + * so that the user may use her own implementation of these classes, if she * wants to avoid the STL; the defines below are only safeguards to have * all these definitions available */ #ifndef STRING_CLASS -#define STRING_CLASS cl::STRING_CLASS +#define STRING_CLASS ::std::string #endif #ifndef VECTOR_CLASS -#define VECTOR_CLASS cl::VECTOR_CLASS +#define VECTOR_CLASS ::std::vector #endif /* diff --git a/parallel_worlds_1/src/main.cpp b/parallel_worlds_1/src/main.cpp index 8b6e88c36b599bfe241914a4f01aa8647895740c..f83915daaa26acb8ccb786faf4d8f2f0fc2310ad 100644 --- a/parallel_worlds_1/src/main.cpp +++ b/parallel_worlds_1/src/main.cpp @@ -27,7 +27,7 @@ int main(int argc, const char** argv) { cv::namedWindow("preview", 0); cv::namedWindow("converted", 0); - while (cv::waitKey(10) < 0) { + while (((char)cv::waitKey(10)) <= -1) { if (cameraOn && !capture.read(frame)) exit(3); diff --git a/parallel_worlds_2/.cproject b/parallel_worlds_2/.cproject index 57e71594758ba13a7d2f2503db037739abd1d869..37386bc6fc94be5c8ebd7f615fb2a8f32223e60b 100644 --- a/parallel_worlds_2/.cproject +++ b/parallel_worlds_2/.cproject @@ -73,10 +73,16 @@ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.207526064" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug"> - <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.link.option.libs.982738935" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs"> + <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.link.option.libs.982738935" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs"> <listOptionValue builtIn="false" value="opencv_highgui"/> + <listOptionValue builtIn="false" value="opencv_videoio"/> + + <listOptionValue builtIn="false" value="opencv_imgcodecs"/> + + <listOptionValue builtIn="false" value="opencv_imgproc"/> + <listOptionValue builtIn="false" value="opencv_core"/> <listOptionValue builtIn="false" value="OpenCL"/> diff --git a/parallel_worlds_2/src/CMakeLists.txt b/parallel_worlds_2/src/CMakeLists.txt index 74c59bbc7ff3510767355db6a0ca251eb5aa3dd6..67aabe56ca9d515638ccb021b44355ef0c84106e 100644 --- a/parallel_worlds_2/src/CMakeLists.txt +++ b/parallel_worlds_2/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required( VERSION 3.1 ) project( parallel_worlds_2 ) -set( EXECUTABLE parallelwelten_2 ) +set( EXECUTABLE ${PROJECT_NAME} ) if( MSVC ) message( "MSVC: adding compiler flags" ) diff --git a/parallel_worlds_2/src/OpenCLInterface.hpp b/parallel_worlds_2/src/OpenCLInterface.hpp index 3361878b343f46b347df4d5ca71670d0d0a29af9..dd51e534b91c47df5ce076bcfa49d9e07a08c891 100644 --- a/parallel_worlds_2/src/OpenCLInterface.hpp +++ b/parallel_worlds_2/src/OpenCLInterface.hpp @@ -6,19 +6,22 @@ #include <stdlib.h> #include <stdio.h> -#include "cl.hpp" +#include <string> +#include <vector> + +#include "cl2.hpp" /* - * VECTOR_CLASS and STRING_CLASS are defined by OpenCL so that - * the user may use her own implementation of these classes, if she + * VECTOR_CLASS and STRING_CLASS are defined by OpenCL 1.x BUT NOT 2.x(!) + * so that the user may use her own implementation of these classes, if she * wants to avoid the STL; the defines below are only safeguards to have * all these definitions available */ #ifndef STRING_CLASS -#define STRING_CLASS cl::STRING_CLASS +#define STRING_CLASS ::std::string #endif #ifndef VECTOR_CLASS -#define VECTOR_CLASS cl::VECTOR_CLASS +#define VECTOR_CLASS ::std::vector #endif /* diff --git a/parallel_worlds_2/src/main.cpp b/parallel_worlds_2/src/main.cpp index 17918532b6461db17074011cf04ee72d5af268a8..97e2b6f5b7f200f8a20a3b58c70e755d31c6ae9b 100644 --- a/parallel_worlds_2/src/main.cpp +++ b/parallel_worlds_2/src/main.cpp @@ -27,7 +27,7 @@ int main(int argc, const char** argv) { cv::namedWindow("preview", 0); cv::namedWindow("converted", 0); - while (cv::waitKey(10) < 0) { + while (((char)cv::waitKey(10)) <= -1) { if (cameraOn && !capture.read(frame)) exit(3); diff --git a/parallel_worlds_3/.cproject b/parallel_worlds_3/.cproject index 57e71594758ba13a7d2f2503db037739abd1d869..2a9992528d03776cc23b84685b2a45bcc18a8871 100644 --- a/parallel_worlds_3/.cproject +++ b/parallel_worlds_3/.cproject @@ -73,10 +73,16 @@ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.207526064" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug"> - <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.link.option.libs.982738935" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs"> + <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.link.option.libs.982738935" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs"> <listOptionValue builtIn="false" value="opencv_highgui"/> + <listOptionValue builtIn="false" value="opencv_videoio"/> + + <listOptionValue builtIn="false" value="opencv_imgcodecs"/> + + <listOptionValue builtIn="false" value="opencv_imgproc"/> + <listOptionValue builtIn="false" value="opencv_core"/> <listOptionValue builtIn="false" value="OpenCL"/> @@ -248,5 +254,7 @@ <storageModule moduleId="refreshScope"/> <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> + + <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/> </cproject> diff --git a/parallel_worlds_3/src/CMakeLists.txt b/parallel_worlds_3/src/CMakeLists.txt index ee669339c1b74bc30742ab01386320a1da02ddb4..8c23766af299ee321a03e75f7841834654f4cb5c 100644 --- a/parallel_worlds_3/src/CMakeLists.txt +++ b/parallel_worlds_3/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required( VERSION 3.1 ) project( parallel_worlds_3 ) -set( EXECUTABLE parallelwelten_3 ) +set( EXECUTABLE ${PROJECT_NAME} ) if( MSVC ) message( "MSVC: adding compiler flags" ) diff --git a/parallel_worlds_3/src/DeviceInterface.hpp b/parallel_worlds_3/src/DeviceInterface.hpp index 911684258b4704e88026d745ea5d19f333786eca..d3090cc387cf5c078229d1bdce6ef83ffdb891b9 100644 --- a/parallel_worlds_3/src/DeviceInterface.hpp +++ b/parallel_worlds_3/src/DeviceInterface.hpp @@ -44,7 +44,7 @@ private: for (VECTOR_CLASS<cl::Platform>::iterator pit = platforms.begin(); platforms.end() != pit; ++pit) { // try to find a device of type devType - CHECK_ERROR(pit->getDevices(devType, &deviceVector)); + pit->getDevices(devType, &deviceVector); /* the C-way: * cl_int clGetDeviceIDs (cl_platform_id platform, * cl_device_type device_type, diff --git a/parallel_worlds_3/src/OpenCLInterface.hpp b/parallel_worlds_3/src/OpenCLInterface.hpp index 3361878b343f46b347df4d5ca71670d0d0a29af9..dd51e534b91c47df5ce076bcfa49d9e07a08c891 100644 --- a/parallel_worlds_3/src/OpenCLInterface.hpp +++ b/parallel_worlds_3/src/OpenCLInterface.hpp @@ -6,19 +6,22 @@ #include <stdlib.h> #include <stdio.h> -#include "cl.hpp" +#include <string> +#include <vector> + +#include "cl2.hpp" /* - * VECTOR_CLASS and STRING_CLASS are defined by OpenCL so that - * the user may use her own implementation of these classes, if she + * VECTOR_CLASS and STRING_CLASS are defined by OpenCL 1.x BUT NOT 2.x(!) + * so that the user may use her own implementation of these classes, if she * wants to avoid the STL; the defines below are only safeguards to have * all these definitions available */ #ifndef STRING_CLASS -#define STRING_CLASS cl::STRING_CLASS +#define STRING_CLASS ::std::string #endif #ifndef VECTOR_CLASS -#define VECTOR_CLASS cl::VECTOR_CLASS +#define VECTOR_CLASS ::std::vector #endif /* diff --git a/parallel_worlds_3/src/main.cpp b/parallel_worlds_3/src/main.cpp index 6fc237ed9746f2b25e64f75f1637e6c9fd4d54fe..a72d6b4e935fc4c1f21d4c806b6f21b3681b9d3e 100644 --- a/parallel_worlds_3/src/main.cpp +++ b/parallel_worlds_3/src/main.cpp @@ -36,7 +36,7 @@ int main(int argc, const char** argv) { cv::namedWindow("edge", 0); cv::namedWindow("effect", 0); - while (cv::waitKey(10) < 0) { + while (((char)cv::waitKey(10)) <= -1) { if (cameraOn && !capture.read(frame)) exit(3); greyFilter(frame.data, convertedFrame.data, w, h);