当前位置: 首页 > news >正文

WSL Opencv with_ffmpeg conan1.60.0

我是ubuntu18.

self.options[“opencv”].with_ffmpeg = True
关键是gcc版本需要conan支持,比如我的是:
compiler=gcc
compiler.version=7.5

此外还需要安装系统所需库:
https://qq742971636.blog.csdn.net/article/details/132559789

甚至来说,可以装一些系统编译好的,免得没有系统文件:

sudo apt-get install build-essential
sudo apt install ffmpeg --fix-missing
sudo apt-get install pkg-config
sudo apt install libopencv-dev

conanfile.py

from conans import ConanFile, CMakeclass PhotoTranslateConan(ConanFile):name = "video_deidentification"license = ""url = "https://gitlab.upuphone.com/ai-group/client/sdk/public/computer_vision/video_deidentification.git"description = "video_deidentification"topics = ("video_deidentification")settings = "os", "compiler", "build_type", "arch"options = {"shared": [True, False], "fPIC": [True, False]}default_options = {"shared": True, "fPIC": True}generators = "cmake", "virtualenv"_cmake = Nonedef requirements(self):self.requires("fmt/9.1.0") # spdlog需求self.requires("jsoncpp/1.9.5")self.requires("spdlog/1.11.0")self.requires("eigen/3.3.9")# self.requires("gtest/cci.20210126")# self.requires("boost/1.70.0")# self.requires("cpp-httplib/0.11.3")# self.requires("openssl/3.0.7")if self.settings.os != "Android":self.requires("opencv/4.5.5")def configure(self):if self.settings.os == "Windows":del self.options.fPICif self.settings.os == "Windows":self.options["opencv"].with_ffmpeg = Falseif self.settings.os == "Linux":# print("######################", self.options["opencv"].with_ffmpeg)self.options["opencv"].with_ffmpeg = Trueself.options["opencv"].shared = Falseself.options["opencv"].contrib = Falseself.options["opencv"].contrib_freetype = Falseself.options["opencv"].with_gtk = Falsedef build(self):cmake = self._configure_cmake()cmake.build()cmake.install()def _configure_cmake(self):if self._cmake:return self._cmakeself._cmake = CMake(self)# 判断arch是否为armv7、x86if self.settings.arch == "armv7" or self.settings.arch == "x86":self._cmake.definitions["USE_32BIT"] = Trueself._cmake.configure()return self._cmake

conan profile

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=7.5
compiler.libcxx=libstdc++11
build_type=Release
[options]
[build_requires]
[env]

编译完成:
在这里插入图片描述

http://www.lryc.cn/news/145420.html

相关文章:

  • Android中正确使用Handler的姿势
  • webSocket前后端交互pc端版
  • Java-day13(枚举与注解)
  • vue PDF或Word转换为HTML并保留原有样式
  • 华硕笔记本摄像头倒置怎么办?华硕笔记本摄像头上下颠倒怎么调整
  • 本地套接字通信
  • 数据结构(Java实现)-优先级队列(堆)
  • 算法通关村第8关【黄金】| 寻找祖先问题
  • 栈和队列(详解)
  • iOS开发Swift-3-UI与按钮Button-摇骰子App
  • 1、[春秋云镜]CVE-2022-32991
  • pdf如何删除其中一页?了解一下这几种删除方法
  • PO设计模式是selenium自动化测试中最佳的设计模式之一
  • yolov8使用C++推理的流程及注意事项
  • 深度思考计算机网络面经之二
  • 老年人跌倒智能识别算法 opencv
  • ros2官方文档(基于humble版本)学习笔记
  • 可拖动表格
  • C++语法基础
  • Windi CSS和Tailwind CSS以及UnoCSS
  • c++ opencv将彩色图像按连通域区分
  • 〖程序员的自我修养 - 认知剖析篇⑩〗- 学习编程的高效率方法
  • 前端基础1——HTML标记语言
  • 2.1: Dubbo的基本应用-负载均衡,集群容错,服务降级
  • 正则常见问题及解决方案
  • docker发布项目及使用外部文件的情况处理
  • CSS 中哪些属性可以继承
  • vue cli构建的项目出现 Uncaught runtime errors
  • 透过源码理解Flutter InheritedWidget
  • 天去面试的时候,遇到一个问题。我三个任务,ABC,我怎么让A执行完执行B,B执行完执行C 3个并行线程,如何解决。程池的核心运行原理和参数。