自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

random_liu_2013

隔花荫,人远天涯近

  • 博客(62)
  • 资源 (5)
  • 收藏
  • 关注

原创 MFC简单计算器

最近开始学习MFC(vs2010),看了一段时间教程始终没有感觉,所以就想做一个实际的东西熟练一下。觉得初学MFC写个计算器吧,模拟一下微软的calc,其实很早就有这种想法啦,哈哈!言归正传吧!!这是最终的界面,也是一开始设计的界面;1.放置的控件有               Group Box----------1个EDIT----------------1个

2013-05-25 10:51:16 4239 2

原创 ov2640 svga 配置

delay(5ms);////clkrc//com2//reg04//com8////////arcom2//com19////////aew//aeb//vv////FL_L//com3////histo//histo//////href_st。

2023-11-08 15:18:44 140

原创 wxwidgets简单实例

使用wxwidgets编写一个界面,有两个按钮,两个文本框,点击按钮相应的文本框会显示那个按钮在点击,事件处理函数使用动态绑定。在上述代码中,我们创建了一个继承自wxFrame的MyFrame类,并在该类中添加了两个按钮和两个文本框。该示例演示了动态绑定按钮事件,并通过事件处理函数更新了相应的文本框。在主函数中,我们创建了MyApp类,并通过调用。​宏来启动应用程序,并展示MyFrame界面。​会根据按钮的点击事件分别更新对应的文本框。

2023-07-18 16:11:01 475

原创 wxWidgets 常用控件介绍

wxWidgets提供了丰富的跨平台控件库,可以用于构建各种图形用户界面(GUI)应用程序。除了上述常用的控件,wxWidgets还提供了其他许多控件和自定义控件。

2023-07-18 15:24:01 791

原创 wxWidgets 目录和文件操作

在wxWidgets中,有一些类和函数可用于进行目录操作和文件操作。wxStandardPaths:提供了一组函数来获取系统特定的标准目录路径。wxFileName:用于处理文件名和路径的类。wxTextFile:用于逐行读写文本文件的类。wxFile:用于读写文件的类。wxDir:用于处理目录的类。

2023-07-18 15:01:06 357

原创 wxString使用说明

wxWidgets 的字符串处理

2023-07-18 14:44:11 301

原创 wxWidgets 设置和查询注册表

wxwidgets 注册表相关

2023-02-28 16:33:42 362

原创 使用ceres solver 计算仿函数的雅克比

使用ceres solver的自动微分计算雅克比矩阵

2022-07-13 19:23:40 263

原创 (二)使用gtsam做多个旋转的平均

使用gtsam做多个旋转矩阵的平均

2022-03-08 16:03:37 658

原创 (一)使用gtsam做曲线拟合

使用gtsam做曲线拟合,简单的使用例子

2022-03-08 15:07:04 872 3

原创 usb hid 设备

win10 c++ usb hid

2022-02-21 15:03:13 235

原创 c++事件量封装,带等待超时功能

#pragma once#include <mutex>#include <condition_variable>#include <chrono>class CEvtVar { std::mutex m_mtex; bool m_flag; std::condition_variable m_condvar;public: CEvtVar(); ~CEvtVar(); int wait(int ms); ...

2022-01-25 16:39:40 535

原创 tensorflow2.x保存pb模型,用于opencv3.4.16 dnn模块调用

opencv dnn tensorflow2.x

2022-01-18 15:42:15 3568 1

原创 使用tinyxml2将gps经纬度转换为kml和gpx格式文件

一.gps数据存储在文本中,如下所示:每一行一个数据,数据使用逗号隔开,第一个为时间,第二个为经度,第三个维度,第四个为高度2.使用tinyxml2将文件转换为标准的gpx格式文件,转换之后的结果如下:代码如下:#include "../tinyxml2.h"#include <fstream>#include <string>;#include <vector>struct GPS_DATA { std::string.

2021-12-09 16:45:00 1948

原创 matlab 设计巴特沃茨滤波器,然后在c++中使用

一、用matlab设计巴特沃茨滤波器%1 低通fd = 10;%hz 截止频率fs = 167;%hz 采样频率wn = fd/(0.5*fs);%butter 第一个参数为阶数,下面使用的是一阶[a b]= butter(1,wn,'low')%2 高通fd = 10;%hz截止频率fs = 167;%hz采样频率wn = fd/(0.5*fs);[c d]= butter(1,wn,'high')%小测试t = 0:1/fs:1;x = cos(2*...

2021-07-23 10:32:39 553

原创 利用ceres solver对自定义函数 自动求导

#include <ceres/ceres.h>#include <ceres/jet.h>#include <Eigen/Eigen>struct costFunc { template <typename T> bool operator()(const T* const x, T* residuals) const { residuals[0] = T(3)* x[0]*x[0] + x[0]*T(5) ...

2021-05-10 11:12:33 648

原创 双目视觉误差与距离关系

clear;clc;B = 100;%mm,两个相机之间的距离,也叫基线fs = 6;%mm,相机的物理焦距ss = 4.8 ;%mm ,ccd芯片的块wid = 2048;%pix,相机的分辨率 宽pp = ss/widdd = 0.25;%pix,视差的精度,检测的精度f = fs/(pp);minZ = 1500;%离相机最近的距离maxZ = 2500;%theta = atan((wid/2)/f);fov = 2*theta *180/piminDepth = 0.5*

2021-03-30 17:09:04 2526 2

原创 Matlab2OpenCV

function Matlab2OpenCV( variable, fileName,varName, flag)% INPUTS:% variable: name of the current matrix% fileName: name of the output yaml file% flag: w for writing a new file, a for appending to the file% OUTPUTS:% ...

2021-03-30 14:41:33 143

转载 matlab umeyama

function [ R, t ] = umeyama( X, Y, plotResult )%UMEYAMA Corresponding point set registration with Umeyama method.%% [R, t] = umeyama(X, Y) returns the rotation matrix R and translation% vector t that approximate Y = R * X + t using least-squares esti.

2021-03-30 14:40:17 376

原创 如何使用图片的exif信息计算相机焦距

1.通过35mm等效焦距来计算:图像的exif信息可以从图像的属性中获取,例如下图中,可以看出35mm等效焦距为35mm, 根据35mm胶片的尺寸为36mmx24mm,那么相机的焦距为(像素单位焦距) F = 2832 * 35 / 36 =2753.33 pixel 2.根据ccd尺寸计算焦距,根据相机型号KODAK Z612 查询http://www.dpreview.com/得知,此款相机的ccd尺寸为5.75mm,那么根据 F = 2832 * 6/5.75可以计算...

2020-12-25 19:13:03 3555 2

原创 最短路径 floyd

//#include "sparselevmarq.h"#include <iostream>#include <cstdio>int main(int argc, char **argv){ if (1) { auto printA = [](int a[4][4]) { for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++...

2020-06-28 10:00:29 162

原创 光斑亚像素处理

#pragma once#include <Eigen/Eigen>typedef unsigned char uchar;#include <opencv2/opencv.hpp>class SubPixCenter{ int m_iN = -1; Eigen::VectorXf m_Vector_A; Eigen::MatrixXf m_matrix_B; bool InitData(cv::Mat& roi, const d...

2020-05-28 18:49:19 253

原创 点云学习1

#实现PCA分析和法向量计算,并加载数据集中的文件进行验证importopen3daso3dimportosimportnumpyasnpfrompyntcloudimportPyntClouddefmake_line_pcd(dv,meanData):'''定义三角形的点云:return:...

2020-04-21 15:29:19 1592 5

原创 opencv解码yolov2

#include <opencv2/opencv.hpp>#include <iostream>float anchor[] = { 0.469385, 0.710431,0.920628, 1.367715,1.274924, 1.906141,1.845246, 2.771376,2.994701, 4.442390 };int N_anchors =...

2020-04-20 14:28:37 241

原创 c++ hid usb 开发接口

https://github.com/signal11/hidapi

2020-03-25 15:26:25 1352

原创 eskf imu arhs

clear;clc;%rng(100);addpath(genpath(pwd));load_param;global params;dt = params.dt;[imudata,visdata] = vio_data_gen();l_imu = length(imudata);eskf.q = [1;0;0;0];eskf.bg=[0;0;0];eskf.g=[0;0;9...

2020-01-08 19:29:03 343

原创 allan 方差

clear;clc;rawdata = load('imulog_0.txt');t0 =6047*0.001*0.001;%rawdata = load('D:\\project\\cpp\\course2_hw_new\\vio_data_simulation\\build/imudata.txt');t0 = 1.0/200;N_sample = size(rawdata,1);...

2019-12-14 09:59:42 1210

原创 多线程 c++ 环形队列

#ifndef RING_BUFFER_H#define RING_BUFFER_H#include <mutex>template<typename T, int N>class RingBuf{public: RingBuf(); ~RingBuf(); bool get(T& a); bool put(T a...

2019-12-09 17:37:34 596

原创 WiringPi on ROS

https://answers.ros.org/question/221046/can-i-use-wiringpi-on-ros-indigo/

2019-11-29 12:13:51 481

原创 python web开发

##!/usr/bin/env python3# -*- coding:utf-8 -*-from bottle import get,post,run,request,template,routeimport bottleimport osimport timeimport sys#### 定义Car类class Car(object): def __in...

2019-11-14 13:55:15 250

原创 计算点坐标

clear;clc;x1 = [100,0,0];x2 = [45, 75,0];x3 = [45,-75,0];x4 = [0,0,50];th = 5;data=[];Ns=1000;for i=1:Ns l23 = norm(x3-x2)+th*(2*rand-1); l12 = norm(x1-x2)+th*(2*rand-1); l13 = no...

2019-10-23 14:12:53 292

原创 g2o helper

#pragma once#include <g2o/core/sparse_optimizer.h>#include <g2o/types/slam3d/types_slam3d.h>#include <Eigen/eigen>#include "KeyFrame.h";#include "MapPoint.h"#include "Measureme...

2019-09-26 19:01:31 229

原创 循环缓冲区c++

template<typename T,int N>class RingBuf{public: RingBuf() : capSize(N){ first = last = 0; size = 0; } ~RingBuf() { } bool get(T& a) { if (is...

2019-08-30 13:45:51 290

原创 getTime()

string getTime() { system_clock::time_point tp = system_clock::now(); time_t raw_time = system_clock::to_time_t(tp); struct tm *timeinfo = std::localtime(&raw_time); std::string...

2019-08-22 17:44:28 891

原创 基于boost的最短路径和最小生成树

#pragma once#include <iostream>#include <utility>#include <vector>typedef struct { int v1,v2; int w;}EdgeEx;int shortest_path(const std::vector< EdgeEx>& ed...

2019-08-21 16:06:05 531

原创 matlab 串口读写

%读取clear;clc;Ports = instrhwinfo('serial');lenP = length(Ports.SerialPorts);Ports.SerialPortsif(lenP<=1) fprintf('error: no serialPort found'); return;endif(lenP<3) fprintf('...

2019-08-15 14:08:25 781

原创 协程

#ifndef STDEX_COROUTINE_H_#define STDEX_COROUTINE_H_#ifndef STACK_LIMIT#define STACK_LIMIT (1024*1024)#endif#include <cstdint>#include <cstring>#include <cstdio>#include &l...

2019-08-08 10:29:48 116

原创 dtw_EXAMPLE

#include "dtw.h"// this just generates some random arrayvector<double> getrandomwalk(uint size) { vector<double> data(size); data[0] = 0.0; for (uint k = 1; k < size; ++...

2019-08-01 16:57:37 131

原创 dtw

/*** (c) Daniel Lemire, 2008*This C++ library implements fast nearest-neighbor retrieval under the dynamic time warping (DTW).* This library includes the dynamic programming solution, a fast imple...

2019-08-01 16:56:49 186

原创 linux中使用g++ 编译 使用 opencv

g++ 编译调用opencv函数的c++程序时, 可以使用如下 makefilemainapp: main.o g++ -o mainapp main.o -lopencv_core -lopencv_highguimain.o: main.cpp g++ -c main.cppclean: rm -rf main main.o...

2019-06-01 23:34:39 858

opencv通过相机名字访问相机

用于opencv 的相机接口,可以通过名字访问相机以及编号

2019-02-20

c++邮件发送

c++邮件发送开源包,提供接口,可以用于快速开发网络程序

2019-01-11

发送邮件c++程序

win端 c++发送邮件程序,智能在windows上运行,欢迎下载使用

2018-12-12

fastMatch的c++实现(需要opencv支持)

本程序实现了fastmathc, 使用c++和opecnv实现,参考了原作者的matlab程序

2014-11-02

ASM主动形状模型

自己写的主动形状模型,主要使用c++实现的,依赖opencv的开源图像库

2013-10-06

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除