What is the solution to this error?
古いコメントを表示
What this error main?
.....
>> SSDBExperiment_BuildCropDataset
Error using fullfile (line 67)
All inputs must be strings, character vectors, or cell arrays of character vectors.
Error in SSDBExperiment_BuildCropDataset (line 17)
D.SaveDir = fullfile(D.Root, 'CropData');
.......
I have file with name (fullfile.m)
What should I do, which lines need change to work correctly.
Thank you in advanced.
24 件のコメント
Walter Roberson
2022 年 3 月 8 日
At the time the error shows up, what is class(D.Root) ?
Ruwaida Lawgali
2022 年 3 月 9 日
Walter Roberson
2022 年 3 月 9 日
You cannot pass a struct array into fullfile()
Perhaps one of the fields inside D.Root is what you need.
Ruwaida Lawgali
2022 年 3 月 9 日
Walter Roberson
2022 年 3 月 10 日
When you use that form of load(), then the output variable DefaultRoot will be created as a struct vector with one field name for each variable stored in the .mat file.
Your code is not expecting DefaultRoot.mat to contain images: your code is expecting that it will contain a variable named DefaultRoot that is the name of the parent directory of CropData where the data is to be stored.
ResolveMissingOptions() is then used to create options.SaveDir that is what is actually used later.
Ruwaida Lawgali
2022 年 3 月 10 日
Walter Roberson
2022 年 3 月 10 日
That looks plausible.
Or you could leave the code the way it was but put in
D.Root = 'C:\Users\ALSRAYA\Desktop\codes\codeHMAX\Caltech\PNGImages\cars';
before D.Root is used.
Ruwaida Lawgali
2022 年 3 月 10 日
Walter Roberson
2022 年 3 月 10 日
CAfilelist.mat variable CAfilelist needs to be a cell array . Each element of the cell array must be a struct that contains a field named olistname that is used by QReadOList2 and the result of that Q* call needs to be a struct that contains a field named 'car'
But, options.UsableIndices had to be set first, and options is created by ResolveMissingOptions, which we do not have the source code for, so I do not know if D.Root is used in creating the options.
Ruwaida Lawgali
2022 年 3 月 11 日
Ruwaida Lawgali
2022 年 3 月 11 日
Ruwaida Lawgali
2022 年 3 月 11 日
Ruwaida Lawgali
2022 年 3 月 11 日
Walter Roberson
2022 年 3 月 11 日
It looks like options.UsableIndices is being set from the assignment
D.UsableIndices = 1:300;
If I read the code correctly, that already tells it to use the first 300 entries from CAfilelist .
I have a code with 41 files.
But your display from CAfilelist shows 3547 ?
Ruwaida Lawgali
2022 年 3 月 11 日
Walter Roberson
2022 年 3 月 12 日
I would suggest consulting the documentation that came with the code.
Ruwaida Lawgali
2022 年 3 月 12 日
Walter Roberson
2022 年 3 月 13 日
What did you get the software from? Was there no description of it?
I searched for some key function names, but I was not able to find that software anywhere, so I do not know where it is from or how it is intended to be used.
Ruwaida Lawgali
2022 年 3 月 13 日
編集済み: Walter Roberson
2022 年 3 月 13 日
Walter Roberson
2022 年 3 月 13 日
I am not sure which code link you used? When I look at that site they say that HMAX was for a 1999 paper and the MATLAB code is no longer available from them.
Ruwaida Lawgali
2022 年 3 月 13 日
Walter Roberson
2022 年 3 月 13 日
It looks like it is layered on top of a different software package, and that most of the computation work is done in C. It looks like the work was done roughly a decade ago.
It is an unusual way of writing code, but it is possible that it fits in well with their other software package.
Ruwaida Lawgali
2022 年 3 月 13 日
Walter Roberson
2022 年 3 月 14 日
You would install the CNS package first and then this set of software, and then you would be able to use it from MATLAB. It defines a set of MATLAB classes and methods but does the computation in C for efficiency.
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!