原先使用的都是 opencv3版本的 并未使用过opencv4.由于开发板自动系统中已经安装好了 opencv4.5版本
pkg-config --modversion opencv4
4.5.4
在编译代码的时候出现 编译报错:
/home/jetson/Projects/Demo_Show_Codes-V2.0/Demo_006-B/main.cpp: In function ‘int main()’:
/home/jetson/Projects/Demo_Show_Codes-V2.0/Demo_006-B/main.cpp:207:99: error: ‘CV_LOAD_IMAGE_COLOR’ was not declared in this scope
207 | jects/Stereo_Cam/Demo_Show_Codes-V2.0/Demo_006-B/Left1.bmp", CV_LOAD_IMAGE_COLOR);
| ^~~~~~~~~~~~~~~~~~~
/home/jetson/Projects/Demo_Show_Codes-V2.0/Demo_006-B/main.cpp:208:34: error: ‘CV_BGR2GRAY’ was not declared in this scope
208 | cvtColor(rgbImageL, grayImageL, CV_BGR2GRAY);
| ^~~~~~~~~~~
/home/jetson/Projects/Demo_Show_Codes-V2.0/Demo_006-B/main.cpp:221:44: error: ‘CV_GRAY2BGR’ was not declared in this scope
221 | cvtColor(rectifyImageL, rgbRectifyImageL, CV_GRAY2BGR);
查看发现都是 使用的opencv 4后CV_LOAD_IMAGE_COLOR 、COLOR_BGR2GRAY、CV_GRAY2BGR 定义方式改变了 。
CV_LOAD_IMAGE_COLOR
改为
cv::IMREAD_COLOR
COLOR_BGR2GRAY
改为
cv::COLOR_BGR2GRAY
CV_GRAY2BGR
改为
cv::COLOR_GRAY2BGR
GPU版本的算力问题!!!
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
darknet_ros
运行报错:
(darknet_ros:29233): Gtk-ERROR **: 01:19:38.363: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
参考链接:参考链接
还在尝试中
(darknet_ros:31810): Gtk-ERROR **: 06:17:00.190: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
安装多版本opencv后 安装了opencv3.4.9 没有install
编译项目文件 出现问题:
Gtk-Message: 23:50:21.864: Failed to load module “canberra-gtk-module”
安装:
sudo apt-get install libcanberra-gtk-module
sudo make DESTDIR=/install/directory install