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 Kommentare

Walter Roberson
Walter Roberson am 3 Feb. 2021
"To perform hyperspectral image analysis, download the Image Processing Toolbox Hyperspectral Imaging Library from the Add-On Explorer"
Reza DShafa
Reza DShafa am 3 Feb. 2021
it's already installed and only this function is not recognised by matlab. how can i acces to the source code of this function? may you please share it with me. thanks
Unrecognized function or variable 'createImagePatchesFromHypercube'.
Error in CSCNN (line 15)
[allPatches,allLabels] = createImagePatchesFromHypercube(imageData,gtLabel,windowSize);
this is the error
per isakson
per isakson am 4 Feb. 2021
Bearbeitet: per isakson am 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
Reza DShafa am 4 Feb. 2021
@per isaksonper isakson
i did as you said. reinstalled it again and this is what happens 'createImagePatchesFromHypercube' not found. the code doesn't work in here either but with different error this time hypercube function is not recognised. thanks for helping me.
per isakson
per isakson am 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
Reza DShafa am 4 Feb. 2021
thanks a lot.
Jiang Karen
Jiang Karen am 13 Sep. 2021
I also encountered the same problem, have you solved it?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Walter Roberson
Walter Roberson am 13 Sep. 2021

0 Stimmen

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')
filename = '/MATLAB/examples/deeplearning_shared/main/createImagePatchesFromHypercube.m'
ls(filename)
/MATLAB/examples/deeplearning_shared/main/createImagePatchesFromHypercube.m
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 Kommentare

Jiang Karen
Jiang Karen am 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.
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
Jiang Karen am 13 Sep. 2021
Bearbeitet: Jiang Karen am 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

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 3 Feb. 2021

Bearbeitet:

am 13 Sep. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by