{"id":62177,"library":"opencv2","title":"OpenCV","description":"Open Source Computer Vision Library (version 2.x).","status":"active","version":"2.4.13.7","language":"cpp","source_language":null,"source_url":null,"tags":["computer-vision","image-processing","opencv"],"install":[{"cmd":"vcpkg install opencv2","lang":"bash","label":"vcpkg"},{"cmd":"# CMakeLists.txt\nfind_package(opencv2 CONFIG REQUIRED)\ntarget_link_libraries(main PRIVATE opencv_core)","lang":"cmake","label":"CMake"}],"dependencies":[],"imports":[{"symbol":"opencv2/opencv.hpp","correct":"#include <opencv2/opencv.hpp>"}],"quickstart":{"code":"#include <opencv2/opencv.hpp>\n#include <iostream>\n\nint main() {\n    cv::Mat img = cv::imread(\"image.jpg\");\n    if (img.empty()) { std::cerr << \"Could not read image\\n\"; return 1; }\n    cv::imshow(\"Display\", img);\n    cv::waitKey(0);\n    return 0;\n}","lang":"cpp","description":"Read and display an image"},"warnings":[{"fix":"Use the 'opencv' port instead of 'opencv2' for latest features and security fixes.","message":"OpenCV 2.x is outdated; consider using opencv (version 4.x) for new projects.","severity":"breaking","affected_versions":"all"}],"env_vars":null,"search_vec":"'2':8 'comput':4,11 'computer-vis':10 'imag':14 'image-process':13 'librari':6 'open':2 'opencv':1,16 'process':15 'sourc':3 'version':7 'vision':5,12 'x':9","created_at":"2026-06-17T05:19:19.107929+00:00","updated_at":"2026-06-17T05:19:19.107929+00:00","problems":[],"ecosystem":"vcpkg","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["other"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}