![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MATLAB代码
不做笔记的程序员不是好的码农
让我康康是谁不做笔记。
展开
-
1-主成分分析之ReadFace部分代码调试
输入:过程:输出:也是添加了处理维度方面的函数,然后调试就成功了function Training_Data = ReadFace(Training_Path)% ---------- Construct 2D matrix from all of the 1D image vectors in the training data file ------------flist = dir(strcat(Training_Path,'\*.jpg'));Training_Data =原创 2020-05-09 17:47:27 · 522 阅读 · 0 评论 -
0-调试代码的过程之主成分分析代码
输入:测试图像过程:哈哈,我一下子调出来了,可以暂时不用修改分析输出:识别图像clear allclose allclc% Training_Path = '../test/Gallery'; %Set your directory for training data file% Testing_Path = '../test/Probe'; %Set your directory for testing data fileTraining_Path = '../Trai.原创 2020-05-09 17:46:09 · 185 阅读 · 0 评论 -
6补充:matlab的imread函数用法
用imread函数读取图片就需要全路径,包括后缀名啦。这里是读出来的形式,转换后的黑白250*200 double类型注意哦,这里图像的尺寸是200*250(宽,高)的呢,Imread返回值是250*200*3,(行,列,RGB通道),unit8格式第一幅彩色图像是三通道,RGB,第二幅图像只有1个通道,是灰白的a=imread('E:\papers\Back_Proje...原创 2020-05-01 11:15:26 · 17987 阅读 · 1 评论 -
【Matlab】MATLAB进行批量重命名
先是批量重命名为数字1、2、3clc;clear all;files = dir('*.jpg');len=length(files);for i=1:len oldname=files(i).name; name=num2str(i); newname=strcat(name,'.jpg'); command = ['rename' 32 oldna...原创 2020-04-30 10:33:10 · 7325 阅读 · 1 评论