../CMakeLists.txt
This commit is contained in:
+4
-4
@@ -87,10 +87,10 @@ add_executable(live demo/live/live.cpp)
|
||||
target_link_libraries(live tkDNN)
|
||||
|
||||
#install
|
||||
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set (CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install"
|
||||
CACHE PATH "default install path" FORCE)
|
||||
endif()
|
||||
#if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
# set (CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install"
|
||||
# CACHE PATH "default install path" FORCE)
|
||||
#endif()
|
||||
message("install dir:" ${CMAKE_INSTALL_PREFIX})
|
||||
install(DIRECTORY include/ DESTINATION include/${CMAKE_PROJECT_NAME}
|
||||
FILES_MATCHING PATTERN "*.h")
|
||||
|
||||
+6
-10
@@ -134,16 +134,12 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
//end parsing
|
||||
|
||||
//std::cout<<"open video stream on device: "<<device<<"\n";
|
||||
//cv::VideoCapture cap(device);
|
||||
const char* pipe = "nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)I420, framerate=(fraction)30/1 ! nvvidconv ! video/x-raw, format=(string)I420 ! videoconvert ! video/x-raw, format=(string)BGR ! appsink";
|
||||
/*const char* pipe = "nvcamerasrc ! "
|
||||
"video/x-raw(memory:NVMM), width=(int)2592, height=(int)1458, format=(string)I420, framerate=(fraction)30/1 ! "
|
||||
"nvvidconv ! video/x-raw, width=(int)1280, height=(int)720, format=(string)BGRx ! "
|
||||
"videoconvert ! appsink";*/
|
||||
|
||||
cv::VideoCapture cap(pipe);
|
||||
|
||||
std::cout<<"open video stream on device: "<<device<<"\n";
|
||||
cv::VideoCapture cap(device);
|
||||
/*
|
||||
const char* pipe = "nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)I420, framerate=(fraction)30/1 ! nvvidconv ! video/x-raw, format=(string)I420 ! videoconvert ! video/x-raw, format=(string)BGR ! appsink";
|
||||
cv::VideoCapture cap(pipe);
|
||||
*/
|
||||
if(!cap.isOpened())
|
||||
FatalError("unable to open video stream");
|
||||
//cap.set(CV_CAP_PROP_BUFFERSIZE, 1); // process only last frame
|
||||
|
||||
Reference in New Issue
Block a user