Ubuntu安装不同版本的opencv,并任意切换使用
参考:
opencv笔记:ubuntu安装opencv以及多版本共存 | 高深远的博客
https://zhuanlan.zhihu.com/p/604658181
安装不同版本opencv及共存、切换并验证。_pkg-config opencv --modversion-CSDN博客
Ubuntu下多版本OpenCV共存和切换_ubuntu20如同时安装opencv4.5和4.2以及版本的切换-CSDN博客
ubuntu下安装多版本的opencv并且切换使用_ubuntu下可以存在多个版本的opencv马-CSDN博客
参考官方:
OpenCV: Installation in Linux
主要参考:
在WSL-Ubuntu20.04下,安装OpenCV-3过程以及遇到的问题和相应的解决办法 - LesPlumes - 博客园
我是wsl2-ubuntu18.04,安装ros后已有opencv3.2.0,现在要再装opencv3.3.1
一.下载和安装依赖包
1、首先更新 apt-get,在安装前最好先更新一下系统,不然有可能会安装失败。在终端输入:
sudo apt-get update
sudo apt-get upgrade
2、接着安装官方给的opencv依赖包,在终端输入:
sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
下面的步骤我做了:
错误:E: 无法定位软件包 libjasper-dev
sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt update
sudo apt install libjasper1 libjasper-dev
二.下载源文件
下载opencv-3.3.1,以及opencv_contrib-3.3.1。
opencv-3.3.1可以到官网或者github上去下载源文件(官网版本选择在下方翻页,github上通过tag选择)。
wget -q https://github.com/opencv/opencv/archive/3.3.1.zip
解压源文件并进入
unzip opencv-3.3.1.zip
cd opencv-3.3.1/
(opencv_contrib下载连接:GitHub - opencv/opencv_contrib: Repository for OpenCV's extra modules)
将opencv_contrib-3.3.1文件夹放入opencv-3.3.1文件夹内(我这里的opencv_contrib-3.3.1改名为opencv_contrib)。
三.安装
1.编译前的准备工作
①在进行cmake之前,将“Opencv3缺失文件”这个文件夹中的所有.i文件都复制到
opencv3_contrib\modules\xfeatures2d\src\
这个目录下。
(百度网盘:https://pan.baidu.com/s/15QlHwu5ur2vc6ncyVS4e_Q 提取码:sysu)
②在进行make之前,将以下路径:
opencv-3.3.1\opencv_contrib\modules\xfeatures2d\include\opencv2\
的xfeatures2d文件夹和xfeatures2d.hpp都copy到
opencv-3.3.1\build\opencv2\
路径下。
(opencv_contrib下载连接:https://github.com/opencv/opencv_contrib)
sudo mv opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d build/opencv2
sudo mv opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d.hpp build/opencv2
③在进行make之前,下载nvida_sdk(链接:https://pan.baidu.com/s/1IykEbf7SZgf2IE0T52_bqA 提取码:sysu)
然后把下载下来的Video_Codec_Interface_12.1.14\Video_Codec_Interface_12.1.14\Interface\
目录下的三个文件,
都复制到opencv-3.3.1/modules/cudacodec/src/
下;
再依次打开以下文件:
precomp.hpp、video_decoder.hpp、cuvid_video_source.hpp、
frame_queue.hpp、video_parser.hpp
将 #if CUDA_VERSION >= 9000
修改为 #if CUDA_VERSION >= 9000 && CUDA_VERSION < 10000
sudo mv /home/leaf1804/Video_Codec_Interface_12.1.14/Interface/cuviddec.h /home/leaf1804/opencv-3.3.1/modules/cudacodec/srcsudo mv /home/leaf1804/Video_Codec_Interface_12.1.14/Interface/nvcuvid.h /home/leaf1804/opencv-3.3.1/modules/cudacodec/srcsudo mv /home/leaf1804/Video_Codec_Interface_12.1.14/Interface/nvEncodeAPI.h /home/leaf1804/opencv-3.3.1/modules/cudacodec/src
④在进行make之前,打开opencv-3.3.1\modules\videoio\src\ cap_ffmpeg_impl.hpp
,添加以下宏定义:
#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)
#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
#define AVFMT_RAWPICTURE 0x0020
2.编译opencv
cd opencv-3.3.1
mkdir build && cd build
sudo cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/home/leaf1804/software/opencv3.3.1 -D CUDA_NVCC_FLAGS="-D_FORCE_INLINES" -D BUILD_opencv_cudacodec=OFF -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ..sudo make -j6
sudo make install
报错1:
运行sudo make -j6的时候报错:
[ 46%] Building NVCC (Device) object modules/cudabgsegm/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_mog2.cu.o /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(203): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(203): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(203): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(203): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(203): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(203): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(203): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(203): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(203): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(203): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(205): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(205): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(205): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(205): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(205): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(205): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(205): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(205): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(205): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /home/leaf1804/opencv-3.3.1/modules/core/include/opencv2/core/cuda/vec_math.hpp(205): error: calling a constexpr __host__ function("abs") from a __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. 20 errors detected in the compilation of "/tmp/tmpxft_00006fcc_00000000-13_mog2.compute_70.cpp1.ii". CMake Error at cuda_compile_generated_mog2.cu.o.cmake:264 (message): Error generating file /home/leaf1804/opencv-3.3.1/build/modules/cudabgsegm/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_mog2.cu.o modules/cudabgsegm/CMakeFiles/opencv_cudabgsegm.dir/build.make:89: recipe for target 'modules/cudabgsegm/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_mog2.cu.o' failed make[2]: *** [modules/cudabgsegm/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_mog2.cu.o] Error 1 CMakeFiles/Makefile2:7100: recipe for target 'modules/cudabgsegm/CMakeFiles/opencv_cudabgsegm.dir/all' failed make[1]: *** [modules/cudabgsegm/CMakeFiles/opencv_cudabgsegm.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 46%] Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_sum.cu.o [ 46%] Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_threshold.cu.o /home/leaf1804/opencv-3.3.1/modules/cudaarithm/src/cuda/sub_mat.cu(78): warning: function "<unnamed>::SubOp2::operator()" was declared but never referenced /home/leaf1804/opencv-3.3.1/modules/cudaarithm/src/cuda/sub_mat.cu(97): warning: function "<unnamed>::SubOp4::operator()" was declared but never referenced Scanning dependencies of target opencv_cudaarithm [ 46%] Building CXX object modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/arithm.cpp.o [ 46%] Building CXX object modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/element_operations.cpp.o [ 47%] Building CXX object modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/reductions.cpp.o [ 47%] Building CXX object modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/core.cpp.o cc1plus: warning: /home/leaf1804/opencv-3.3.1/build/modules/cudaarithm/precomp.hpp.gch/opencv_cudaarithm_Release.gch: not used because
OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
cc1plus: warning: /home/leaf1804/opencv-3.3.1/build/modules/cudaarithm/precomp.hpp.gch/opencv_cudaarithm_Release.gch: not used becauseOPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
cc1plus: warning: /home/leaf1804/opencv-3.3.1/build/modules/cudaarithm/precomp.hpp.gch/opencv_cudaarithm_Release.gch: not used becauseOPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
cc1plus: warning: /home/leaf1804/opencv-3.3.1/build/modules/cudaarithm/precomp.hpp.gch/opencv_cudaarithm_Release.gch: not used becauseOPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 47%] Linking CXX shared library ../../lib/libopencv_cudaarithm.so [ 47%] Built target opencv_cudaarithm Makefile:181: recipe for target 'all' failed make: *** [all] Error 2
然后修改cmake命令后重新从cmake那一步开始再运行一遍
成功了!!
然后运行sudo make install
成功!!
报错后,可以清理并重新配置
在尝试修复之前,可以确保清理 build
目录以避免遗留问题:
cd /home/leaf/opencv-3.3.1/build
rm -rf *
我还删除过一次opencv-3.3.1和opencv_contrib
文件夹,从头开始再来过一次
四.切换不同版本opencv
打开bashrc文件(~/.bashrc)主目录下 gedit ~/.bashrc
,并加入
# # opencv-3.3.1
# export PKG_CONFIG_PATH=~/software/opencv3.3.1/lib/pkgconfig
# export LD_LIBRARY_PATH=~/software/opencv3.3.1/lib#OpenCV 3.2.0
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export LD_LIBRARY_PATH=/usr/local/lib
用那个取消注释另一个,可以使用
pkg-config --modversion opencv
进行验证。
source ~/.bashrc
pkg-config --modversion opencv# 查看详细的路径:
pkg-config --cflags --libs opencv
使用多版本opencv
在写CmakeList.txt,如果只有一个版本的opencv,我们一般直接使用
FIND_PACKAGE(OpenCV REQUIRED)
如果现在要使用的是默认安装的opencv3.2.0,则使用使用上面的指令就足够了。
如果现在要使用的是我们自己指定路径的opencv-3.3.1,则在上面指令前面加上如下指令:
set(OpenCV_DIR "/home/wh/opencv4/lib/cmake/opencv4"):引号里面的地址是OpencvConfig.cmake地址
OpenCVConfig.cmake 是 OpenCV 库的 配置文件。它是用来告诉项目如何使用 OpenCV 库的。它包含了 OpenCV 库的路径信息、版本信息和链接信息等。当项目使用 find_package(OpenCV) 命令时,CMake 就会去寻找这个文件,并读取其中的信息,最终使项目可以使用 OpenCV 库。
比如我的就要在原来的cmakelist.txt里面加上一句
set(OpenCV_DIR "/home/leaf1804/software/opencv3.3.1/share/OpenCV"),因为我的OpencvConfig.cmake地址是这里
相关文章:

Ubuntu安装不同版本的opencv,并任意切换使用
参考: opencv笔记:ubuntu安装opencv以及多版本共存 | 高深远的博客 https://zhuanlan.zhihu.com/p/604658181 安装不同版本opencv及共存、切换并验证。_pkg-config opencv --modversion-CSDN博客 Ubuntu下多版本OpenCV共存和切换_ubuntu20如同时安装o…...

突破内存限制:Mac Mini M2 服务器化实践指南
本篇文章,我们聊聊如何使用 Mac Mini M2 来实现比上篇文章性价比更高的内存服务器使用,分享背后的一些小的思考。 希望对有类似需求的你有帮助。 写在前面 在上文《ThinkPad Redis:构建亿级数据毫秒级查询的平民方案》中,我们…...

【排版教程】Word、WPS 分节符(奇数页等) 自动变成 分节符(下一页) 解决办法
毕业设计排版时,一般要求每章节的起始页为奇数页,空白页不显示页眉和页脚。具体做法如下: 1 Word 在一个章节的内容完成后,在【布局】中,点击【分隔符】,然后选择【奇数页】 这样在下一章节开始的时&…...

【在Linux世界中追寻伟大的One Piece】多线程(二)
目录 1 -> 分离线程 2 -> Linux线程互斥 2.1 -> 进程线程间的互斥相关背景概念 2.2 -> 互斥量mutex 2.3 -> 互斥量的接口 2.4 -> 互斥量实现原理探究 3 -> 可重入VS线程安全 3.1 -> 概念 3.2 -> 常见的线程不安全的情况 3.3 -> 常见的…...

flink学习(8)——窗口函数
增量聚合函数 ——指窗口每进入一条数据就计算一次 例如:要计算数字之和,进去一个12 计算结果为20, 再进入一个7 ——结果为27 reduce aggregate(aggregateFunction) package com.bigdata.day04;public class _04_agg函数 {public static …...

「实战应用」如何用图表控件LightningChart .NET实现散点图?(一)
LightningChart .NET完全由GPU加速,并且性能经过优化,可用于实时显示海量数据-超过10亿个数据点。 LightningChart包括广泛的2D,高级3D,Polar,Smith,3D饼/甜甜圈,地理地图和GIS图表以及适用于科…...

鸿蒙Native使用Demo
DevecoStudio使用Native 今天,给大家带来的是关于DevecoStudio中使用Native进行开发 个人拙见:为什么要使用Native?无论是JS还是TS在复杂的情况下运行速度,肯定不如直接操作内存的C/C的运行速度快,所以,会选择使用Native;这里面的过程是什么?通过映射转化,使用napi提供的接口…...

29.UE5蓝图的网络通讯,多人自定义事件,变量同步
3-9 蓝图的网络通讯、多人自定义事件、变量同步_哔哩哔哩_bilibili 目录 1.网络通讯 1.1玩家Pawn之间的同步 1.2事件同步 1.3UI同步 1.4组播 1.5变量同步 1.网络通讯 1.1玩家Pawn之间的同步 创建一个第三人称项目 将网络模式更改为监听服务器,即将房主作为…...

Scala—列表(可变ListBuffer、不可变List)用法详解
Scala集合概述-链接 大家可以点击上方链接,先对Scala的集合有一个整体的概念🤣🤣🤣 在 Scala 中,列表(List)分为不可变列表(List)和可变列表(ListBuffer&…...

【论文复现】偏标记学习+图像分类
📝个人主页🌹:Eternity._ 🌹🌹期待您的关注 🌹🌹 ❀ 偏标记学习图像分类 概述算法原理核心逻辑效果演示使用方式参考文献 概述 本文复现论文 Progressive Identification of True Labels for Pa…...

C嘎嘎探索篇:栈与队列的交响:C++中的结构艺术
C嘎嘎探索篇:栈与队列的交响:C中的结构艺术 前言: 小编在之前刚完成了C中栈和队列(stack和queue)的讲解,忘记的小伙伴可以去我上一篇文章看一眼的,今天小编将会带领大家吹奏栈和队列的交响&am…...

AIGC-----AIGC在虚拟现实中的应用前景
AIGC在虚拟现实中的应用前景 引言 随着人工智能生成内容(AIGC)的快速发展,虚拟现实(VR)技术的应用也迎来了新的契机。AIGC与VR的结合为创造沉浸式体验带来了全新的可能性,这种组合不仅极大地降低了VR内容的…...

Django 路由层
1. 路由基础概念 URLconf (URL 配置):Django 的路由系统是基于 urls.py 文件定义的。路径匹配:通过模式匹配 URL,并将请求传递给对应的视图处理函数。命名路由:每个路由可以定义一个名称,用于反向解析。 2. 基本路由配…...

《硬件架构的艺术》笔记(八):消抖技术
简介 在电子设备中两个金属触点随着触点的断开闭合便产生了多个信号,这就是抖动。 消抖是用来确保每一次断开或闭合触点时只有一个信号起作用的硬件设备或软件。(就是每次断开闭合只对应一个操作)。 抖动在某些模拟和逻辑电路中可能产生问…...

Spring 与 Spring MVC 与 Spring Boot三者之间的区别与联系
一.什么是Spring?它解决了什么问题? 1.1什么是Spring? Spring,一般指代的是Spring Framework 它是一个开源的应用程序框架,提供了一个简易的开发方式,通过这种开发方式,将避免那些可能致使代码…...

【算法】连通块问题(C/C++)
目录 连通块问题 解决思路 步骤: 初始化: DFS函数: 复杂度分析 代码实现(C) 题目链接:2060. 奶牛选美 - AcWing题库 解题思路: AC代码: 题目链接:687. 扫雷 -…...

如何选择黑白相机和彩色相机
我们在选择成像解决方案时黑白相机很容易被忽略,因为许多新相机提供鲜艳的颜色,鲜明的对比度和改进的弱光性能。然而,有许多应用,选择黑白相机将是更好的选择,因为他们产生更清晰的图像,更好的分辨率&#…...

Rust 力扣 - 740. 删除并获得点数
文章目录 题目描述题解思路题解代码题目链接 题目描述 题解思路 首先对于这题我们如果将所有点数装入一个切片f中,该切片f中的i号下标表示所有点数为i的点数之和 那么这题就转换成了打家劫舍这道题,也就是求选择了切片中某个下标的元素后,该…...

OpenCV从入门到精通实战(七)——探索图像处理:自定义滤波与OpenCV卷积核
本文主要介绍如何使用Python和OpenCV库通过卷积操作来应用不同的图像滤波效果。主要分为几个步骤:图像的读取与处理、自定义卷积函数的实现、不同卷积核的应用,以及结果的展示。 卷积 在图像处理中,卷积是一种重要的操作,它通过…...

Docker核心概念总结
本文只是对 Docker 的概念做了较为详细的介绍,并不涉及一些像 Docker 环境的安装以及 Docker 的一些常见操作和命令。 容器介绍 Docker 是世界领先的软件容器平台,所以想要搞懂 Docker 的概念我们必须先从容器开始说起。 什么是容器? 先来看看容器较为…...
浏览器访问 AWS ECS 上部署的 Docker 容器(监听 80 端口)
✅ 一、ECS 服务配置 Dockerfile 确保监听 80 端口 EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]或 EXPOSE 80 CMD ["python3", "-m", "http.server", "80"]任务定义(Task Definition&…...
Python爬虫实战:研究feedparser库相关技术
1. 引言 1.1 研究背景与意义 在当今信息爆炸的时代,互联网上存在着海量的信息资源。RSS(Really Simple Syndication)作为一种标准化的信息聚合技术,被广泛用于网站内容的发布和订阅。通过 RSS,用户可以方便地获取网站更新的内容,而无需频繁访问各个网站。 然而,互联网…...

【大模型RAG】Docker 一键部署 Milvus 完整攻略
本文概要 Milvus 2.5 Stand-alone 版可通过 Docker 在几分钟内完成安装;只需暴露 19530(gRPC)与 9091(HTTP/WebUI)两个端口,即可让本地电脑通过 PyMilvus 或浏览器访问远程 Linux 服务器上的 Milvus。下面…...

【CSS position 属性】static、relative、fixed、absolute 、sticky详细介绍,多层嵌套定位示例
文章目录 ★ position 的五种类型及基本用法 ★ 一、position 属性概述 二、position 的五种类型详解(初学者版) 1. static(默认值) 2. relative(相对定位) 3. absolute(绝对定位) 4. fixed(固定定位) 5. sticky(粘性定位) 三、定位元素的层级关系(z-i…...

视频行为标注工具BehaviLabel(源码+使用介绍+Windows.Exe版本)
前言: 最近在做行为检测相关的模型,用的是时空图卷积网络(STGCN),但原有kinetic-400数据集数据质量较低,需要进行细粒度的标注,同时粗略搜了下已有开源工具基本都集中于图像分割这块,…...
NPOI Excel用OLE对象的形式插入文件附件以及插入图片
static void Main(string[] args) {XlsWithObjData();Console.WriteLine("输出完成"); }static void XlsWithObjData() {// 创建工作簿和单元格,只有HSSFWorkbook,XSSFWorkbook不可以HSSFWorkbook workbook new HSSFWorkbook();HSSFSheet sheet (HSSFSheet)workboo…...

DBLP数据库是什么?
DBLP(Digital Bibliography & Library Project)Computer Science Bibliography是全球著名的计算机科学出版物的开放书目数据库。DBLP所收录的期刊和会议论文质量较高,数据库文献更新速度很快,很好地反映了国际计算机科学学术研…...
redis和redission的区别
Redis 和 Redisson 是两个密切相关但又本质不同的技术,它们扮演着完全不同的角色: Redis: 内存数据库/数据结构存储 本质: 它是一个开源的、高性能的、基于内存的 键值存储数据库。它也可以将数据持久化到磁盘。 核心功能: 提供丰…...
用鸿蒙HarmonyOS5实现中国象棋小游戏的过程
下面是一个基于鸿蒙OS (HarmonyOS) 的中国象棋小游戏的实现代码。这个实现使用Java语言和鸿蒙的Ability框架。 1. 项目结构 /src/main/java/com/example/chinesechess/├── MainAbilitySlice.java // 主界面逻辑├── ChessView.java // 游戏视图和逻辑├──…...

《信号与系统》第 6 章 信号与系统的时域和频域特性
目录 6.0 引言 6.1 傅里叶变换的模和相位表示 6.2 线性时不变系统频率响应的模和相位表示 6.2.1 线性与非线性相位 6.2.2 群时延 6.2.3 对数模和相位图 6.3 理想频率选择性滤波器的时域特性 6.4 非理想滤波器的时域和频域特性讨论 6.5 一阶与二阶连续时间系统 6.5.1 …...