How save the image using strcat ?
3 ビュー (過去 30 日間)
古いコメントを表示
Hi, I want save my Image in folder there is include the name of image using strcat, I try but error ?
here my function :
function out = uji(fname)
im=imread(fname);
outdir = 'Image Result';
mkdir(outdir);
imwrite (strcat(fname(im(outdir, '1_ori.bmp'))));
out = im;
Could help me please ? thank you
2 件のコメント
Stephen23
2019 年 1 月 20 日
This does not make much sense:
im(outdir, '1_ori.bmp')
If im is an image array, why are you trying to index into it using two chracter vectors?
fname(im(outdir, '1_ori.bmp'))
If fname is a character vector or a string, why are you trying to indexing into it using an image array?
strcat(fname(im(outdir, '1_ori.bmp')))
What are you concatenating together? (There is only one input argument, so you concatenate one thing ... with nothing else).
採用された回答
madhan ravi
2019 年 1 月 20 日
doc sprintf
3 件のコメント
Guillaume
2019 年 1 月 20 日
Do not use strcat to build paths. Always use fullfile that is guaranteed to use the correct path separator regardless of which OS you use.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!