已经用cmake编译好的OpenCV与OpenCV-contrib

上传者: chalk_new | 上传时间: 2026-01-02 11:54:39 | 文件大小: 53.03MB | 文件类型: RAR
OpenCV(开源计算机视觉库)是一个强大的跨平台计算机视觉库,包含了众多图像处理和计算机视觉的算法。OpenCV-contrib是其扩展模块,包含了更多实验性的功能和最新的研究结果。本资源是已经使用CMake工具在Visual Studio 2019环境下编译好的OpenCV与OpenCV-contrib的版本,特别适合于在Windows系统上使用VS进行开发。 CMake是一个开源的跨平台自动化构建系统,它不直接构建项目,而是生成针对特定IDE(如Visual Studio、Xcode等)的项目文件。CMake的优点在于它可以管理不同平台和编译器下的构建过程,使得项目配置更加统一和简化。 在VS2019中使用这个预编译的OpenCV库,首先需要了解如何配置C++项目以链接到这些库。以下是一步一步的配置步骤: 1. **创建新项目**:在VS2019中,选择“创建新项目”,然后选择C++的控制台应用程序或其他类型的项目。 2. **配置CMake**:如果项目使用CMake,需要在CMakeLists.txt文件中指定OpenCV库的位置。添加如下代码: ``` find_package(OpenCV REQUIRED) include_directories(${OpenCV_INCLUDE_DIRS}) target_link_libraries( ${OpenCV_LIBS}) ``` 这里的``应替换为你的项目名称。 3. **设置库路径**:在项目属性中,需要配置附加库目录,指向OpenCV的lib文件夹。同时,配置附加包含目录,指向头文件所在的include文件夹。 4. **使用OpenCV**:现在可以开始在代码中导入OpenCV头文件并使用库函数。例如: ```cpp #include #include int main() { cv::Mat img = cv::imread("image.jpg"); if (img.empty()) { std::cout << "无法读取图片" << std::endl; return -1; } cv::imshow("Image", img); cv::waitKey(0); return 0; } ``` 5. **运行与调试**:保存所有更改后,可以在VS2019中编译并运行项目。如果一切配置正确,程序将能够读取并显示图像。 在实际开发中,OpenCV可以应用于各种场景,如图像处理、特征检测、目标识别、视频分析等。OpenCV-contrib中的扩展模块提供了额外的功能,如深度学习模块(DNN)、XFeatures2D(特征检测与描述符)以及SIFT和SURF等经典算法。 注意,使用预编译库时,确保库版本与你的项目需求匹配,并且注意动态库与静态库的使用,这可能影响最终程序的大小和运行依赖。同时,对于OpenCV的更新版本,可能会有新的API和功能,因此定期检查官方文档和更新是很有必要的。 这个压缩包提供的预编译OpenCV与OpenCV-contrib库为开发者节省了编译时间,可以直接在VS2019项目中使用,提高了开发效率。只需正确配置项目,就可以充分利用OpenCV的强大功能进行计算机视觉相关的开发工作。

文件下载

资源详情

[{"title":"( 590 个子文件 53.03MB ) 已经用cmake编译好的OpenCV与OpenCV-contrib","children":[{"title":"ade-LICENSE <span style='color:#111;'> 11.09KB </span>","children":null,"spread":false},{"title":"ittnotify-LICENSE.BSD <span style='color:#111;'> 1.45KB </span>","children":null,"spread":false},{"title":"OpenCVConfig.cmake <span style='color:#111;'> 16.00KB </span>","children":null,"spread":false},{"title":"OpenCVConfig.cmake <span style='color:#111;'> 6.36KB </span>","children":null,"spread":false},{"title":"OpenCVModules.cmake <span style='color:#111;'> 3.49KB </span>","children":null,"spread":false},{"title":"OpenCVModules-release.cmake <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"OpenCVModules-debug.cmake <span style='color:#111;'> 1.51KB </span>","children":null,"spread":false},{"title":"OpenCVConfig-version.cmake <span style='color:#111;'> 433B </span>","children":null,"spread":false},{"title":"OpenCVConfig-version.cmake <span style='color:#111;'> 433B </span>","children":null,"spread":false},{"title":"setup_vars_opencv4.cmd <span style='color:#111;'> 805B </span>","children":null,"spread":false},{"title":"opencv_world451d.dll <span style='color:#111;'> 125.81MB </span>","children":null,"spread":false},{"title":"opencv_world451.dll <span style='color:#111;'> 67.99MB </span>","children":null,"spread":false},{"title":"opencv_videoio_ffmpeg451_64.dll <span style='color:#111;'> 21.46MB </span>","children":null,"spread":false},{"title":"opencv_img_hash451d.dll <span style='color:#111;'> 439.00KB </span>","children":null,"spread":false},{"title":"opencv_img_hash451.dll <span style='color:#111;'> 156.00KB </span>","children":null,"spread":false},{"title":"opencv_interactive-calibrationd.exe <span style='color:#111;'> 451.00KB </span>","children":null,"spread":false},{"title":"opencv_visualisationd.exe <span style='color:#111;'> 189.00KB </span>","children":null,"spread":false},{"title":"opencv_annotationd.exe <span style='color:#111;'> 173.00KB </span>","children":null,"spread":false},{"title":"opencv_interactive-calibration.exe <span style='color:#111;'> 119.00KB </span>","children":null,"spread":false},{"title":"opencv_versiond.exe <span style='color:#111;'> 117.50KB </span>","children":null,"spread":false},{"title":"opencv_version_win32d.exe <span style='color:#111;'> 115.00KB </span>","children":null,"spread":false},{"title":"opencv_waldboost_detectord.exe <span style='color:#111;'> 91.00KB </span>","children":null,"spread":false},{"title":"opencv_visualisation.exe <span style='color:#111;'> 54.00KB </span>","children":null,"spread":false},{"title":"opencv_annotation.exe <span style='color:#111;'> 40.50KB </span>","children":null,"spread":false},{"title":"opencv_version.exe <span style='color:#111;'> 36.00KB </span>","children":null,"spread":false},{"title":"opencv_version_win32.exe <span style='color:#111;'> 33.50KB </span>","children":null,"spread":false},{"title":"opencv_waldboost_detector.exe <span style='color:#111;'> 21.00KB </span>","children":null,"spread":false},{"title":"ittnotify-LICENSE.GPL <span style='color:#111;'> 17.15KB </span>","children":null,"spread":false},{"title":"core_c.h <span style='color:#111;'> 125.64KB </span>","children":null,"spread":false},{"title":"msa_macros.h <span style='color:#111;'> 80.61KB </span>","children":null,"spread":false},{"title":"types_c.h <span style='color:#111;'> 69.58KB </span>","children":null,"spread":false},{"title":"kmeans_index.h <span style='color:#111;'> 66.24KB </span>","children":null,"spread":false},{"title":"imgproc_c.h <span style='color:#111;'> 49.83KB </span>","children":null,"spread":false},{"title":"dist.h <span style='color:#111;'> 40.32KB </span>","children":null,"spread":false},{"title":"cvdef.h <span style='color:#111;'> 33.91KB </span>","children":null,"spread":false},{"title":"constants_c.h <span style='color:#111;'> 30.44KB </span>","children":null,"spread":false},{"title":"cv_cpu_helper.h <span style='color:#111;'> 26.86KB </span>","children":null,"spread":false},{"title":"hierarchical_clustering_index.h <span style='color:#111;'> 25.83KB </span>","children":null,"spread":false},{"title":"autotuned_index.h <span style='color:#111;'> 20.55KB </span>","children":null,"spread":false},{"title":"kdtree_single_index.h <span style='color:#111;'> 20.17KB </span>","children":null,"spread":false},{"title":"kdtree_index.h <span style='color:#111;'> 19.86KB </span>","children":null,"spread":false},{"title":"lsh_table.h <span style='color:#111;'> 18.25KB </span>","children":null,"spread":false},{"title":"types_c.h <span style='color:#111;'> 17.75KB </span>","children":null,"spread":false},{"title":"lsh_index.h <span style='color:#111;'> 15.35KB </span>","children":null,"spread":false},{"title":"result_set.h <span style='color:#111;'> 14.92KB </span>","children":null,"spread":false},{"title":"index_testing.h <span style='color:#111;'> 10.58KB </span>","children":null,"spread":false},{"title":"highgui_c.h <span style='color:#111;'> 10.42KB </span>","children":null,"spread":false},{"title":"any.h <span style='color:#111;'> 8.49KB </span>","children":null,"spread":false},{"title":"cv_cpu_dispatch.h <span style='color:#111;'> 7.93KB </span>","children":null,"spread":false},{"title":"hdf5.h <span style='color:#111;'> 7.16KB </span>","children":null,"spread":false},{"title":"allocator.h <span style='color:#111;'> 6.12KB </span>","children":null,"spread":false},{"title":"all_indices.h <span style='color:#111;'> 6.01KB </span>","children":null,"spread":false},{"title":"composite_index.h <span style='color:#111;'> 5.96KB </span>","children":null,"spread":false},{"title":"nn_index.h <span style='color:#111;'> 5.94KB </span>","children":null,"spread":false},{"title":"saving.h <span style='color:#111;'> 5.77KB </span>","children":null,"spread":false},{"title":"simplex_downhill.h <span style='color:#111;'> 5.65KB </span>","children":null,"spread":false},{"title":"videoio_c.h <span style='color:#111;'> 5.51KB </span>","children":null,"spread":false},{"title":"calib3d_c.h <span style='color:#111;'> 5.24KB </span>","children":null,"spread":false},{"title":"cap_ios.h <span style='color:#111;'> 4.80KB </span>","children":null,"spread":false},{"title":"interface.h <span style='color:#111;'> 4.67KB </span>","children":null,"spread":false},{"title":"dynamic_bitset.h <span style='color:#111;'> 4.49KB </span>","children":null,"spread":false},{"title":"defines.h <span style='color:#111;'> 4.36KB </span>","children":null,"spread":false},{"title":"heap.h <span style='color:#111;'> 4.05KB </span>","children":null,"spread":false},{"title":"random.h <span style='color:#111;'> 4.04KB </span>","children":null,"spread":false},{"title":"params.h <span style='color:#111;'> 3.86KB </span>","children":null,"spread":false},{"title":"logger.h <span style='color:#111;'> 3.77KB </span>","children":null,"spread":false},{"title":"linear_index.h <span style='color:#111;'> 3.73KB </span>","children":null,"spread":false},{"title":"cvconfig.h <span style='color:#111;'> 3.50KB </span>","children":null,"spread":false},{"title":"ground_truth.h <span style='color:#111;'> 3.26KB </span>","children":null,"spread":false},{"title":"matrix.h <span style='color:#111;'> 3.22KB </span>","children":null,"spread":false},{"title":"object_factory.h <span style='color:#111;'> 2.86KB </span>","children":null,"spread":false},{"title":"sampling.h <span style='color:#111;'> 2.81KB </span>","children":null,"spread":false},{"title":"ios.h <span style='color:#111;'> 2.64KB </span>","children":null,"spread":false},{"title":"timer.h <span style='color:#111;'> 2.53KB </span>","children":null,"spread":false},{"title":"general.h <span style='color:#111;'> 2.17KB </span>","children":null,"spread":false},{"title":"config.h <span style='color:#111;'> 1.78KB </span>","children":null,"spread":false},{"title":"constants_c.h <span style='color:#111;'> 1.70KB </span>","children":null,"spread":false},{"title":"interface.h <span style='color:#111;'> 1.00KB </span>","children":null,"spread":false},{"title":"macosx.h <span style='color:#111;'> 731B </span>","children":null,"spread":false},{"title":"interface.h <span style='color:#111;'> 551B </span>","children":null,"spread":false},{"title":"constants_c.h <span style='color:#111;'> 462B </span>","children":null,"spread":false},{"title":"constants_c.h <span style='color:#111;'> 398B </span>","children":null,"spread":false},{"title":"dummy.h <span style='color:#111;'> 197B </span>","children":null,"spread":false},{"title":"imgcodecs_c.h <span style='color:#111;'> 145B </span>","children":null,"spread":false},{"title":"imgproc.hpp <span style='color:#111;'> 230.02KB </span>","children":null,"spread":false},{"title":"color_detail.hpp <span style='color:#111;'> 218.74KB </span>","children":null,"spread":false},{"title":"calib3d.hpp <span style='color:#111;'> 209.95KB </span>","children":null,"spread":false},{"title":"mat.hpp <span style='color:#111;'> 156.78KB </span>","children":null,"spread":false},{"title":"intrin_avx512.hpp <span style='color:#111;'> 156.66KB </span>","children":null,"spread":false},{"title":"core.hpp <span style='color:#111;'> 148.25KB </span>","children":null,"spread":false},{"title":"intrin_wasm.hpp <span style='color:#111;'> 147.63KB </span>","children":null,"spread":false},{"title":"intrin_sse.hpp <span style='color:#111;'> 131.39KB </span>","children":null,"spread":false},{"title":"intrin_avx.hpp <span style='color:#111;'> 130.70KB </span>","children":null,"spread":false},{"title":"intrin_rvv.hpp <span style='color:#111;'> 94.88KB </span>","children":null,"spread":false},{"title":"ml.hpp <span style='color:#111;'> 90.46KB </span>","children":null,"spread":false},{"title":"intrin_neon.hpp <span style='color:#111;'> 86.37KB </span>","children":null,"spread":false},{"title":"mat.inl.hpp <span style='color:#111;'> 84.48KB </span>","children":null,"spread":false},{"title":"intrin_cpp.hpp <span style='color:#111;'> 81.42KB </span>","children":null,"spread":false},{"title":"core.hpp <span style='color:#111;'> 80.50KB </span>","children":null,"spread":false},{"title":"opencl_clamdblas.hpp <span style='color:#111;'> 80.32KB </span>","children":null,"spread":false},{"title":"......","children":null,"spread":false},{"title":"<span style='color:steelblue;'>文件过多,未全部展示</span>","children":null,"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明