随笔分类 -  代码

摘要:RGB转YcbCr色彩空间: %将一幅640*480的彩色图片转换成显示成灰度显示? clc; clear all; close all; RGB_data = imread('lena.jpg');%图像读入 R_data = RGB_data(:,:,1); G_data = RGB_data( 阅读全文
posted @ 2020-03-02 14:18 ostartech 阅读(1756) 评论(0) 推荐(0) 编辑
摘要:主要分为四步: 边缘检测 将边缘检测得到的边缘 以黑色的形式贴在原来的画上。 对贴了边缘的图进行双边滤波,双边滤波可以较好的滤波的同时保留边缘。 修改图像的颜色的饱和度,本文采用的是将RGB转化为HSI空间,然后调整S分量。 一、代码修改: 1、未定义标识符cvCanny,加头文件: #includ 阅读全文
posted @ 2019-12-25 18:50 ostartech 阅读(482) 评论(0) 推荐(0) 编辑
摘要:一、C中用数组存图像信息,下标索引: pbTag[y*newWidth+x] 二、MATLAB用img(m,n),图像下标从1开始。 Matlab的下标是可以多行多列同时引用的,而像C语言等一次只能引用一个。 A(2:3,3:-1:1)表示引用数组中的2~3行,3~1列对应的元素 A(:,end)表 阅读全文
posted @ 2019-09-10 02:17 ostartech 阅读(1042) 评论(0) 推荐(0) 编辑
摘要:文件夹内多张图合成为视频: 2、 将视频按帧分解为一张张图片: 【其他】 Matlab将图像帧合成视频 - 叶子结点的专栏 - CSDN博客 https://blog.csdn.net/rt5rte54654/article/details/39008431 阅读全文
posted @ 2019-07-23 16:54 ostartech 阅读(7078) 评论(0) 推荐(0) 编辑
摘要:逐渐放大的中心。(615,730)。 if( !(srcx>=xl && srcx<=xr && srcy>=yu && srcy<=yd)) 外圈设为:但是这样外圈的放大中心在图中间。需要将两个放大中心合在一起,而内圈和外圈图中心位置有偏差。 关键在于把偏差修正! srcx=(double)(1. 阅读全文
posted @ 2019-07-18 22:24 ostartech 阅读(196) 评论(0) 推荐(0) 编辑
摘要:方案已完全改为,预先生成图像pbFinal后,统计信息对范围内亮度进行修正平衡。 1、取w2=1,即不进行亮度平衡。 // Imagejoint.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "Imagejoint.h" #include 阅读全文
posted @ 2019-07-17 14:28 ostartech 阅读(336) 评论(0) 推荐(0) 编辑
摘要:11、目前的效果渐变已处理好。但是还存在亮度不平衡的缺点。 // Imagejoint.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "Imagejoint.h" #include <afxwin.h> #ifdef _DEBUG #def 阅读全文
posted @ 2019-07-12 20:44 ostartech 阅读(1305) 评论(0) 推荐(0) 编辑
摘要:6、对图像拼接边界进行过渡处理。向内收进去25像素的圈,两图各占50%。 // Imagejoint.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "Imagejoint.h" #include <afxwin.h> #ifdef _DEB 阅读全文
posted @ 2019-07-10 17:38 ostartech 阅读(439) 评论(0) 推荐(0) 编辑
摘要:1、记录:去掉中转图,直接以1280*1024进行反坐标计算。pbFinal=1280*1024。 // Imagejoint.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "Imagejoint.h" #include "math.h" 阅读全文
posted @ 2019-07-10 10:53 ostartech 阅读(236) 评论(0) 推荐(0) 编辑
摘要:1、原旋转中的 double phase[33]={0};//16相位,包含端点存在33个距离 for (int i=0;i<33;i++) { double i2=1.0*i; phase[i]=fs(i2/16); } int size; if(dbZoom>1) { size=iWidth*i 阅读全文
posted @ 2019-07-08 16:30 ostartech 阅读(689) 评论(0) 推荐(0) 编辑
摘要:// Imagejoint.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "Imagejoint.h" #include "math.h" #include <afxwin.h> #ifdef _DEBUG #define new DEBU 阅读全文
posted @ 2019-07-08 16:19 ostartech 阅读(135) 评论(0) 推荐(0) 编辑
摘要:// Imagejoint.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "Imagejoint.h" #include "math.h" #include #ifdef _DEBUG #define new DEBUG_NEW #endif #include //CImage类 #include // The one an... 阅读全文
posted @ 2019-07-08 10:57 ostartech 阅读(285) 评论(0) 推荐(0) 编辑
摘要:1、初版,边缘未处理。 2、去掉黑边 3、修改边缘位置信息,这个还可以。 4、继续改改试试 虽然凑到了344,但是有点右偏。 5、之后再放大到1280×1024。 阅读全文
posted @ 2019-07-05 19:49 ostartech 阅读(271) 评论(0) 推荐(0) 编辑
摘要:参数方程走一圈 2pi->0(--i) 代码目录下,文件夹video用来存bmp图像。后再生成视频。 转的角度: for t=-pi/2:pi/200:3/2*pi; 图片转成视频:(仅备份) 阅读全文
posted @ 2019-05-21 10:18 ostartech 阅读(327) 评论(0) 推荐(0) 编辑
摘要:加入边缘判定,<2则加2。 if (x_upleft<2) x_upleft=x_upleft+2; if (y_upleft<2) y_upleft=y_upleft+2; 阅读全文
posted @ 2019-04-09 11:18 ostartech 阅读(288) 评论(0) 推荐(0) 编辑
摘要:36*36 -2,-2扩展 代码有问题,有时能运行有时报错。 阅读全文
posted @ 2019-04-04 18:22 ostartech 阅读(223) 评论(0) 推荐(0) 编辑
摘要:HRESULT RotateZoom(PBYTE pbSrc,int iWidth,int iHeight,double dbRotate,double dbZoom,PBYTE pbTag) { //int phase[17]={0};//8相位,包含端点存在17个距离 //16 //for (int i=0;idrcx[i]) ... 阅读全文
posted @ 2019-04-04 16:00 ostartech 阅读(160) 评论(0) 推荐(0) 编辑
摘要:原来仅处理了Y通道,输出的灰度图像。 Super-Resolution/ESPCN at master · wangxuewen99/Super-Resolution · GitHub https://github.com/wangxuewen99/Super-Resolution/tree/mas 阅读全文
posted @ 2019-03-27 13:22 ostartech 阅读(541) 评论(0) 推荐(0) 编辑
摘要:混合方法 SSR.m matlab代码,本来是RGB,改成了处理灰度图像的。 效果不对,不知道哪有问题: 看灰度图的处理效果还可以。 【转载自】 图像增强算法四种,图示与源码,包括retinex(ssr、msr、msrcr)和一种混合算法 - onezeros的专栏 - CSDN博客 https:/ 阅读全文
posted @ 2019-02-18 19:34 ostartech 阅读(2122) 评论(0) 推荐(0) 编辑
摘要:%% 自己设置频域的滤波窗口 girl=imread('F:\Users\*****\Pictures\CGS_stripe1.bmp'); girl=rgb2gray(girl); girl=im2double(girl); subplot(1,2,1);imshow(girl);%显示原始图像 title('原始图像'); G=fft2(double(girl));% 二维傅里叶变换 G... 阅读全文
posted @ 2019-01-04 20:31 ostartech 阅读(4099) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示