我是靠谱客的博主 清秀小蝴蝶,这篇文章主要介绍matlab 写文件 %116,dlmwrite读取文件出错,现在分享给大家,希望可以做个参考。

function feaOfBB = getBBFeat(savepath,i,medFeatMat,location,blockHeight,blockWidth,step)

% blockproc的函数句柄

if ~isdir(savepath)

mkdir(savepath);

end

[h,w,~] = size(medFeatMat);

medFeaOfBB = medFeatMat(location(1):(location(1)+blockHeight-1),location(2):(location(2)+blockWidth-1),:);

feaOfBB = [location(1),location(2), blockHeight,blockWidth,histAndVectOfBb(medFeaOfBB)];

dlmwrite([savepath 'person_' num2str(i,'%04d') '.txt'],feaOfBB,'-append');

if location(1)+blockHeight+step-1 <= h

medFeaOfBB2 = medFeatMat(location(1)+step:(location(1)+blockHeight+step-1),location(2):(location(2)+blockWidth-1),:);

feaOfBB2 = [location(1)+step,location(2),blockHeight,blockWidth,histAndVectOfBb(medFeaOfBB2)];

dlmwrite([savepath 'person_' num2str(i,'%04d') '.txt'],feaOfBB2,'-append');

end

if location(2)+blockWidth+step-1 <= w

medFeaOfBB3 = medFeatMat(location(1):(location(1)+blockHeight-1),location(2)+step:(location(2)+blockWidth+step-1),:);

feaOfBB3 = [location(1),location(2)+step,blockHeight,blockWidth,histAndVectOfBb(medFeaOfBB3)];

dlmwrite([savepath 'person_' num2str(i,'%04d') '.txt'],feaOfBB3,'-append');

end

if ( location(1)+blockHeight+step-1<=h ) && ( location(2)+blockWidth+step-1<=w )

medFeaOfBB4 = medFeatMat(location(1)+step:(location(1)+blockHeight+step-1),location(2)+step:(location(2)+blockWidth+step-1),:);

feaOfBB4 = [location(1)+step,location(2)+step,blockHeight,blockWidth,histAndVectOfBb(medFeaOfBB4)];

dlmwrite([savepath 'person_' num2str(i,'%04d') '.txt'],feaOfBB4,'-append');

end

end

最后

以上就是清秀小蝴蝶最近收集整理的关于matlab 写文件 %116,dlmwrite读取文件出错的全部内容,更多相关matlab内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(38)

评论列表共有 0 条评论

立即
投稿
返回
顶部