playerproject / player

The Player cross-platform robot device interface & server
GNU General Public License v2.0
58 stars 31 forks source link

Fix compilation with OpenCV4 #29

Open ShadowOne333 opened 2 weeks ago

ShadowOne333 commented 2 weeks ago

This PR modified some parts of the main CMakeLists to compile with C++11, and also search for an installation of OpenCV. Additionally, changes to header includes were made, as well as adding other missing headers so they legacy C API functions are properly recognized with the latest iteration of OpenCV.

I redefined cvScalar in a couple of files, and also converted cvLoadImage to now use cv::imread instead by converting it with cvarrToMat.

Someone with the proper knowledge, please review this properly before merging. Let me know if I missed anything or if I did something wrong.

This PR should fix Issue #28 which I created some time ago.