未定义标识符imread包含在哪个头文件里

未定义标识符imread包含在哪个头文件里,第1张

可以凳宽加上万能头文件模板

#include <stdio.h>

#include <tchar.h>

#include <iostream>

#include <fstream>

#include <opencv2/opencv.hpp>

#define CV_VERSION_ID CVAUX_STR(CV_MAJOR_VERSION) CVAUX_STR(CV_MINOR_VERSION) CVAUX_STR(CV_SUBMINOR_VERSION)

#ifdef _DEBUG

#define cvLIB(name) "opencv_" name CV_VERSION_ID "d"

#else

#define cvLIB(name) "opencv_" name CV_VERSION_ID

#endif

#pragma comment( lib, cvLIB("core"枣拿亮) )

#pragma comment( lib, cvLIB("imgproc") )

#pragma comment( lib, cvLIB("highgui") )

#pragma comment( lib, cvLIB("flann") )

#pragma comment( lib, cvLIB("features2d") )

#pragma comment( lib, cvLIB("calib3d") )

#pragma comment( lib, cvLIB("gpu") )

#pragma comment( lib, cvLIB("legacy") )

#pragma comment( lib, cvLIB("ml") )

#pragma comment( lib, cvLIB("objdetect") )

#pragma comment( lib, cvLIB("ts") )

#pragma comment( lib, cvLIB("video") )

#pragma comment( lib, cvLIB("contrib") )

#pragma comment( lib, cvLIB("nonfree") )

拿走吧,应该能都解敏物决opencv各个版本的问题

cv::是命名埋滚空间,如果程序头部添上using namespace cv那么imread和cv::imread就一样了。

函数imread用于读取图片文件中的数据弯大余。在matlab的命令窗口中输入doc imread或者help imread即可获得该函数的帮助信息。

调用格式

A = imread(filename,fmt)

[X,map] = imread(filename,fmt)

[...] = imread(filename)

[...] = imread(URL,...)

[...] = imread(...,idx) (CUR, GIF, ICO, and TIFF only)

仿尺[...] = imread(...,'PixelRegion',{ROWS, COLS}) (TIFF only)

[...] = imread(...,'frames',idx) (GIF only)

[...] = imread(...,ref) (HDF only)

[...] = imread(...,'BackgroundColor',BG) (PNG only)

[A,map,alpha] = imread(...) (ICO, CUR, and PNG only


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/12248692.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-22
下一篇 2023-05-22

发表评论

登录后才能评论

评论列表(0条)

保存