直播视频app源码,MATLAB指定路径保存图片方法
直播视频app源码,MATLAB指定路径保存图片实现的相关代码
imwrite()
```cpp function [] = saveimg(img,filename) path = input('Input the path you want to use: ','s'); %以input()作为输入路径的方式,'s'代表以字符串形式写入path path = append(path,filename); %filename中必须包含图片扩展名 imwrite(img,path); %此function中目标文件夹必须已存在,若要创建新文件夹,可以配合mkdir()函数实现 end ```
示例:
```cpp imag = imread('myPicture.jpg'); for i=1:10 filename = append('Img_',num2str(i),'jpg'); %引入i以实现编号 saveimg(imag,filename); end %output: Input the path you want to use: F:\PictureDownload\ %图片被保存到了F:\PictureDownload\Img_1.jpg ```
以上就是直播视频app源码,MATLAB指定路径保存图片实现的相关代码, 更多内容欢迎关注之后的文章
浙公网安备 33010602011771号