首页 > 其他 > 详细

matlab 判断是否存在某文件夹,若不存在,新建一个文件夹

时间:2015-12-31 12:23:08      阅读:1113      评论:0      收藏:0      [点我收藏+]
1. 判断是否存在指定的video_name, 若不存在,则在给定save_path下,新建一个video_name文件夹:

1 sec_path = [save_path, video_name, ‘/‘]; 2 if ~exist(sec_path,‘file‘) 3 mkdir([save_path, video_name]); 4 end

2. 将gpuArray转换为matlab可以保存的格式,如:uint8 等。
if you save the gpuArray data directly, it will warning you some errors like this:

技术分享

and translate it into numeric or logical is necessary...

    % gpuArray to matlab format, person_image is the gpuArray and first translate it into
single format using "gather" function which is the matlab inside function.

    person_image = im2uint8(gather(person_image));



 

matlab 判断是否存在某文件夹,若不存在,新建一个文件夹

原文:http://www.cnblogs.com/wangxiaocvpr/p/5091030.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!