/halide/Halide/releases
下载Halide压缩包,解压
添加环境变量,C:\Opencv3.4\halide\Debug;C:\Opencv3.4\halide\Release
①Linker>general>Adiditional Library Directories
release
C:\lib\halide\Release
Debag
C:\lib\halide\Debag
②Linker>Input>
;
追加
③C/C++>General>Additional Include Directory
C:\lib\halide\include
C:\Opencv3.4\halide\tools
追加
#include <>
#include
int main()
{
Halide::Func gradient;
Halide::Var x, y;
gradient(x, y) = x + y;
Halide::Buffer<int32_t> output = (3, 3);
for (int i = 0; i < (); i++)
{
for (int j = 0; j < (); j++)
{
std::cout << output(i, j) << " ";
}
std::cout << std::endl;
}
return 0;
}
如果要使用halide的图片读入函数,还需进行如下操作:
1.需包含头文件
C:\OpenCV4.1\opencv\sources\3rdparty\zlib
C:\OpenCV4.1\opencv\sources\3rdparty\libpng
C:\OpenCV4.1\opencv\sources\3rdparty\libjpeg //次三个文件夹都是opencv中的文件夹
2.引用lib文件
//这两个lib文件可在python安装文件中寻找,然后加入linker中
Linux:
/gaussrieman123/article/details/90208636 安装halide
/p/ad7e7fca51bb //安装llvm