返回顶部
首页 > 资讯 > 操作系统 >WSL Opencv with_ffmpeg conan1.60.0
  • 397
分享到

WSL Opencv with_ffmpeg conan1.60.0

opencvffmpeg 2023-08-30 14:08:51 397人浏览 安东尼
摘要

我是ubuntu18. self.options[“OpenCV”].with_FFmpeg = True 关键是GCc版本需要conan支持,比如我的是: compiler=gcc compiler.version=7.5 此外还需要安装

我是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-essentialsudo apt install ffmpeg --fix-missingsudo apt-get install pkg-configsudo 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 = None    def 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.fPIC        if self.settings.os == "Windows":            self.options["opencv"].with_ffmpeg = False        if self.settings.os == "linux":            # print("######################", self.options["opencv"].with_ffmpeg)            self.options["opencv"].with_ffmpeg = True            self.options["opencv"].shared = False            self.options["opencv"].contrib = False            self.options["opencv"].contrib_freetype = False            self.options["opencv"].with_gtk = False    def build(self):        cmake = self._configure_cmake()        cmake.build()        cmake.install()    def _configure_cmake(self):        if self._cmake:            return self._cmake        self._cmake = CMake(self)        # 判断arch是否为armv7、x86        if self.settings.arch == "armv7" or self.settings.arch == "x86":            self._cmake.definitions["USE_32BIT"] = True        self._cmake.configure()        return self._cmake

conan profile

[settings]os=Linuxos_build=Linuxarch=x86_64arch_build=x86_64compiler=gcccompiler.version=7.5compiler.libcxx=libstdc++11build_type=Release[options][build_requires][env]

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

来源地址:https://blog.csdn.net/x1131230123/article/details/132567254

--结束END--

本文标题: WSL Opencv with_ffmpeg conan1.60.0

本文链接: https://lsjlt.com/news/383057.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
  • WSL Opencv with_ffmpeg conan1.60.0
    我是ubuntu18. self.options[“opencv”].with_ffmpeg = True 关键是gcc版本需要conan支持,比如我的是: compiler=gcc compiler.version=7.5 此外还需要安装...
    99+
    2023-08-30
    opencv ffmpeg
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作