error in example code
Show older comments
i wanted to try example in Classify Hyperspectral Images Using Deep Learning code in my matlab, but matlab doesn't recognize createImagePatchesFromHypercube function. also i can't run this example here, although you mentiond This function is attached to the example as a supporting file.
could you please help me, thanks.
7 Comments
Walter Roberson
on 3 Feb 2021
"To perform hyperspectral image analysis, download the Image Processing Toolbox Hyperspectral Imaging Library from the Add-On Explorer"
Reza DShafa
on 3 Feb 2021
per isakson
on 4 Feb 2021
Edited: per isakson
on 4 Feb 2021
If you already installed it, make sure it's on the search path. Run
which createImagePatchesFromHypercube
If that doesn't solve it, reinstall.
Image Processing Toolbox™ Hyperspectral Imaging Library provides MATLAB® functions and tools for hyperspectral image processing and visualization.Use the functions in this library to read, write, and
Reza DShafa
on 4 Feb 2021
per isakson
on 4 Feb 2021
I didn't install the library and cannot see its content.
Use the little envelope icon to Contact MathWorks Image Processing Team. Or report your problems in the Comment thread of the submission.
Reza DShafa
on 4 Feb 2021
Jiang Karen
on 13 Sep 2021
I also encountered the same problem, have you solved it?
Answers (1)
Once the Hyperspectral add-on is installed, then the master copy of that file is at
filename = fullfile(matlabroot, 'examples', 'deeplearning_shared', 'main', 'createImagePatchesFromHypercube.m')
ls(filename)
This file is not on your MATLAB path, and it is not intended that you use it directly. Instead, you need to
openExample('deeplearning_shared/HyperspectralImageClassificationUsingDeepLearningExample')
which will create a directory for you that holds the example and runs any necessary initialization.
3 Comments
Jiang Karen
on 13 Sep 2021
I have tried using the method you provided, but it still doesn't work.
Can you share the function createImagePatchesFromHypercube file?
That .m file can solve all my problems. Thank you sincerely.
Walter Roberson
on 13 Sep 2021
What do you see if you
filedir = fullfile(matlabroot, 'examples', 'deeplearning_shared', 'main');
ls(filedir)
Can you share the function
No, my understanding is that it is copyrighted code, and I do not have the authority to make it available to other people.
Jiang Karen
on 13 Sep 2021
Edited: Jiang Karen
on 13 Sep 2021
I think these functions are open source, because these libraries can be downloaded for free.
I also downloaded the toolbox, there may be some bugs.
Other people and I also encountered the same problem.
Hope you can help me. Sincerely.
Email: jklblue@qq.com
Categories
Find more on Hyperspectral Image Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!