-
【功能模块】本项目通过dvpp采集camera,通过opencv进行预处理,acl进行推理,opencv后处理,通过presenteragent发送结果展示。由于项目需要用到机器人操作系统ROS,ROS的部分功能依赖自带的对应版本的opencv3.2,因此将原项目opencv4.3的库换为opencv3.2,编译成功,运行报错。【操作步骤&问题现象】CMakeLists.txtinclude_directories( ../inc/ # $ENV{HOME}/ascend_ddk/arm/usr/include #opencv 3.2.0 $ENV{HOME}/ascend_ddk/arm/include/opencv4/ #opencv 4.3.0 ${INC_PATH}/acllib/include/ $ENV{HOME}/ascend_ddk/arm/include/ $ENV{HOME}/ascend_ddk/arm/include/ascenddk $ENV{HOME}/Ascend/ # $ENV{HOME}/ascend_ddk/arm/ros/melodic/include #ROS include ) if(target STREQUAL "Simulator_Function") add_compile_options(-DFUNC_SIM) endif() # add host lib path link_directories( /usr/local/lib ${LIB_PATH} # $ENV{HOME}/ascend_ddk/arm/lib/ #该路径下包含libpresenteragent.so 和 libopencv_xxx.so.4.3相关库文件,此处注释,后面通过绝对路径链接 $ENV{HOME}/Ascend/driver/ $ENV{HOME}/Ascend/ ${INC_PATH}/atc/lib64/ # $ENV{HOME}/ascend_ddk/arm/ros/melodic/lib #ROS lib ) ### Cross Compile depth_acl add_executable(main utils.cpp camera.cpp model_process.cpp depth_map.cpp dvpp_process.cpp dvpp_resize.cpp dvpp_jpege.cpp main.cpp) target_link_libraries(main ascendcl acl_dvpp stdc++ c_sec slog media_mini pthread protobuf /home/ascend/ascend_ddk/arm/lib/libpresenteragent.so #libpresenteragent.so #OPENCV 4.3 in ascend_ddk/arm /home/ascend/ascend_ddk/arm/lib/libopencv_core.so.4.3 /home/ascend/ascend_ddk/arm/lib/libopencv_imgproc.so.4.3 /home/ascend/ascend_ddk/arm/lib/libopencv_imgcodecs.so.4.3 #OPENCV 3.2 copyed from atlas, automatically installed by ROS # /home/ascend/ascend_ddk/arm/usr/lib/aarch64-linux-gnu/libopencv_imgcodecs.so.3.2 # /home/ascend/ascend_ddk/arm/usr/lib/aarch64-linux-gnu/libopencv_core.so.3.2 # /home/ascend/ascend_ddk/arm/usr/lib/aarch64-linux-gnu/libopencv_imgproc.so.3.2 # /home/ascend/ascend_ddk/arm/usr/lib/libgdal.so.20 # /home/ascend/ascend_ddk/arm/usr/lib/libarmadillo.so.8 # /home/ascend/ascend_ddk/arm/usr/lib/libmfhdfalt.so.0 # /home/ascend/ascend_ddk/arm/usr/lib/libdfalt.so.0 # /home/ascend/ascend_ddk/arm/usr/lib/libogdi.so.3.2 # /home/ascend/ascend_ddk/arm/usr/lib/libPocoFoundation.so.50 )以上CMakeLists.txt 在host侧的MindStudio中交叉编译并在Atlas成功运行(OpenCV 4.3)。二、由于本项目需要用到ROS,因此通过apt在Atlas侧安装了ROS Melodic版本ROS的相关库文件、头文件安装在Atlas侧 /opt/ros/melodic/路径下,如下ls所示HwHiAiUser@davinci-mini:~$ ls /opt/ros/melodic/.catkin _setup_util.py env.sh include/ local_setup.bash local_setup.zsh setup.sh share/ .rosinstall bin/ etc/ lib/ local_setup.sh setup.bash setup.zshROS安装时会同时会 自动安装 OpenCV 3.2 版本在Atlas侧(因为ros需要依赖opencv).h头文件的路径 /usr/include/opencv2.so库文件路径 /usr/lib/aarch64-linux-gnu三、由于项目需要用到ROS的相关功能,需要依赖到OpenCV 3.2的一些so文件,因此将以上ROS 和OpenCV 3.2 通过scp 到Host电脑侧ROS:Atlas侧 /opt/ros/melodic/ 拷贝到 Host侧 $ENV{HOME}/ascend_ddk/arm/ros/melodic头文件:$ENV{HOME}/ascend_ddk/arm/ros/melodicinclude库文件:$ENV{HOME}/ascend_ddk/arm/ros/melodic/lib/OpenCV 3.2:头文件:Atlas侧 /usr/include 拷贝到 Host侧(opencv3.2头文件在该路径下的include中) $ENV{HOME}/ascend_ddk/arm/usr/include/opencv2 库文件:Atlas侧 /usr/lib 拷贝到 Host侧 (opencv3.2库文件在该路径下的aarch64-linux-gnu中) $ENV{HOME}/ascend_ddk/arm/usr/lib/aarch64-linux-gnu以供交叉编译四、将以上CMakeLists.txt中的include_directories 和link_directories中 分别替换为 opencv 3.2的头文件和so文件进行编译会报错找不到 libgdal.so.20Warning:/usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/bin/ld: warning: libgdal.so.20, needed by /home/ascend/ascend_ddk/arm/usr/lib/aarch64-linux-gnu/libopencv_imgcodecs.so.3.2, not found (try using -rpath or -rpath-link)通过find命令找到libgdal.so.20的路径在链接库中添加 host侧 /home/ascend/ascend_ddk/arm/usr/lib/libgdal.so.20进而报错找不到libarmadillo.so.8 libmfhdfalt.so.0 libdfalt.so.0 libogdi.so.3.2找到路径并添加MindStudio编译成功。最终CMakeLists.txt# Header path include_directories( ../inc/ $ENV{HOME}/ascend_ddk/arm/usr/include #opencv 3.2.0 # $ENV{HOME}/ascend_ddk/arm/include/opencv4/ #opencv 4.3.0 ${INC_PATH}/acllib/include/ $ENV{HOME}/ascend_ddk/arm/include/ $ENV{HOME}/ascend_ddk/arm/include/ascenddk $ENV{HOME}/Ascend/ # $ENV{HOME}/ascend_ddk/arm/ros/melodic/include #ROS include ) if(target STREQUAL "Simulator_Function") add_compile_options(-DFUNC_SIM) endif() # add host lib path link_directories( /usr/local/lib ${LIB_PATH} # $ENV{HOME}/ascend_ddk/arm/lib/ #该路径下包含libpresenteragent.so 和 libopencv_xxx.so.4.3相关库文件,此处注释,后面通过绝对路径链接 $ENV{HOME}/Ascend/driver/ $ENV{HOME}/Ascend/ ${INC_PATH}/atc/lib64/ # $ENV{HOME}/ascend_ddk/arm/ros/melodic/lib #ROS lib ) ### Cross Compile depth_acl add_executable(main utils.cpp camera.cpp model_process.cpp depth_map.cpp dvpp_process.cpp dvpp_resize.cpp dvpp_jpege.cpp main.cpp) target_link_libraries(main ascendcl acl_dvpp stdc++ c_sec slog media_mini pthread protobuf /home/ascend/ascend_ddk/arm/lib/libpresenteragent.so #libpresenteragent.so #OPENCV 4.3 in ascend_ddk/arm # /home/ascend/ascend_ddk/arm/lib/libopencv_core.so.4.3 # /home/ascend/ascend_ddk/arm/lib/libopencv_imgproc.so.4.3 # /home/ascend/ascend_ddk/arm/lib/libopencv_imgcodecs.so.4.3 #OPENCV 3.2 copyed from atlas, automatically installed by ROS /home/ascend/ascend_ddk/arm/usr/lib/aarch64-linux-gnu/libopencv_imgcodecs.so.3.2 /home/ascend/ascend_ddk/arm/usr/lib/aarch64-linux-gnu/libopencv_core.so.3.2 /home/ascend/ascend_ddk/arm/usr/lib/aarch64-linux-gnu/libopencv_imgproc.so.3.2 /home/ascend/ascend_ddk/arm/usr/lib/libgdal.so.20 /home/ascend/ascend_ddk/arm/usr/lib/libarmadillo.so.8 /home/ascend/ascend_ddk/arm/usr/lib/libmfhdfalt.so.0 /home/ascend/ascend_ddk/arm/usr/lib/libdfalt.so.0 /home/ascend/ascend_ddk/arm/usr/lib/libogdi.so.3.2 # /home/ascend/ascend_ddk/arm/usr/lib/libPocoFoundation.so.50 )上传atlas200dk运行出错,报错为dvpp初始化出错?【日志信息】(可选,上传日志内容或者附件)见附件
-
您好。我想咨询一下应用软件移植时,第三方库的问题:如点云PCL、OpenCV库的支持;1、请问贵公司是否在开发环境编译过?如何在MDC工具链上进行编译; 有没有相关示例;2、比如我需要将激光点云进行分割算法的应用部署到MDC的host上,使用了PCL库;有没有相关的示例可以参考;
-
【功能模块】【操作步骤&问题现象】1、参考的这篇https://blog.csdn.net/Hello_yes112/article/details/1079560902、【截图信息】【日志信息】(可选,上传日志内容或者附件)
-
以前做计算机视觉,大多数用的都是机器学习+图像处理的方法,这里图像处理方法工具就是opencv或matlab,但是现在做计算机视觉的主流工具是深度学习了,传统图像处理中的很多方法都用不上。我自己的话,就是把OpenCV官网的Python教程学了前四章,后面就没学了。有经验的前辈可以指导一下吗?现在搞计算机视觉有时候会用到OpenCV,但用的又不是很多,那么要将OpenCV掌握到什么程度呢?
-
【功能模块】atlas200dk【操作步骤&问题现象】1、按照 https://bbs.huaweicloud.com/forum/thread-72012-1-1.html指引使用 https://gitee.com/lovingascend/quick_start/blob/master/README.md的第二节 Atlas200DK-开发环境和运行环境合设搭建200dk开发环境,运行文中例程正确运行。2、然后按照https://gitee.com/ascend/samples/blob/master/README.md 的步骤,安装opencv依赖时报错,请问是因为安装python3.7.5引起的吗?软件环境还需要如何配置,才能正确安装ffmpeg和opencv?sudo apt-get install build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg-dev libtiff5-dev git cmake libswscale-dev python3-dev python3-pip pkg-config -y报错后,分别进行各包安装,也报告错误如下:【日志信息】HwHiAiUser@davinci-mini:~$ sudo apt-get install python3-setuptoolsReading package lists... DoneBuilding dependency tree Reading state information... Donepython3-setuptools is already the newest version (39.0.1-2).0 upgraded, 0 newly installed, 0 to remove and 91 not upgraded.16 not fully installed or removed.After this operation, 0 B of additional disk space will be used.Do you want to continue? [Y/n] ySetting up python3-lib2to3 (3.6.9-1~18.04) .../usr/bin/python3.7: can't open file '/usr/lib/python3.7/py_compile.py': [Errno 2] No such file or directorydpkg: error processing package python3-lib2to3 (--configure): installed python3-lib2to3 package post-installation script subprocess returned error exit status 2dpkg: dependency problems prevent configuration of python3-distutils: python3-distutils depends on python3-lib2to3 (>= 3.6.4); however: Package python3-lib2to3 is not configured yet.dpkg: error processing package python3-distutils (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libglib2.0-dev-bin: libglib2.0-dev-bin depends on python3-distutils; however: Package python3-distutils is not configured yet.dpkg: error processing package libglib2.0-dev-bin (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of python3-dev: python3-dev depends on python3-distutils (>= 3.6.7-1~); however: Package python3-distutils is not configured yet.dpkg: error processing package python3-dev (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libglib2.0-dev:arm64: libglib2.0-dev:arm64 depends on libglib2.0-dev-bin (= 2.56.4-0ubuntu0.18.04.6); however: Package libglib2.0-dev-bin is not configured yet.dpkg: error processing package libglib2.0-dev:arm64 (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libgdk-pixbuf2.0-dev: libgdk-pixbuf2.0-dev depends on libglib2.0-dev (>= 2.37.6); however: Package libglib2.0-dev:arm64 is not configured yet.dpkg: error processing package libgdk-pixbuf2.0-dev (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of python3-pip: python3-pip depends on python3-distutils; however: Package python3-distutils is not configured yet.dpkg: error processing package python3-pip (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libpango1.0-dev: libpango1.0-dev depends on libglib2.0-dev (>= 2.34.0); however: Package libglib2.0-dev:arm64 is not configured yet.dpkg: error processing package libpango1.0-dev (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of python3-setuptools: python3-setuptools depends on python3-distutils; however: Package python3-distutils is not configured yet.dpkg: error processing package python3-setuptools (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libharfbuzz-dev:arm64: libharfbuzz-dev:arm64 depends on libglib2.0-dev (>= 2.19.1); however: Package libglib2.0-dev:arm64 is not configured yet.dpkg: error processing package libharfbuzz-dev:arm64 (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of dh-python: dh-python depends on python3-distutils; however: Package python3-distutils is not configured yet.dpkg: error processing package dh-python (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libicu-le-hb-dev:arm64: libicu-le-hb-dev:arm64 depends on libharfbuzz-dev; however: Package libharfbuzz-dev:arm64 is not configured yet.dpkg: error processing package libicu-le-hb-dev:arm64 (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libcairo2-dev:arm64: libcairo2-dev:arm64 depends on libglib2.0-dev; however: Package libglib2.0-dev:arm64 is not configured yet.dpkg: error processing package libcairo2-dev:arm64 (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libatk1.0-dev:arm64: libatk1.0-dev:arm64 depends on libglib2.0-dev (>= 2.31.2); however: Package libglib2.0-dev:arm64 is not configured yet.dpkg: error processing package libatk1.0-dev:arm64 (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libgtk2.0-dev: libgtk2.0-dev depends on libglib2.0-dev (>= 2.27.3); however: Package libglib2.0-dev:arm64 is not configured yet. libgtk2.0-dev depends on libgdk-pixbuf2.0-dev (>= 2.21.0); however: Package libgdk-pixbuf2.0-dev is not configured yet. libgtk2.0-dev depends on libpango1.0-dev (>= 1.20); however: Package libpango1.0-dev is not configured yet. libgtk2.0-dev depends on libatk1.0-dev (>= 1.29.2); however: Package libatk1.0-dev:arm64 is not configured yet. libgtk2.0-dev depends on libcairo2-dev (>= 1.6.4-6.1); however: Package libcairo2-dev:arm64 is not configured yet.dpkg: error processing package libgtk2.0-dev (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libicu-dev: libicu-dev depends on libicu-le-hb-dev; however: Package libicu-le-hb-dev:arm64 is not configured yet.dpkg: error processing package libicu-dev (--configure): dependency problems - leaving unconfiguredErrors were encountered while processing: python3-lib2to3 python3-distutils libglib2.0-dev-bin python3-dev libglib2.0-dev:arm64 libgdk-pixbuf2.0-dev python3-pip libpango1.0-dev python3-setuptools libharfbuzz-dev:arm64 dh-python libicu-le-hb-dev:arm64 libcairo2-dev:arm64 libatk1.0-dev:arm64 libgtk2.0-dev libicu-devE: Sub-process /usr/bin/dpkg returned an error code (1)
-
【功能模块】yolov3 https://gitee.com/ascend/samples/tree/master/objectdetection/for_atlas200dk_1.7x.0.0_c++完全按照文档配置完成,包括板子上安装各种依赖【操作步骤&问题现象】1、运行mindstudio前, 添加参数../data2、run3、在板子上运行./main ../data是晚上ok的,但是用mindstudio运行就不行【截图信息】【日志信息】(可选,上传日志内容或者附件)2020-09-28 11:58:42 - [INFO] Synchronizing "/home/gongjia/AscendProjects/detectCaffe/out/run.sh" to "~/HIAI_PROJECTS/workspace_mind_studio/detectCaffe_aedc6097/out/" on the remote host.2020-09-28 11:58:42 - [INFO] There is no dump path and no need to dump.2020-09-28 11:58:43 - [INFO] Assigning execute permission to run.sh on the remote host../workspace_mind_studio_detectCaffe: error while loading shared libraries: libopencv_core.so.4.3: cannot open shared object file: No such file or directory
-
我按照以下地址的步骤安装好了opencv,https://gitee.com/ascend/samples/tree/master/common/install_opencv/for_atlas200dk在CMakeList.txt中添加了:代码中添加了头文件:编译报错:请问是什么原因呢?
-
C73c++以下是对图片的处理操作,主要是对图片进行等比例缩放、padding、并且除以255Result ObjectDetect::Preprocess(cv::Mat& frame, uint32_t& W, uint32_t& H){ float widthScale = (float)(modelWidth_) / W; float heightScale = (float)(modelHeight_) / H; float Scale = min(widthScale, heightScale); uint32_t new_W = Scale * W; uint32_t new_H = Scale * H; //resize cv::Mat reiszeMat; cv::resize(frame, reiszeMat, cv::Size(new_W, new_H)); if (reiszeMat.empty()) { ERROR_LOG("Resize image failed"); return FAILED; } //padding float dw = (float)(modelWidth_ - new_W) / 2.0; float dh = (float)(modelHeight_ - new_H) / 2.0; int top = (int)Utils::round(dh - 0.1); int bottom = (int)Utils::round(dh + 0.1); int left = (int)Utils::round(dw - 0.1); int right = (int)Utils::round(dw + 0.1); cv::Mat PaddingMat; cv::copyMakeBorder(reiszeMat, PaddingMat, top, bottom, left, right, cv::BORDER_CONSTANT, 0); if (PaddingMat.cols != modelWidth_ or PaddingMat.rows != modelHeight_) { ERROR_LOG("Padding image failed"); return FAILED; } //normalize cv::Mat dst = cv::Mat::zeros(PaddingMat.size(), CV_32FC3); PaddingMat.convertTo(dst,CV_32FC3,1/255.0); INFO_LOG("w=%d", dst.cols); INFO_LOG("h=%d", dst.rows); //Copy the data into the cache of the input dataset aclrtMemcpyKind policy = (runMode_ == ACL_HOST)? ACL_MEMCPY_HOST_TO_DEVICE:ACL_MEMCPY_DEVICE_TO_DEVICE; //实现host内 host与device之间 devices内的同步内存复制 //目的内存地址指针、目的内存地址的最大内存长度、源内存地址指针、内存复制的长度 aclError ret = aclrtMemcpy(imageDataBuf_, imageDataSize_, dst.ptr<double>(), imageDataSize_, policy); if (ret != ACL_ERROR_NONE) { ERROR_LOG("Copy padding image data to device failed."); return FAILED; } return SUCCESS; }然后我的模型是用的tensorflow,模型输入大小为416x416错误log如下:请问我的大小主要是哪错了,而且tensorflow是一个输入(样例代码是两个输入),我已经做了修改。Result ModelProcess::CreateInput(void *input1, size_t input1size) { input_ = aclmdlCreateDataset(); if (input_ == nullptr) { ERROR_LOG("can't create dataset, create input failed"); return FAILED; } aclDataBuffer* inputData = aclCreateDataBuffer(input1, input1size); if (inputData == nullptr) { ERROR_LOG("can't create data buffer, create input failed"); return FAILED; } aclError ret = aclmdlAddDatasetBuffer(input_, inputData); if (inputData == nullptr) { ERROR_LOG("can't add data buffer, create input failed"); aclDestroyDataBuffer(inputData); inputData = nullptr; return FAILED; } return SUCCESS; }
-
【操作步骤&问题现象】按照该教程安装opencv后在Mind Studio上编译报错:https://gitee.com/ascend/samples/tree/master/common/install_opencv/for_atlas200dk 开发板已经是连接的状态了,ada也重启过。请问问题的原因可能在哪里?谢谢【截图信息】
-
按照这个教程安装https://blog.csdn.net/Hello_yes112/article/details/107956090#_28安装相关依赖普通用户下安装,这些软件包一部分是ffmpeg和opencv安装时的依赖,还有一部分是后面要用到的软件工具。sudo apt-get install build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg-dev libtiff5-dev libswscale-dev git cmake这个依赖装不上提示错误,原因就是按照博客第一章装了Python3.7.5,导致下面问题,怎么解决sudo apt install libblas-dev gfortran libblas3 libopenblas-devReading package lists... DoneBuilding dependency tree Reading state information... Donelibblas-dev is already the newest version (3.7.1-4ubuntu1).libblas3 is already the newest version (3.7.1-4ubuntu1).libopenblas-dev is already the newest version (0.2.20+ds-4).gfortran is already the newest version (4:7.4.0-1ubuntu2.3).The following packages were automatically installed and are no longer required: libnetplan0 libyaml-0-2 python3-netifaces python3-yamlUse 'sudo apt autoremove' to remove them.0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.12 not fully installed or removed.After this operation, 0 B of additional disk space will be used.Do you want to continue? [Y/n] YSetting up python3-lib2to3 (3.6.9-1~18.04) .../usr/bin/python3.7: can't open file '/usr/lib/python3.7/py_compile.py': [Errno 2] No such file or directorydpkg: error processing package python3-lib2to3 (--configure): installed python3-lib2to3 package post-installation script subprocess returned error exit status 2dpkg: dependency problems prevent configuration of python3-distutils: python3-distutils depends on python3-lib2to3 (>= 3.6.4); however: Package python3-lib2to3 is not configured yet.dpkg: error processing package python3-distutils (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libglib2.0-dev-bin: libglib2.0-dev-bin depends on python3-distutils; however: Package python3-distutils is not configured yet.dpkg: error processing package libglib2.0-dev-bin (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libglib2.0-dev:arm64: libglib2.0-dev:arm64 depends on libglib2.0-dev-bin (= 2.56.4-0ubuntu0.18.04.6); however: Package libglib2.0-dev-bin is not configured yet.dpkg: error processing package libglib2.0-dev:arm64 (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libgdk-pixbuf2.0-dev: libgdk-pixbuf2.0-dev depends on libglib2.0-dev (>= 2.37.6); however: Package libglib2.0-dev:arm64 is not configured yet.dpkg: error processing package libgdk-pixbuf2.0-dev (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libpango1.0-dev: libpango1.0-dev depends on libglib2.0-dev (>= 2.34.0); however: Package libglib2.0-dev:arm64 is not configured yet.dpkg: error processing package libpango1.0-dev (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libharfbuzz-dev:arm64: libharfbuzz-dev:arm64 depends on libglib2.0-dev (>= 2.19.1); however: Package libglib2.0-dev:arm64 is not configured yet.dpkg: error processing package libharfbuzz-dev:arm64 (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libicu-le-hb-dev:arm64: libicu-le-hb-dev:arm64 depends on libharfbuzz-dev; however: Package libharfbuzz-dev:arm64 is not configured yet.dpkg: error processing package libicu-le-hb-dev:arm64 (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libcairo2-dev:arm64: libcairo2-dev:arm64 depends on libglib2.0-dev; however: Package libglib2.0-dev:arm64 is not configured yet.dpkg: error processing package libcairo2-dev:arm64 (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libatk1.0-dev:arm64: libatk1.0-dev:arm64 depends on libglib2.0-dev (>= 2.31.2); however: Package libglib2.0-dev:arm64 is not configured yet.dpkg: error processing package libatk1.0-dev:arm64 (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libgtk2.0-dev: libgtk2.0-dev depends on libglib2.0-dev (>= 2.27.3); however: Package libglib2.0-dev:arm64 is not configured yet. libgtk2.0-dev depends on libgdk-pixbuf2.0-dev (>= 2.21.0); however: Package libgdk-pixbuf2.0-dev is not configured yet. libgtk2.0-dev depends on libpango1.0-dev (>= 1.20); however: Package libpango1.0-dev is not configured yet. libgtk2.0-dev depends on libatk1.0-dev (>= 1.29.2); however: Package libatk1.0-dev:arm64 is not configured yet. libgtk2.0-dev depends on libcairo2-dev (>= 1.6.4-6.1); however: Package libcairo2-dev:arm64 is not configured yet.dpkg: error processing package libgtk2.0-dev (--configure): dependency problems - leaving unconfigureddpkg: dependency problems prevent configuration of libicu-dev: libicu-dev depends on libicu-le-hb-dev; however: Package libicu-le-hb-dev:arm64 is not configured yet.dpkg: error processing package libicu-dev (--configure): dependency problems - leaving unconfiguredErrors were encountered while processing: python3-lib2to3 python3-distutils libglib2.0-dev-bin libglib2.0-dev:arm64 libgdk-pixbuf2.0-dev libpango1.0-dev libharfbuzz-dev:arm64 libicu-le-hb-dev:arm64 libcairo2-dev:arm64 libatk1.0-dev:arm64 libgtk2.0-dev libicu-devE: Sub-process /usr/bin/dpkg returned an error code (1)
-
【功能模块】编译运行应用【操作步骤&问题现象】1、调用opencv编写推理应用,用如下命令进行编译,第一个命令make成功;第二个命令交叉编译,make报错。当开发环境与运行环境操作系统架构相同时,执行如下命令编译: cmake ../../../src -DCMAKE_CXX_COMPILER=g++ -DCMAKE_SKIP_RPATH=TRUE 当运行环境为Atlas 500智能小站时,开发环境为X86架构,运行环境为Arm架构,执行以下命令进行交叉编译: cmake ../../../src -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_SKIP_RPATH=TRUE2、猜测是安装opencv时(通过编译源码安装),没有用交叉编译,.so文件为x86文件。所以用上图第二个命令重新编译opencv,但是make报错。命令如下:cmake -D CMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -D CMAKE_SKIP_RPATH=TRUE BUILD_SHARED_LIBS=ON -D BUILD_opencv_python3=YES -D BUILD_TESTS=OFF -D CMAKE_BUILD_TYPE=RELEASE -D OPENCV_GENERATE_PKGCONFIG=ON -D CMAKE_INSTALL_PREFIX=/home/stl/Ascend/nnrt/20.0.0.RC1/arm64-linux_gcc7.3.0 -D WITH_LIBV4L=ON -D OPENCV_EXTRA_MODULES=../../opencv_contrib/modules -D PYTHON3_LIBRARIES=/usr/local/python3.7.5/lib/libpython3.7m.so -D PYTHON3_NUMPY_INCLUDE_DIRS=/home/stl/.local/lib/python3.7/site-packages/numpy/core/include/ -D OPENCV_SKIP_PYTHON_LOADER=ON ..sudo make【截图信息】【日志信息】(可选,上传日志内容或者附件)
-
【功能模块】在InferOfflineVideo样例中:InferOfflineVideo/Module/VideoDecoder/VideoDecoder.cpp 函数VideoDecoder::Process()调用vdecDvppCommon_->CombineVdecProcess(vdecData, decodeInfo)进行Dvpp解码我想将解码后的视频转换到opencv保存出来,请问应该如何转换呢?
-
【功能模块】在代码中利用opencv创建视频采集对象,【操作步骤&问题现象】1、在虚拟机和开发板均可ping通rtsp所在网段,开发板ip和rtsp处于同一网段,2、虚拟机可以用VLC正常打开网络相机的rtsp流,但是打开网络相机失败,并报错 [OPENCV][../../../../../modules/videoio/src/cap_images.cpp:253 icvExtractPattern][code:-5, msg:CAP_IMAGES: can't find starting number (in the name of file): rtsp://admin:root******] (***********是rtsp流地址,可以正常在虚拟机上VLC中显示)【截图信息】【日志信息】(可选,上传日志内容或者附件)
-
按老版本的(https://bbs.huaweicloud.com/forum/thread-30275-1-1.html)那样解压,不需要指定编译器所以不用-DCMAKE_TOOLCHAIN_FILE这句话,CMakeLists文件中,include_directories增加/opt/aarch64/opencv/include/opencv4/,link_directories增加/opt/aarch64/opencv/lib/就可以了。需要用的文件中#include <opencv2/opencv.hpp>,需要用哪个包含哪个就行,好像尖括号引号都行。亲测管用,欢迎指出问题或者有更简单的方法欢迎评论,相互学习
上滑加载中
推荐直播
-
DTT年度收官盛典:华为开发者空间大咖汇,共探云端开发创新
2025/01/08 周三 16:30-18:00
Yawei 华为云开发工具和效率首席专家 Edwin 华为开发者空间产品总监
数字化转型进程持续加速,驱动着技术革新发展,华为开发者空间如何巧妙整合鸿蒙、昇腾、鲲鹏等核心资源,打破平台间的壁垒,实现跨平台协同?在科技迅猛发展的今天,开发者们如何迅速把握机遇,实现高效、创新的技术突破?DTT 年度收官盛典,将与大家共同探索华为开发者空间的创新奥秘。
回顾中 -
GaussDB应用实战:手把手带你写SQL
2025/01/09 周四 16:00-18:00
Steven 华为云学堂技术讲师
本期直播将围绕数据库中常用的数据类型、数据库对象、系统函数及操作符等内容展开介绍,帮助初学者掌握SQL入门级的基础语法。同时在线手把手教你写好SQL。
回顾中 -
算子工具性能优化新特性演示——MatMulLeakyRelu性能调优实操
2025/01/10 周五 15:30-17:30
MindStudio布道师
算子工具性能优化新特性演示——MatMulLeakyRelu性能调优实操
即将直播
热门标签