ubuntu18.04依赖于OpenCV3.4.10/4.6.0版本的两种cv_bridge使用

ubuntu下opencv的安装与简单调用 ubuntu下opencv的安装与简单调用----小白级别 内有调用图片时 浮点数例外的解决 方案 阅读详情

前言

ROS原装的cv_bridge位于/opt/ros/melodic/include/cv_bridge。它依赖于OpenCV 3.2

在当前ROS包中为了使用基于新的OpenCV 3.4.10的cv_bridge,网上有博客说修改原来cv_bridge的链接库到自己的新的OpenCV,其实我也试过。但可能会导致其他基于cv_bridge的ros工具不可用。此处不建议


正文

导言

建议下载cv_bridge源码
如果使用OpenCV 3.4.10进行编译,则cv_bridge需要下载melodic版本
但是如果使用的是OpenCV 4.6.0,则cv_bridge需要下载noetic版本,此处经验凡是基于OpenCV 4.6.0的ros包估计都得是下载noetic版本的。

步骤一: 下载源码

cd ~/tools_ws/src
# opencv3.4.10 
git clone -b melodic https://github.com/ros-perception/vision_opencv.git
ubuntu搭建opencv运行环境 在ubuntu 20.04中源码安装opencv3.4.16 阅读详情

相关推荐

Nvidia TX2 安装 opencv3.2.0 及在ros melodic下配置opencv3.2.0

Nvidia TX2 安装 opencv3.2.0 及在ros melodic下配置opencv3.2.0 继完成一系列环境配置后,准备开始用tx2进行rtabslam。但由于刷完机的板子自带的4.1.1的opencv版本,所以我们需要安装opencv3.2.0终于结束了安装,那我们如何去让ros引用,ros下自带的是opencv4.1.1 安装结束了,并不代表就能用上,我们必须去让ros使用,而我们也没有卸载opencv4 故,我们需要将ros与opencv3.2.0连接起来

prophet_xh的博客 5897

ROS报错:ROS-Melodic中cv_bridge报错

ROS报错:ROS-Melodic中cv_bridge报错

wzfafabga的博客 3181

【Ubuntu18.04调用Python3的cv_bridge应用于ROS】

很多小伙伴使用ROS会发现ROS很多功能是基于python2进行编译的,这导致ROS想用python3调用cv_bridge时发现报错,因为ROS默认调用了python2的cv_bridge。这篇文章就是帮助各位小伙伴如何在ROS中调用python3的cv_bridge,希望对你有帮助。

coder-kimbell的博客 797

Ubuntu系统安装OpenCV详细操作及具体应用

OpenCV是一个广泛使用的开源计算机视觉库,它提供了许多用于图像处理和计算机视觉任务的函数和工具。本文将详细介绍在Ubuntu系统上安装OpenCV的操作步骤,并提供相应的源代码示例。至此,你已经成功地在Ubuntu系统上安装并配置了OpenCV。在上面的代码中,将"path_to_image.jpg"替换为你自己的图像文件路径。这将在当前用户的主目录下创建一个名为"opencv"的文件夹,并将OpenCV的源代码下载到该文件夹中。如果一切正常,你应该能够看到你选择的图像在一个新窗口中显示出来。

EiyMobile的博客 694

PPO算法详解:基于CartPole-v1的强化学习实现

PPO算法详解:基于CartPole-v1的强化学习实现

m0_54720701的博客 871

通过JLink下载实现工控MCU批量烧录实战案例

利用JLink下载工具实现高效稳定的工控MCU批量烧录,提升产线效率。案例详细解析了脚本配置与自动化流程,突出jlink下载的可靠性和可扩展性,适用于大规模嵌入式部署场景。

weixin_30205153的博客 819

BSW: Dcm模块配置--28服务

这个章节讲解下UDS中的28服务(Communcation Control)的配置,顾名思义,对当前ECU的通讯状态进行变更,主要设置应用报文,网络管理报文的收发控制,通常应用在刷写APP软件时,降低总线负载。这里首先要提醒的一点是,28服务几乎不需要手写代码,只有在客户需求要求前置条件不满足时报特定NRC时才需要填充代码。实际配置中主要涉及的模块有DCM,BSWM,ComM,RTE.2.BswM模块的配置。3.ComM模块的配置。1.DCM模块的配置。

Forever_Oct的博客 3092

用面包板实测MOSFET:手把手教你测量跨导和开关时间

本文详细介绍了如何使用面包板、Arduino和示波器搭建测试平台,实测MOSFET的跨导和开关时间。通过分步测量流程和示波器技巧,帮助电子设计初学者深入理解MOSFET的动态特性,包括跨导计算、开关时间参数解析以及米勒平台现象分析。

beer8的博客 233

地平线旭日X5开发板--搭建ROS1环境开发

由于RDK X5是基于Ubuntu22.04 进行版本释放,而ROS1只兼容到了20.04,为了更很好的做以前ROS1相关代码方案的快速迁移,提供了使用docker 的ros环境,进而使用ros1的方案。

bingdund的博客 1025

衍射光学元件(DOE):结构光3D感知的“编码器”与核心硬件基石

结构光3D传感技术中,衍射光学元件(DOE)是关键核心部件,它通过微纳结构对激光相位进行精密调制,将点光源编码为高对比度的结构光图案。DOE决定了系统的编码能力、能量效率和集成度,其制造涉及半导体级光刻、精密镀膜等高门槛工艺,目前全球仅少数企业具备量产能力。随着3D感知在消费电子、自动驾驶等领域的广泛应用,DOE作为结构光方案的基础硬件,其技术壁垒和战略价值日益凸显。

Fun_LiDAR的博客 258

基于STM32、HAL库的TPL0501数字电位器驱动程序设计

@param value 输出值(0-255)* @param hdev TPL0501句柄。* @param hdev TPL0501句柄。* @brief 获取TPL0501当前设置值。* @param hdev TPL0501句柄。* @brief 获取TPL0501当前设置值。* @brief 设置TPL0501输出值。* @brief 设置TPL0501输出值。* @return 当前值(0-255)* @brief 初始化TPL0501。* @brief 初始化TPL0501。

corlin6688的博客 1039

为YOLO11更换Backbone(一):轻量化之星GhostNet

摘要: 本文重点介绍了轻量化Backbone网络GhostNet及其在YOLO11中的应用。首先分析了Backbone网络在目标检测中的重要性,指出其需平衡特征提取能力和计算效率的需求。然后详细解析了GhostNet的核心思想,包括其通过"幽灵模块"生成冗余特征的设计原理,该模块使用1×1卷积生成少量内在特征,再通过廉价线性变换生成更多幽灵特征,显著降低了计算量。GhostNet的创新设计使其在保持精度的同时大幅减少了参数和FLOPs,为YOLO11等目标检测模型提供了高效的轻量化解决方

本博客聚焦 YOLOv11 全流程落地,涵盖架构优化、数据集处理、训练技巧与多场景部署,兼及国产数据库、Java 开发与 AI 模型应用,内容兼顾理论与工程实践,为开发者提供系统干货,助力高效提升技术能力。 1515

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain&#39;s apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath(&#39;DeepLearnToolbox&#39;));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand(&#39;state&#39;,0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = &#39;sigm&#39;;%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, &#39;Too big error&#39;);```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, &#39;Too big error&#39;);```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

上一篇: TP-Link网卡在ubuntu安装
下一篇: Gazebo 9 参考手册
boyhoodme
博客等级 码龄8年 89粉丝 87原创
评论 3
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值