matlab 相关代码记录

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));



 

转载于:https://www.cnblogs.com/wangxiaocvpr/p/5091030.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值