Skip to content

Commit 28ecb12

Browse files
christiankerlfran6co
authored andcommitted
removed most of the opencv dependencies
fixed compilation; fixed segfaults in CpuDepthPacketProcessor; disabled timing
1 parent 5b6d4ae commit 28ecb12

File tree

5 files changed

+243
-92
lines changed

5 files changed

+243
-92
lines changed

examples/protonect/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ SET(LIBRARY_OUTPUT_PATH ${MY_DIR}/lib)
4040
# dependencies
4141
FIND_PACKAGE(PkgConfig) # try find PKGConfig as it will be used if found
4242
FIND_PACKAGE(LibUSB REQUIRED)
43-
FIND_PACKAGE(OpenCV REQUIRED)
43+
FIND_PACKAGE(OpenCV)
4444
FIND_PACKAGE(TurboJPEG REQUIRED) #does not provide a package-config file
4545

4646
# Add includes
4747
INCLUDE_DIRECTORIES(
4848
"${MY_DIR}/include"
4949
${LIBFREENECT2_THREADING_INCLUDE_DIR}
50-
${OpenCV_INCLUDE_DIRS}
50+
# ${OpenCV_INCLUDE_DIRS}
5151
${LibUSB_INCLUDE_DIRS}
5252
${TurboJPEG_INCLUDE_DIRS}
5353
)
@@ -103,8 +103,7 @@ SET(SOURCES
103103
)
104104

105105
SET(LIBRARIES
106-
${OpenCV_LIBS}
107-
${OpenCV_LIBRARIES}
106+
# ${OpenCV_LIBRARIES}
108107
${LibUSB_LIBRARIES}
109108
${TurboJPEG_LIBRARIES}
110109
${LIBFREENECT2_THREADING_LIBRARIES}

examples/protonect/Protonect.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <iostream>
2929
#include <signal.h>
3030

31-
#include <opencv2/opencv.hpp>
31+
//#include <opencv2/opencv.hpp>
3232

3333
#include <libfreenect2/libfreenect2.hpp>
3434
#include <libfreenect2/frame_listener_impl.h>
@@ -142,16 +142,16 @@ int main(int argc, char *argv[])
142142
libfreenect2::Frame *ir = frames[libfreenect2::Frame::Ir];
143143
libfreenect2::Frame *depth = frames[libfreenect2::Frame::Depth];
144144

145-
cv::imshow("rgb", cv::Mat(rgb->height, rgb->width, CV_8UC4, rgb->data));
146-
cv::imshow("ir", cv::Mat(ir->height, ir->width, CV_32FC1, ir->data) / 20000.0f);
147-
cv::imshow("depth", cv::Mat(depth->height, depth->width, CV_32FC1, depth->data) / 4500.0f);
145+
//cv::imshow("rgb", cv::Mat(rgb->height, rgb->width, CV_8UC4, rgb->data));
146+
//cv::imshow("ir", cv::Mat(ir->height, ir->width, CV_32FC1, ir->data) / 20000.0f);
147+
//cv::imshow("depth", cv::Mat(depth->height, depth->width, CV_32FC1, depth->data) / 4500.0f);
148148

149149
registration->apply(rgb,depth,&undistorted,&registered);
150150

151-
cv::imshow("undistorted", cv::Mat(undistorted.height, undistorted.width, CV_32FC1, undistorted.data) / 4500.0f);
152-
cv::imshow("registered", cv::Mat(registered.height, registered.width, CV_8UC4, registered.data));
151+
//cv::imshow("undistorted", cv::Mat(undistorted.height, undistorted.width, CV_32FC1, undistorted.data) / 4500.0f);
152+
//cv::imshow("registered", cv::Mat(registered.height, registered.width, CV_8UC4, registered.data));
153153

154-
int key = cv::waitKey(1);
154+
int key = 1;//cv::waitKey(1);
155155
protonect_shutdown = protonect_shutdown || (key > 0 && ((key & 0xFF) == 27)); // shutdown on escape
156156

157157
listener.release(frames);

0 commit comments

Comments
 (0)