我正在开发一个计算机视觉项目,我需要使用两个使用opencv库的摄像头.我尝试了这个代码,但是有两个来自USB端口的网络摄像头,如果我使用一台USB摄像头和我的电脑的相机,它不起作用.
CvCapture* capture[2];
capture[0] = cvCreateCameraCapture(0);
capture[1] = cvCreateCameraCapture(1);
if(!capture[0] && !capture[1])
printf("Webcam error\n");
Run Code Online (Sandbox Code Playgroud)
我在acer aspire 5742g的Windows 7上工作.这是我的电脑总线的问题吗?这些相机是2飞利浦SPZ2000.我还尝试着对其中一个人和我电脑上的相机拍摄的照片进行处理,当我使用Bradsky的"学习opencv"一书中的校准和校正代码时,我得到了一个糟糕的结果.有人能帮助我吗?先感谢您,
萨拉
我正在尝试使用 CMAKE 编译一个 .cpp 程序。当我只是在终端上使用 gcc 时,我需要输入:
gcc nxt_bt_connect.c -o nxt_bt_connect -lm -lbluetooth
Run Code Online (Sandbox Code Playgroud)
如何将这两个链接器标志包含到我的 CmakeLists.txt(粘贴在下面)文件中?
# YARP needs CMake 2.6 or greater
cmake_minimum_required(VERSION 2.6)
# find YARP
find_package(YARP REQUIRED)
# add YARP include directories
include_directories(${YARP_INCLUDE_DIRS})
# set up our program
add_executable(send_angles send_angles.cpp)
# link with YARP libraries
target_link_libraries(send_angles ${YARP_LIBRARIES})
Run Code Online (Sandbox Code Playgroud)
谢谢!!