1 Star 0 Fork 16

ArcherPrince/yolov5_infer

forked from PPOV_NUC/yolov5_infer 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test_ov_opencv.cpp 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
#include <iostream>
#include <string>
#include <openvino/openvino.hpp> //openvino header file
#include <opencv2/opencv.hpp> //opencv header file
int main(int argc, char *argv[])
{
// -------- Get OpenVINO runtime version --------
std::cout << ov::get_openvino_version().description << ':' << ov::get_openvino_version().buildNumber << std::endl;
// -------- Step 1. Initialize OpenVINO Runtime Core --------
ov::Core core;
// -------- Step 2. Get list of available devices --------
std::vector<std::string> availableDevices = core.get_available_devices();
// -------- Step 3. Query and print supported metrics and config keys --------
std::cout << "Available devices: " << std::endl;
for (auto &&device : availableDevices)
{
std::cout << device << std::endl;
}
// -------- Step 4. Read a picture file and show by OpenCV --------
cv::Mat img = cv::imread("zidane.jpg"); // Load a picture into memory
cv::namedWindow("Test OpenVINO & OpenCV IDE", 0);
cv::imshow("Test OpenVINO & OpenCV IDE", img);
std::cout << "Image width: " << img.cols << " height: " << img.rows << std::endl;
cv::waitKey(0);
cv::destroyAllWindows();
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/archerprince/yolov5_infer.git
git@gitee.com:archerprince/yolov5_infer.git
archerprince
yolov5_infer
yolov5_infer
main

搜索帮助