![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
分析代码
不做笔记的程序员不是好的码农
让我康康是谁不做笔记。
展开
-
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 all close all clc % Training_Path = '../test/Gallery'; %Set your directory for training data file % Testing_Path = '../test/Probe'; %Set your directory for testing data file Training_Path = '../Trai.原创 2020-05-09 17:46:09 · 187 阅读 · 0 评论 -
5.第四部分代码函数neighborSelect分析ing..
function [ candidates ] = neighborSelect(h,w,ntr,patchSize,step,R,height,width,NN,Patches,imp,ims,photo2sketch) if ntr < NN error('The number of nearest neighbors must be samller than the nu...原创 2020-04-29 09:55:35 · 229 阅读 · 0 评论 -
4.第三部分代码函数Get_patches分析
% 整体函数是实现把图像分为图像块后读取每个图像块的像素值并凭借起来 % im是读取的转变为灰度图像的测试照片的矩阵,b是图像块的长度,s是步长step function [Patches] = Get_patches( im,b,s ) %-------------------------------------------------...原创 2020-04-27 22:02:23 · 501 阅读 · 0 评论 -
3.第二部分函数代码分析trainingImageName
这个比较简单,分析如下: % path指路径,filelist指读取出来的文件的信息,p,s分别指训练集的照片集和素描集 function [imp ims] = trainingImageRead(pPath,sPath,filelist_p,filelist_s) if isempty(filelist_p) error(['No images de...原创 2020-04-27 21:27:13 · 110 阅读 · 0 评论 -
2.第一部分代码函数readImageName分析阅读ing...
上一部分是一个demo的分析,怕代码太多,造成混乱,在这里来分析里面涉及的的函数代码、 函数分析 readImageName函数的作用 % function to read the info of images into a list function filelist = readImageNames(srcpath) if exist('srcpath','var')~=1 ...原创 2020-04-27 11:14:09 · 474 阅读 · 0 评论 -
1.调试代码的过程ing
这是一个后处理的代码,可以实现把文件夹里的人脸照片批量变成生成素描,还会显示SSIM(也就是类似于生成素描和真实素描的相似度)的值,我希望把它调试成可以选择输入一张图片然后处理为生成素描,然后匹配真实数据库中的真实素描。这样一个动态的结果。 但是想法很行空,我遇到了一些问题,如下记录: 首先,我看不懂里面的代码,即使只是matlab,我现在的计划是慢慢调试, 先大概说一下我对这个代码的整体认...原创 2020-04-27 10:49:20 · 1001 阅读 · 0 评论