我是 Linux 新手,正在尝试在 Linux 中安装 OpenCV。我正在关注链接 http://opencv.willowgarage.com/wiki/InstallGuide_Linux 中给出的文档一步一步但最后没能找到./cxcoretest之类的东西。如果给出的指南不一致,请告诉我。我认为很多人在尝试在他们的系统上安装 opencv 时都会遇到问题(特别是新的 Linux 学习者)。如果有人能够为学习者编写好的 opencv 安装指南,那将会有很大的帮助。
这是我的 bin 文件夹的“ls”
3calibration laplace
adaptiveskindetector latentsvmdetect
bagofwords_classification letter_recog
bgfg_codebook lkdemo
bgfg_segm matcher_simple
blobtrack_sample matching_to_many_images
brief_match_test meanshift_segmentation
build3dmodel minarea
calibration morfology_gpu
calibration_artificial morphology
camshiftdemo morphology2
cascadeclassifier_gpu motempl
cascadeclassifier_nvidia_api_gpu mser_sample
chamfer multicascadeclassifier
connected_components multi_gpu
contours mushroom
contours2 one_way_sample
convert_cascade opencv_createsamples
convexhull opencv_haartraining
cout_mat opencv_performance
delaunay opencv_stitching
delaunay2 opencv_test_calib3d
demhist opencv_test_core
descriptor_extractor_matcher opencv_test_features2d
detector_descriptor_evaluation opencv_test_gpu
dft opencv_test_highgui
distrans opencv_test_imgproc
drawing opencv_test_ml
driver_api_multi_gpu opencv_test_objdetect
driver_api_stereo_multi_gpu opencv_test_video
edge opencv_traincascade
em peopledetect
facedetect performance_gpu
fback points_classifier
fback_c polar_transforms
ffilldemo pyramid_segmentation
filestorage retinaDemo
find_obj segment_objects
find_obj_calonder select3dobj
find_obj_ferns squares
fitellipse starter_imagelist
generic_descriptor_match starter_video
grabcut stereo_calib
hog_gpu stereo_match
houghlines stereo_match_gpu
image stereo_multi_gpu
imagelist_creator surf_keypoint_matcher_gpu
inpaint tree_engine
kalman video_dmtx
kinect_maps video_homography
kmeans watershed
最佳答案
我假设您已经按照 Linux 安装指南构建了 OpenCV 库。 opencv_test_* 对于测试 opencv 安装很有用。特别是,运行并验证一切的 opencv_test_core 二进制文件与核心库兼容。该二进制文件替换了 cxcoretest 可执行文件。如果是 OpenCV2.3(从 svn checkout ),您必须将 cv 文件夹从/2.3/opencv_extra/testdata 复制到/2.3/opencv/release 文件夹。否则,某些测试将因丢失数据文件而失败。
由于 opencv 是一个框架,因此其余的二进制文件来自 opencv 版本的示例部分。如果您按照 linux 安装说明编译了此库,则它会被编译为动态链接库。您可以在/usr/local/lib 中找到它们,并在/usr/local/include 中找到用于开发目的的包含文件。这些是几乎所有 Linux 发行版中本地编译库的事实上的文件夹。您可以运行/sbin/ldconfig 以确保在开发过程中可以链接到这些库。
如果您运行的是 Ubuntu,/usr/local 已经在 ldconfig 路径中,因此链接器将自动定位并注册这些 dll(或就此而言)。否则,请阅读与您的发行版相关的 ldconfig 和 ldconf 的 man 文件。
关于linux - Linux系统上Opencv的安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9417000/