
c/c++
文章平均质量分 70
hjwang1
让Robot走入社会、融入生活,方便人与人、人与物、物与物之间的沟通,丰富人们的生活
======
人工智能是分主观与客观的,是硬币的两个方面
客观智能是世界的本质描述,是物理的是数学的
主观智能是来自于客观智能,是哲学的是宗教的
如果抛开物理与数学只去讲方法是绝对走不远的
而单讲物理与数学只会得到一个静默缤纷的世界
展开
-
误差状态卡尔曼滤波(error-state Kalman Filter),扩展卡尔曼滤波,实现GPS+IMU融合,EKF ESKF GPS+IMU
如果你初学卡尔曼滤波器,千万不要在公式推导和理解上花费太多的精力,这将会得不偿失,根据我的学习经验,想直接从卡尔曼的公式推到上去理解用法是比较难的,但是先不管原因,边应用边学习,将会是一个非常正确的做法,对于理解卡尔曼滤波器将会事半功倍!红色的GPS的测量数据,蓝色是轨迹的真值,绿色是融合之后的轨迹,可以看到融合了imu之后的轨迹,相比于只有GPS的情况提升了很多,甚至与真实值都非常接近了。在这篇博客中,我将会向你解释GPS融合IMU的扩展卡尔曼的推导过程,并且还会提供完整的源代码和数据。...转载 2022-08-07 18:54:08 · 3723 阅读 · 0 评论 -
linux c++ 利用timerfd和epoll封装计时器(Timer)类
ref:linux c++ 利用timerfd和epoll封装计时器(Timer)类_sumkee911‘s coding-优快云博客程序简介:1.把timerfd和epoll的功能封装成一个类,timerfd负责创建计时器,而epoll负责等待timer超时,然后调用用户设定得回调函数。2.至于timerfd的基本功能不明白,就参考这位大神的技术文章:blog.youkuaiyun.com/chgaowei/article/details/212958113.至于epoll的基本功能不明白,就参考这转载 2021-09-20 09:31:12 · 1023 阅读 · 0 评论 -
__DATE__ __TIME__
ref:__DATE__ __TIME___GKoSon的博客-优快云博客#include <stdio.h> //注意,是双下划线,而不是单下划线 无需额外头文件//__FILE__ 包含当前程序文件名的字符串 //__LINE__ 表示当前行号的整数 //__DATE__ 包含当前日期的字符串 //__STDC__ 如果编译器遵循ANSI C标准,它就是个非零值 //__TIME__ 包含当前时间的字符串 //__FUNCTION__执行函数int main转载 2021-09-20 08:52:40 · 519 阅读 · 0 评论 -
使用imu_utils工具生成IMU的Allan方差标定曲线
ref:https://blog.youkuaiyun.com/u011392872/article/details/957874861.首先,安装ceres依赖项,然后下载编译安装ceresgit clone https://github.com/ceres-solver/ceres-solvercd ceresmkdir buildcd buildcmake ..makesudo make install2.下载code_utils并编译cd ~/catkin_ws/srcgit转载 2021-06-02 21:06:26 · 879 阅读 · 0 评论 -
传感器数据融合及姿态估计总结
ref:https://blog.youkuaiyun.com/moumde/article/details/111391642author: moumde本文主要介绍汇总了利用陀螺仪、加速度计和磁力计进行数据融合并由此实现姿态估算的一些方法,主要包括传感器直接结算、陀螺仪积分、互补滤波、Mahony滤波和EKF方法,每一部分的内容都是笔者moumde亲自推导并且利用MATLAB编写代码实现过的,可以保证一定的准确性。在最后面笔者也都会附上自己参考的一些比较好的文章或者博客地址供大家学习,用来对传感器姿态估计入转载 2021-04-27 18:14:57 · 2481 阅读 · 2 评论 -
四元数AHRS姿态解算和IMU姿态解算分析
ref:https://blog.youkuaiyun.com/xiaoxie613520/article/details/78227170AHRS是自动航向基准系统(Automatic Heading Reference System)的简称。目前,使用四元数来进行AHRS姿态解算的算法被广泛采用于四轴飞行器上。该算法源自英国Bristol大学的Ph.D Sebastian Madgwick,他在2009年开发并发布了该算法。下面我们来对该算法的代码进行详细分析。我们首先来看IMU部分。IMU是惯性测量装置(转载 2021-04-25 15:02:19 · 2207 阅读 · 0 评论 -
C++实现简单的反射——根据字符串创建类对象
ref:https://segmentfault.com/a/1190000021595164最近项目需求中需要一个关键功能——根据字符串创建了类对象。由于C++没有类似Java、C#这类动态语言中的反射机制,所以在C++程序中一般用if...else...或者switch来将字符串或者枚举值与类对象的创建方法来进行对应的映射。这里如果我们实现一个简单的反射机制,可以根据字符串创建了类对象就可以简化这个过程,而且无论对修改还是扩展都会更加方便。 理想的使用方式就是我们需要这个功能的类统一继承于一个Ob翻译 2021-04-14 19:37:14 · 1810 阅读 · 0 评论 -
dlopen、dlsym和dlclose的使用和举例
ref:https://blog.youkuaiyun.com/ostar_liang/article/details/14422423之前用过这三个函数一直没时间整理一下。今天抽时间整理一下。1、函数简介dlopen基本定义功能:打开一个动态链接库包含头文件:#include <dlfcn.h>函数定义:void * dlopen( const char * pathname, int mode );函数描述:在dlopen的()函数以指定模式打开指定的动态连接库文件,并返转载 2021-04-14 19:28:22 · 1175 阅读 · 0 评论 -
YUV数据格式转换&align
ref:https://blog.youkuaiyun.com/u010842019/article/details/52086103 第一幅是Y分量描述黑白图像第二幅是U(V)分量描述第三幅是V(U)分量描述第四幅是YUV三幅合成后得到的正常图像1. YUV简介YUV是一种颜色编码方法,它和我们熟知的RGB红绿蓝颜色体系相对应,它们之间能通过公式相互转换。而YUV区别于RGB的重要一点是采用YUV色彩空间亮度信号Y和色度信号U、V是分离的,这样就使得亮度Y...转载 2021-04-01 18:05:30 · 1728 阅读 · 0 评论 -
ffmpeg pixel format
ref:https://blog.youkuaiyun.com/fanbird2008/article/details/8481552const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { [AV_PIX_FMT_YUV420P] = { .name = "yuv420p", .nb_components = 3, .log2_chroma_w = 1, .log2转载 2021-04-01 17:05:01 · 1252 阅读 · 0 评论 -
undefined symbol问题的查找定位与解决方法
ref:https://blog.youkuaiyun.com/buknow/article/details/96130049这块可以通过ldd -r命令查看生成的so是否存在符号未定义的内容。ImportError: /home/os/catkin_ws/devel/lib/libaslam_cameras_april.so: undefined symbol: _ZN2cv6imshowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_1原创 2021-03-05 11:28:54 · 11819 阅读 · 5 评论 -
ubuntu18.04安装ROS Melodic详细配置
ref:https://blog.youkuaiyun.com/qq_41450811/article/details/99079041https://www.jianshu.com/p/e6ea653147cbhttps://blog.youkuaiyun.com/shao918516/article/details/103384095设置软件源:国外的:sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) m原创 2021-03-03 10:57:13 · 905 阅读 · 4 评论 -
OpenCV中的findContours函数参数详解
ref:https://blog.youkuaiyun.com/dcrmg/article/details/51987348注: 这篇文章用的OpenCV版本是2.4.10, 3以上的OpenCV版本相关函数可能有改动Opencv中通过使用findContours函数,简单几个的步骤就可以检测出物体的轮廓,很方便。这些准备继续探讨一下findContours方法中各参数的含义及用法,比如要求只检测最外层轮廓该怎么办?contours里边的数据结构是怎样的?hierarchy到底是什么鬼?Po..转载 2021-01-26 12:09:59 · 4547 阅读 · 1 评论 -
opencv截取图像中某一区域的方法:通过Rect
ref:https://blog.youkuaiyun.com/weixin_41770169/article/details/87345224Mat图像存储:Mat image= imread(image);Rect rect(10, 20, 100, 50);Mat image_roi = image(rect);Rect介绍:https://blog.youkuaiyun.com/kh1445291129/article/details/51149849//如果创建一个Rect对象rect(100转载 2021-01-26 10:06:51 · 6041 阅读 · 0 评论 -
两个凸多边形交集
ref:【算法】求两个凸多边形的交集的面积http://9801.me/?p=3502【计算几何】多边形交集https://www.cnblogs.com/dwdxdy/p/3232110.html求多边形(Convex Hull)交集的 MATLAB 实现https://ridiqulous.com/find-the-intersection-of-convex-hull-using-matlab/c++ 多边形求交集代码(凸多边形与凸多边形交集)https://liumi原创 2021-01-20 00:42:40 · 1581 阅读 · 0 评论 -
OpenGL glcolor3f画图的颜色设置为什么不生效
如果在光照下希望模型的颜色可以起作用,需要启动颜色材料模式:glEnable( GL_COLOR_MATERIAL );然后还需要设置材料属shu性:glLightModeli( GL_FRONT, GL_AMBIENT_AND_DIFFUSE );// 这个表示模型的正面接受环境光和散射光,你可以修改这两个参数void init ( void ){ GLfloat mat_specular [ ] = { 1.0, 1.0, 1.0, 1.0 }; GLfloat mat_s原创 2021-01-18 14:19:16 · 2653 阅读 · 0 评论 -
OpenCV 透视变换cv::getPerspectiveTransform()与cv::warpPerspective()详解
ref:https://blog.youkuaiyun.com/guduruyu/article/details/72518340透视变换(Perspective Transformation)是将成像投影到一个新的视平面(Viewing Plane),也称作投影映射(Projective Mapping)。如图1,通过透视变换ABC变换到A'B'C'。图1 透视变换示意图透视变换的通用公式为:变换后的坐标x,y分别为:。展开之后即:其中,称为透视变换矩阵:表示线性变换,如scali转载 2021-01-13 14:14:46 · 1475 阅读 · 1 评论 -
OpenCV 文字绘制cv::putText详解
ref:https://blog.youkuaiyun.com/guduruyu/article/details/68491211https://blog.youkuaiyun.com/keith_bb/article/details/53366674opencv中除了提供绘制各种图形的函数外,还提供了一个特殊的绘制函数——在图像上绘制文字。这个函数即是cv::putText()。具体形式如下: void cv::putText( cv::Mat& img, // 待绘制的图像 const str转载 2021-01-11 17:15:56 · 18588 阅读 · 0 评论 -
使用 FFmpeg 将YUV数据编码为视频文件
ref:https://www.cnblogs.com/renhui/p/10504851.html本文中实现的一个小功能是把一个YUV原始视频数据(时间序列图像)经过h264编码为视频码流,然后在使用mp4封装格式封装。编码&封装的流程图如下:使用ffmpeg编码流程:1、首先使用av_register_all()函数注册所有的编码器和复用器(理解为格式封装器)。该步骤必须放在所有ffmpeg代码前第一个执行2、avformat_alloc_output_context2(转载 2021-01-07 11:09:06 · 2663 阅读 · 0 评论 -
三角网格上高斯曲率和平均曲率
ref:https://www.cnblogs.com/eat-too-much/p/12595574.htmlhttps://computergraphics.stackexchange.com/questions/1718/what-is-the-simplest-way-to-compute-principal-curvature-for-a-mesh-triangle同学的优快云博客 https://blog.youkuaiyun.com/qq_38517015/article/details/10518转载 2020-12-05 02:01:56 · 2403 阅读 · 0 评论 -
最优传输映射
离散最优传输问题, for image color transfer, random matrices, GAN or WGAN, and deep learning.img from: 顾险峰 老顾谈几何顾老师把这个问题,讲得很通透原创 2020-11-11 19:03:28 · 720 阅读 · 1 评论 -
Adaptive Precision Floating-Point Arithmetic and Fast Robust Predicates for Computational Geometry
Many computational geometry applications use numerical tests known as the orientation and incircle tests. The orientation test determines whether a point lies to the left of, to the right of, or on a line or plane defined by other points. The incircle test原创 2020-10-26 18:23:26 · 403 阅读 · 1 评论 -
Combinatorial Maps and dart data struct
ref:https://doc.cgal.org/latest/Combinatorial_map/index.htmlAuthorGuillaume Damiand1 IntroductionA d-dimensional combinatorial map is a data structure representing an orientable subdivided d-dimensional object obtained by taking dD cells, and a.原创 2020-10-22 10:15:26 · 252 阅读 · 0 评论 -
扫描线算法求若干条线段的交点SegmentsIntersection
ref:https://github.com/johnhany/SegmentsIntersection/http://johnhany.net/2013/11/sweep-algorithm-for-segments-intersection/license: contact johnhany@163.com/* * Author: John Hany * Website: http://johnhany.net/ * Source code updates: https://git转载 2020-10-21 10:07:08 · 790 阅读 · 0 评论 -
fmpeg获取视频的总帧数
ref:https://blog.youkuaiyun.com/u010368556/article/details/102943897在ffmpeg中通常使用 ffprobe来获取视频流的总帧数;这种类型的任务是ffprobe擅长的。命令行:ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of default=nokey=1:noprint_wrappers=1 input.m转载 2020-10-20 10:43:20 · 7559 阅读 · 0 评论 -
Surface Reconstruction
Poisson Reconstructionref:http://www.cs.jhu.edu/~misha/Code/PoissonRecon/Version11.02/https://github.com/mkazhdan/PoissonReconThis code-base was born from the Poisson Surface Reconstruction code. It has evolved to support more general adaptive finite原创 2020-10-09 19:31:14 · 495 阅读 · 0 评论 -
Ubuntu18.04 安装Open3D C++与Python版本
ref:https://blog.youkuaiyun.com/zpwhust/article/details/106746669Open3D C++与Python 安装步骤python 版本的open3d安装起来比较容易可以直接使用pip或者conda命令.pippip install open3dcondaconda install -c open3d-admin open3d官网提供了丰富的python的接口教程, 希望使用python的朋友,可以参考官网Open3D ..转载 2020-09-30 20:12:58 · 3336 阅读 · 9 评论 -
atan2与atan的区别
ref:https://blog.youkuaiyun.com/zfjBIT/article/details/91385418对于tan(θ) =y/x: 当 (x,y) 在第一象限, 0 <θ<PI/2. 当(x,y)在第二象限PI/2 <θ≤PI. 当(x,y) 在第三象限, -PI<θ< -PI/2. 当(x,y)在第四象限, -PI/2 <θ< 0. 当点(x,y)在象限的边界也就...转载 2020-09-30 14:13:05 · 877 阅读 · 0 评论 -
Android 10 无法读取本地文件 FileNotFoundException: Permission denied 解决办法
在Mainfest Application中加入这一行android:requestLegacyExternalStorage="true"<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.videostab"> <uses-permission原创 2020-09-11 17:14:45 · 2970 阅读 · 2 评论 -
IMU数据积分获得当前位姿
ref:https://www.cnblogs.com/glxin/p/9851909.htmlhttps://blog.youkuaiyun.com/ktigerhero3/article/details/91361770https://github.com/HeYijia/vio_data_simulation/blob/master/src/imu.cpp从两帧IMU数据中获得当前位姿的预测思路非常简单,无非是求出当前时刻????与下一时刻????+1加速度的均值, 把它作为Δ????时间内的平均加速转载 2020-08-31 15:31:24 · 6411 阅读 · 0 评论 -
FFmpeg命令行实现两路/多路视频拼接 合并 合成 同时播放
ref:https://blog.youkuaiyun.com/a386115360/article/details/89465633首先放一个两路视频合并的例子ffmpeg -pix_fmt rgb24 -s 960x960 -i bag_level_7_renderSize_1_960x960_8bits_rgb24i.rgb -pix_fmt rgb24 -s 960x960 -i bag_level_7_renderSize_1_960x960_8bits_rgb24i.rgb -filter_com转载 2020-08-28 11:26:35 · 2738 阅读 · 0 评论 -
ubuntu opencl example
install opencl and clinfo may find platform & device#include <iostream>#include <string>#include <CL/opencl.h>std::string getPlatformName(const cl_platform_id pid){ size_t param_value_size; clGetPlatformInfo(pid, CL_PLA原创 2020-08-27 14:43:59 · 388 阅读 · 0 评论 -
Unreal Engine虚幻引擎 5
ref:http://next.poppur.com/Stylish/10596.htmlhttps://www.unrealengine.com/en-US/blog/a-first-look-at-unreal-engine-5Author:Alex发表时间2020-05-14 12:09:332012 年,Epic Games 首度展示了游戏引擎 Unreal Engine 4 的实机视频,该引擎强大的可塑性对游戏界的影响深远。而在 8 年后的今天,更先进的 Unreal Engine转载 2020-08-24 11:59:22 · 1575 阅读 · 0 评论 -
曲率、挠率的离散推广
ref:https://zhuanlan.zhihu.com/p/179438855Author:二圈妹曲率、挠率等概念的离散推广。在很多场景中我们会用到曲率、挠率。比如狄利克雷能量(Dirichlet Energy)是平滑界(smoothing)的常客:连续先硬插一点info,因为构建离散曲线,大部分时间都一段一段连起来,曲线的连续性,有 C(continuity) 和 G(geometry continuity)字母来代表, 如果一段一段之间的导数是到 n 阶都能匹配的,那么我们说它转载 2020-08-20 10:40:00 · 942 阅读 · 0 评论 -
Geometry Images
Xianfeng Gu Steven J. Gortler Hugues HoppeAbstractSurface geometry is often modeled with irregular triangle meshes.The process of remeshing refers to approximating such geometry using a mesh with (semi)-regular connectivity, which has advan-tages for .原创 2020-08-14 17:04:45 · 688 阅读 · 0 评论 -
Mesh Generation Methods and Softwares
ref:http://www.wias-berlin.de/people/si/http://www.wias-berlin.de/people/si/course/Hang Si(斯杭老师的杰作)Software Implementation: Detri2This lecture discusses a software implementation of 2d triangular mesh generator Detri2.image 1image 2imag原创 2020-08-14 10:43:49 · 507 阅读 · 0 评论 -
ceres solver cost_function_to_functor_test.cc
// Ceres Solver - A fast non-linear least squares minimizer// Copyright 2015 Google Inc. All rights reserved.// http://ceres-solver.org///// Redistribution and use in source and binary forms, with or without// modification, are permitted provided tha.原创 2020-08-12 12:20:06 · 474 阅读 · 0 评论 -
Ceres Tutotial
Ceres Tutotial(1) —— 编程应用基础https://blog.youkuaiyun.com/qq_23225073/article/details/103284382Ceres Tutotial(2) —— 最小二乘建模https://blog.youkuaiyun.com/qq_23225073/article/details/103284327重要的Referenceceres 官方 tutorial 文章中的代码参考1 install# install dependencies原创 2020-08-09 22:31:42 · 248 阅读 · 0 评论 -
Ceres中的LocalParameterization
QuaternionParameterization中表示四元数中四个量在内存中的存储顺序是[w, x, y, z],而Eigen内部四元数在内存中的存储顺序是[x, y, z, w],但是其构造顺序是[w, x, y, z](不要被这个假象给迷惑),所以就要使用另一种参数本地化类,即EigenQuaternionParameterization,下面就以QuaternionParameterization为例子说明,如下:class CERES_EXPORT QuaternionParameteri原创 2020-08-07 20:23:43 · 2528 阅读 · 0 评论 -
Ubuntu 18.04 CPU 安装 OpenCL
下载 OpenCl SDK https://software.intel.com/content/www/us/en/develop/tools/opencl-sdk/choose-download.html,选择linux平台,解压。sudo ./install.sh安装 clinfo$ clinfoNumber of platforms 1 Platform Name ...原创 2020-08-06 10:51:21 · 1773 阅读 · 1 评论