Skip to content

Commit aa71965

Browse files
committed
Removes Opencv for good
1 parent f058342 commit aa71965

File tree

7 files changed

+3
-30
lines changed

7 files changed

+3
-30
lines changed

examples/protonect/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,13 @@ SET(LIBRARY_OUTPUT_PATH ${MY_DIR}/lib)
4040

4141
# dependencies
4242
FIND_PACKAGE(PkgConfig) # try find PKGConfig as it will be used if found
43-
FIND_PACKAGE(OpenCV)
4443
FIND_PACKAGE(LibUSB REQUIRED)
4544
FIND_PACKAGE(TurboJPEG REQUIRED) #does not provide a package-config file
46-
IF(OpenCV_FOUND)
47-
SET(LIBFREENECT2_OPENCV_FOUND 1)
48-
ENDIF()
4945

5046
# Add includes
5147
INCLUDE_DIRECTORIES(
5248
"${MY_DIR}/include"
5349
${LIBFREENECT2_THREADING_INCLUDE_DIR}
54-
${OpenCV_INCLUDE_DIRS}
5550
${LibUSB_INCLUDE_DIRS}
5651
${TurboJPEG_INCLUDE_DIRS}
5752
)
@@ -108,7 +103,6 @@ SET(SOURCES
108103
)
109104

110105
SET(LIBRARIES
111-
${OpenCV_LIBRARIES}
112106
${LibUSB_LIBRARIES}
113107
${TurboJPEG_LIBRARIES}
114108
${LIBFREENECT2_THREADING_LIBRARIES}

examples/protonect/Protonect.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@
3636
#ifdef LIBFREENECT2_WITH_OPENGL_SUPPORT
3737
#include "viewer.h"
3838
#endif
39-
#ifdef LIBFREENECT2_OPENCV_FOUND
40-
#include <opencv2/opencv.hpp>
41-
#endif
4239

4340

4441
bool protonect_shutdown = false;
@@ -140,7 +137,7 @@ int main(int argc, char *argv[])
140137

141138
libfreenect2::Registration* registration = new libfreenect2::Registration(dev->getIrCameraParams(), dev->getColorCameraParams());
142139

143-
#if defined(LIBFREENECT2_WITH_OPENGL_SUPPORT) && !defined(LIBFREENECT2_OPENCV_FOUND)
140+
#ifdef LIBFREENECT2_WITH_OPENGL_SUPPORT
144141
Viewer viewer;
145142
viewer.initialize();
146143
#endif
@@ -154,21 +151,15 @@ int main(int argc, char *argv[])
154151

155152
registration->apply(rgb, depth, &undistorted, &registered);
156153

157-
#if defined(LIBFREENECT2_WITH_OPENGL_SUPPORT) && !defined(LIBFREENECT2_OPENCV_FOUND)
154+
#ifdef LIBFREENECT2_WITH_OPENGL_SUPPORT
158155
viewer.addFrame("RGB", rgb);
159156
viewer.addFrame("ir", ir);
160157
viewer.addFrame("depth", depth);
161158
viewer.addFrame("registered", &registered);
162159

163160
protonect_shutdown = viewer.render();
164161
#else
165-
cv::imshow("rgb", cv::Mat(rgb->height, rgb->width, CV_8UC4, rgb->data));
166-
cv::imshow("ir", cv::Mat(ir->height, ir->width, CV_32FC1, ir->data) / 20000.0f);
167-
cv::imshow("depth", cv::Mat(depth->height, depth->width, CV_32FC1, depth->data) / 4500.0f);
168-
cv::imshow("undistorted", cv::Mat(undistorted.height, undistorted.width, CV_32FC1, undistorted.data) / 4500.0f);
169-
cv::imshow("registered", cv::Mat(registered.height, registered.width, CV_8UC4, registered.data));
170-
int key = cv::waitKey(1);
171-
protonect_shutdown = protonect_shutdown || (key > 0 && ((key & 0xFF) == 27)); // shutdown on escape
162+
protonect_shutdown = true;
172163
#endif
173164

174165
listener.release(frames);

examples/protonect/include/libfreenect2/config.h.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747

4848
#cmakedefine LIBFREENECT2_THREADING_TINYTHREAD
4949

50-
#cmakedefine LIBFREENECT2_OPENCV_FOUND
51-
5250
#cmakedefine LIBFREENECT2_WITH_CXX11_SUPPORT
5351

5452
#endif // LIBFREENECT2_CONFIG_H

examples/protonect/include/libfreenect2/depth_packet_processor.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ class LIBFREENECT2_API OpenGLDepthPacketProcessor : public DepthPacketProcessor
140140
#endif // LIBFREENECT2_WITH_OPENGL_SUPPORT
141141

142142
// TODO: push this to some internal namespace
143-
// use pimpl to hide opencv dependency
144143
class CpuDepthPacketProcessorImpl;
145144

146145
class LIBFREENECT2_API CpuDepthPacketProcessor : public DepthPacketProcessor

examples/protonect/src/cpu_depth_packet_processor.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
#include <libfreenect2/resource.h>
2929
#include <libfreenect2/protocol/response.h>
3030

31-
#ifdef LIBFREENECT2_OPENCV_FOUND
32-
#include <opencv2/opencv.hpp>
33-
#endif
3431
#include <iostream>
3532
#include <fstream>
3633

examples/protonect/src/opencl_depth_packet_processor.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
#include <libfreenect2/resource.h>
2929
#include <libfreenect2/protocol/response.h>
3030

31-
#ifdef LIBFREENECT2_OPENCV_FOUND
32-
#include <opencv2/opencv.hpp>
33-
#endif
3431
#include <iostream>
3532
#include <fstream>
3633
#include <sstream>

examples/protonect/src/turbo_jpeg_rgb_packet_processor.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
*/
2626

2727
#include <libfreenect2/rgb_packet_processor.h>
28-
#ifdef LIBFREENECT2_OPENCV_FOUND
29-
#include <opencv2/opencv.hpp>
30-
#endif
3128
#include <turbojpeg.h>
3229
#include <iostream>
3330

0 commit comments

Comments
 (0)