フィルターのクリア

how to change set of image names into directory

2 ビュー (過去 30 日間)
Datti Nagadhara Harini
Datti Nagadhara Harini 2014 年 4 月 11 日
コメント済み: Image Analyst 2014 年 4 月 11 日
imageNames = {'elephant.jpg','cameraman.tif','peppers.png','saturn.png',... 'pears.png','stapleRemover.jpg','football.jpg','mandi.tif',... 'kids.tif','liftingbody.png','office_5.jpg','gantrycrane.png',... 'moon.tif','circuit.tif','tape.png','coins.png'};
i want to change as imageNames = ('D:\work\Databse');
% Initialize structure for images and associated information numImages = numel(imageNames); emptyEntry = struct('image',[],'thumbnail',[]); imageCollection = repmat(emptyEntry,[1 numImages]); thumbnailSize = 400;

採用された回答

Image Analyst
Image Analyst 2014 年 4 月 11 日
numImages is not the number of images in that folder, it's the length of the imageNames cell array. Though it's not really a cell array, it's just a single cell with the string holding the folder in the one and only cell. So the length is 1 cell, and numImages is 1. Please read the FAQ on cells and you will understand: http://matlab.wikia.com/wiki/FAQ#What_is_a_cell_array.3F
So, assuming you fix that, you didn't give your error message. I don't see anything in your code where you tried to open a database. Please GIVE ALL THE RED TEXT . Don't snip or paraphrase like you did. We want it all, line numbers, traceback, code statements, everything .
  3 件のコメント
Datti Nagadhara Harini
Datti Nagadhara Harini 2014 年 4 月 11 日
ya it is Databse. My problem is i want to give the image folder instead of giving names. how should i change it.
Image Analyst
Image Analyst 2014 年 4 月 11 日

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by