图像处理
奋斗的麻雀
专注图像视频算法研究、实现
展开
-
基于 GAN的MNIST 手写字体生成
GAN, 手写字体原创 2023-03-04 08:10:43 · 462 阅读 · 2 评论 -
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 · 495 阅读 · 0 评论 -
图像颜色空间转换--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 · 1527 阅读 · 0 评论 -
加法SSE2的实现与C版本的时间对比
#include<iostream>#include<emmintrin.h>#include<time.h>#include<Windows.h>using namespace std;void interAddSimd(const unsigned char* p1, const unsigned char* p2, unsign...原创 2018-11-29 23:06:26 · 231 阅读 · 0 评论 -
opencv 积分图源码(自己看,学习)
#if CV_SSE2template <>struct Integral_SIMD<uchar, int, double>{ Integral_SIMD() { haveSSE2 = checkHardwareSupport(CV_CPU_SSE2); } bool operator()(const uchar ...转载 2018-11-29 23:15:09 · 702 阅读 · 0 评论 -
视频的时空域去噪
时域去噪看上一篇文章,https://blog.csdn.net/myzhouwang/article/details/84708599,为了进一步去噪,考虑从空域进行!根据hekaiming的GuidedFilter在灰度图上的滤波思想:平坦区域取均值,方差大的地方取自身,于是写了一下空域去噪代码:void spannarDeNoise(Mat srcMat, Mat &dst...原创 2018-12-04 21:47:43 · 1408 阅读 · 0 评论 -
积分图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 · 401 阅读 · 0 评论 -
图像的随机填充
template <typename T>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 · 530 阅读 · 0 评论 -
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 · 136 阅读 · 0 评论 -
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 · 832 阅读 · 1 评论 -
时域去燥的简单尝试
//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 · 186 阅读 · 0 评论 -
c++ 程序计时
#include<time.h>LARGE_INTEGER timeStart; LARGE_INTEGER timeEnd; LARGE_INTEGER frequency;double quadpart; QueryPerformanceFrequency(&frequency);quadpart = (double)frequenc...原创 2018-11-08 14:42:12 · 681 阅读 · 0 评论 -
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 << title[0] << "," &l...原创 2018-09-10 13:15:42 · 2411 阅读 · 0 评论 -
二次曲面的拟合-椭球曲面拟合
void pbgGetCoeMatrxSur(zdouble_t coeMatrix[DN][DN], zdouble_t rowVector[DN], global_Trimap* pRgn){ std::vector<int32_t>fgR; std::vector<int32_t>fgG; std::vector<int32_t&g...原创 2018-09-10 13:15:12 · 2749 阅读 · 0 评论 -
c++ 矩阵求逆
//矩阵乘法void pbgMatricMul(zdouble_t C[DN * DN], double A[DN * DN],double B[DN * DN]){ for (int32_t i = 0; i < DN; i++) { for (int32_t j = 0; j < DN; j++) { f...转载 2018-09-07 15:29:27 · 5403 阅读 · 0 评论 -
c++随机数生成
包含头文件#include<ctime>,利用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 · 1460 阅读 · 0 评论 -
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 · 326 阅读 · 0 评论 -
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 · 638 阅读 · 0 评论 -
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 · 8009 阅读 · 0 评论 -
图像格式转换-cross-plannar
/**************************************************************************************************//* func: change the cross to the plannar format/*************************************************...原创 2018-11-09 10:24:24 · 356 阅读 · 0 评论