自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(39)
  • 收藏
  • 关注

原创 基于 GAN的MNIST 手写字体生成

GAN, 手写字体

2023-03-04 08:10:43 429 2

原创 首次使用git 的配置步骤

一:首先下载Git 客户端;二:设置用户名和邮箱: git config --global user.name "xxx" git config --global user.email "xxxx" , git pull 发现没有认证。三:生成公钥和私钥:在git bash 中输入: ssh-keygen, 一直回车, 生成文件在C:\Users\Admini...

2020-04-26 17:45:44 607

原创 win10 在不同窗口下设置不同默认输入法(程序员必备)

不知道有没有和我有相似经历的程序员,就是总会因为在code 里不小心使用了中文符号或者某些配置文件、路径中使用了中文字符,而导致项目不work。所以,一个好的习惯就是, 在需要英文输入法环境的我们设置英文输入法,这样一个小小的技巧可以避免不必要的麻烦。具体操作如下:设置,选择时间和语言:左侧选项卡中选择区域和语言, 在最右侧有相关设置,选择其他日期、时间和区域设置:在新跳出...

2020-04-26 14:48:49 6468 1

原创 opencv 从本地读取视频和文件夹下图片

读取视频 VideoCapture m_cap; VideoWriter videoWriter; m_cap.open("...//1.mp4"); int32_t m_totalFrames = static_cast<int32_t>(m_cap.get(CV_CAP_PROP_FRAME_COUNT)); //total num vi...

2019-12-10 10:38:32 473

原创 图像颜色空间转换--RGB to Lαβ

Lαβ 空间是作者在文章《color transfer between images》中于2001年提出来的,该空间相比于RGB空间的优点是三通道相关性很小,缺点是计算量稍大,RGB转到Lαβ 空间是一个非线性的过程,具体Lαβ的介绍以及公式这里就不详细说了,网上一大堆,这里贴出这两个空间的相互转换公式:void cvtRGB2Lαβ(float_t* pDstL, float_t* pDs...

2019-12-10 10:18:28 1499

转载 双边 滤波器的C++实现,彩色三通道(转载+修改)

int getDiffFactor(const unsigned char* color1, const unsigned char* color2){ int final_diff = 0; for (int i = 0; i < 3; i++) { final_diff += abs(color1[i] - color2[i]); } final_diff = (fi...

2019-08-02 22:56:50 305

原创 conda 安装各类包的方法

conda info --envs//列出所有环境activate xxx//切换到xxx环境conda create --name xxx//新建环境conda info -envisconda remove -n flowers --allconda create -n flowers --clone snowflakesconda install -c menpo o...

2019-07-25 22:04:52 2004

原创 ACE(自适应对比对增强)的分析与改进

该方法的基本思想是将图像分成两部分:低频和高频两部分,增强高频部分,再合成。达到锐度增强的效果。一般在Y通道进行。局部低频部分:lowFre = blur(srcY, r)//局部滤波局部高频部分:highFre = srcY -lowFre局部标准差: localStd^2 =blur(highFre*highFre, r)全局均值和标准差:Gmean自适应高频增强因子...

2019-07-23 07:55:52 2170 2

原创 基于相似性的空域去燥

void spatialWeightingDeNoise(unsigned char* dst, unsigned char* src, int width, int height, int srcStride, int dstStride, int radius){ int offsetAddr = radius * dstStride + radius; int boxLength ...

2019-07-21 21:53:23 110

原创 时域去燥的简单尝试

//test #include "deNoise.h"#define TMP_SIZE 5#define MAX_SAD_THRESH 3int main(){ VideoCapture capture; if (!capture.isOpened()) { int width = 1920; int height = 1080; int ...

2019-07-20 23:13:30 177

原创 rgb格式转换

void cvtColorBgrC2RgbP(unsigned char* dst, unsigned char* src, int width, int height){ int picSize = width * height; unsigned char* dstC0 = dst; unsigned char* dstC1 = dst + picSize; unsigned ch...

2019-07-11 07:57:51 811 1

原创 numpy-dictionary

d ={'peter': 'handsome', 'shutong':'cute'}#key:valueprint('peter' in d)#is in ?print(d['peter'])#下标访问内容d['1']='11'print(d['1'])print(d['shutong'])del d['1']print('1' in d)f = {'person':2, 'd...

2019-05-21 22:04:31 337

原创 python-numpy-quickSort

def quickSort(arr): if len(arr) < 1: return arr pivot = arr[len(arr)//2] left = [x for x in arr if x < pivot] middle = [x for x in arr if x == pivot] right = [x fo...

2019-05-19 16:20:16 281

原创 c-灰度图彩色化

void Test_fakeColorDis(uint8_t *gray, uint8_t* dstColor, int32_t dstWidth, int32_t dstHeight, int32_t dstStride){ for (int32_t h = 0, i = 0; h &lt; dstHeight; h++) { for (int32_t w =...

2019-03-14 15:15:37 467

原创 图像交叉格式和平坦格式互相转换(cross->planar, planar->cross)

#include "imghead.h"#include &lt;conio.h&gt;template &lt;typename T&gt;void img_Cross2Planar(T *src, T *dst, int width, int height);template &lt;typename T&gt;void img_Planar2Cross(T *src, T *d...

2019-03-14 00:29:04 411

原创 SSE2 小记-1

整数加法:paddb/w/d/q浮点型加法:paddpd,paddsd,两者的差别是后者只改变低64位,高64位不变,如下:饱和型加法:paddsb/w,

2019-03-02 22:25:55 198

原创 opencv显示一块内存,单通道和三通道cross

void TestShowGrayImage(uint8_t* data, int32_t width, int32_t height, int32_t stride, const String fileName, const String winName){ Mat img(height, wi...

2019-03-02 22:10:23 121

原创 sse2 指令解析

pxor zero, zero neg strideD自己跟自己异或,相当于清零,NEG取反操作;lea pSrcRow, [pSrc]这个就是讲pSrc的地址给pSrcRow,此时pSrcRow和pSrc具有不同的名字但是指向同一个内存;mov pSrcRow, pSrc这个相当于把pSrc的内容复制一...

2019-01-09 14:13:29 2297

原创 c 语言优化问题-内存写耗时测试

void calRowSum(uint32_t *pDst, intptr_t strideD, int32_t width, int32_t height){ for (int32_t w = 0; w &lt; width; w++) { uint32_t *pDstTmp = &amp;pDst[w]; for (int32_t h = 0; h &lt; height; h...

2019-01-07 17:31:12 690

转载 积分图sse2优化

void GetGrayIntegralImage(unsigned char *Src, int *Integral, int Width, int Height, int Stride){ memset(Integral, 0, (Width + 1) * sizeof(int)); // 第一行都为0 int BlockSize = 8, Bl...

2018-12-27 16:52:55 386

原创 图像的随机填充

template &lt;typename T&gt;void Test_SetVal(T*pSrc, int32_t iSize, int32_t type){ switch(type) { case ZERO_VAL: { memset(pSrc, 0, iSize * sizeof(T)); br...

2018-12-25 09:10:35 519

原创 CNN-图像卷积c++实现-Day 2

 class img_u8_t{public: img_u8_t(s32 w, s32 h, s32 s); ~img_u8_t(); void initBuf(); void unBuf(); void getParam(s32&amp; w, s32&amp; h, s32 s); void setData(u8* d, s32 bufSize){ memcpy(dat...

2018-12-22 12:14:34 1436

原创 CNN-卷积核的可视化c++实现-Day 1

头文件包含内容(部分):typedef unsigned char u8;typedef signed char s8;typedef unsigned int u32;typedef int s32;typedef float f32;typedef struct{ u8* data; s32 width; s32 height...

2018-12-18 23:52:27 574

原创 视频的时空域去噪

时域去噪看上一篇文章,https://blog.csdn.net/myzhouwang/article/details/84708599,为了进一步去噪,考虑从空域进行!根据hekaiming的GuidedFilter在灰度图上的滤波思想:平坦区域取均值,方差大的地方取自身,于是写了一下空域去噪代码:void spannarDeNoise(Mat srcMat, Mat &amp;dst...

2018-12-04 21:47:43 1382

原创 视频的时域去噪

bool imgProcess::deNoiseTem(Mat src, Mat &dst){ temImg.push_back(src); dst = src.clone(); if (temImg.size() < 2) { return false; } else { int dstHeight = dst.rows; int dst...

2018-12-02 13:11:03 2641 1

转载 opencv 积分图源码(自己看,学习)

#if CV_SSE2template &lt;&gt;struct Integral_SIMD&lt;uchar, int, double&gt;{ Integral_SIMD() { haveSSE2 = checkHardwareSupport(CV_CPU_SSE2); } bool operator()(const uchar ...

2018-11-29 23:15:09 684

原创 加法SSE2的实现与C版本的时间对比

#include&lt;iostream&gt;#include&lt;emmintrin.h&gt;#include&lt;time.h&gt;#include&lt;Windows.h&gt;using namespace std;void interAddSimd(const unsigned char* p1, const unsigned char* p2, unsign...

2018-11-29 23:06:26 216

原创 图像格式转换-cross-plannar

/**************************************************************************************************//* func: change the cross to the plannar format/*************************************************...

2018-11-09 10:24:24 345

原创 python-三维数据显示2

from mpl_toolkits.mplot3d import Axes3Dimport matplotlib.pyplot as pltimport pandas as pdimport numpy as npfrom scipy.optimize import curve_fitfrom sklearn.decomposition import PCAfrom sklearn...

2018-11-09 10:11:39 1299

原创 python-三维数据显示

# -*- coding: utf-8 -*-"""Created on Tue Aug 21 10:07:20 2018@author: zhoubo"""from mpl_toolkits.mplot3d import Axes3Dimport matplotlib.pyplot as pltimport pandas as pdimport numpy as npfro...

2018-11-09 10:08:37 7988

原创 python-直方图

from mpl_toolkits.mplot3d import Axes3Dimport matplotlib.pyplot as pltimport pandas as pdimport numpy as npfrom scipy.optimize import curve_fitfrom sklearn.decomposition import PCAfrom sklearn....

2018-11-09 09:55:39 614

原创 opencv显示一块内存,单通道和三通道cross

void TestShowGrayImage(uint8_t* data, int32_t width, int32_t height, int32_t stride, const String fileName, const String winName){ Mat img(height, w...

2018-11-09 09:51:19 314

原创 c++ 程序计时

#include&lt;time.h&gt;LARGE_INTEGER timeStart; LARGE_INTEGER timeEnd; LARGE_INTEGER frequency;double quadpart; QueryPerformanceFrequency(&amp;frequency);quadpart = (double)frequenc...

2018-11-08 14:42:12 665

原创 c++随机数生成

包含头文件#include&lt;ctime&gt;,利用srand()产生随机种子:srand((unsigned)time(NULL));利用rand()函数产生[0-a)的随机数#define random(x) (rand()%x)定义产生在[-x,x]之间浮动的值,x为浮点数:zfloat_t randomDif(zfloat_t x, int32_t...

2018-11-06 16:35:05 1445

原创 c++ 写数据到csv

std::ofstream rgbData; rgbData.open("C:\\Users\\xxx\\Desktop\\data\\rgbData.csv",std::ios::out | std::ios::trunc); char title[10] = {"RGB"}; rgbData &lt;&lt; title[0] &lt;&lt; "," &l...

2018-09-10 13:15:42 2402

原创 二次曲面的拟合-椭球曲面拟合

void pbgGetCoeMatrxSur(zdouble_t coeMatrix[DN][DN], zdouble_t rowVector[DN], global_Trimap* pRgn){ std::vector&lt;int32_t&gt;fgR; std::vector&lt;int32_t&gt;fgG; std::vector&lt;int32_t&g...

2018-09-10 13:15:12 2721

转载 c++ 矩阵求逆

//矩阵乘法void pbgMatricMul(zdouble_t C[DN * DN], double A[DN * DN],double B[DN * DN]){ for (int32_t i = 0; i &lt; DN; i++) { for (int32_t j = 0; j &lt; DN; j++) { f...

2018-09-07 15:29:27 5374

原创 基于二值距离变换的图像细化的代码实现

二值图像的细化是指将二值图像的拓扑结构计算出来,基于拓扑结构的特征提取及其他处理,计算量将得到大大降低。图像细化的算法很多,这里贴出本人的个人的一些想法,即利用二值图像的距离变换图来得到二值图像的拓扑结构。二值图像的距离变换是指计算二值图像中非零像素点到最近的零像素点的距离,距离的定义很多,这里直接调用opencv里的开源函数:distanceTransform();该函数一共有四个参数,具体参考...

2018-04-07 16:08:31 1772

原创 基于K-means的彩色图像聚类之代码实现

K-means 用于聚类,原理很简单,就是将样本按照一定的“距离”,聚类成K个类,聚类过程是一个迭代的过程,即每次都重新计算类中样本的均值作为新的聚类中心。原理很简单,有很多博客写得比较详细,我这里就略过,在此只贴代码和结果。#include"K-means.h"/******************************************************************...

2018-04-05 17:30:11 7966 2

空空如也

空空如也

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

TA关注的人

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