How can I use indexed image in neural network ?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
jawad ashraf
am 11 Aug. 2018
Kommentiert: Walter Roberson
am 30 Aug. 2018
I have converted RGB images into indexed images using function rgb2ind then I made their matrix and load it using the code
fprintf('Loading and Visualizing Data ...\n')
load('ClothingData.mat');
m = size(X, 1);
[sel] = randperm(size(X, 1)); % Randomly select 100 data points to display
sel = sel(1:100);
displayData(X(sel, :));
but it is throwing this error message
Warning: Size vector should be a
row vector with integer elements.
> In displayData at 30
In ex4 at 50
Error using reshape
Size arguments must be real
integers.
Please tell me how to fix this error, also can I use indexed images for neural network classification or not
2 Kommentare
Walter Roberson
am 12 Aug. 2018
displayData does not appear to be a Mathworks routine, and also does not appear to be part of the File Exchange.
Walter Roberson
am 12 Aug. 2018
Akzeptierte Antwort
Walter Roberson
am 12 Aug. 2018
"can I use indexed images for neural network classification or no"
Yes.
If you are doing pattern matching, you might even get a useful result. But don't expect anything useful even for pattern matching unless you passed a fixed colormap into rgb2ind(). And even in that case, if you did not do illumination correction, your results might be low quality.
13 Kommentare
Walter Roberson
am 30 Aug. 2018
In order for the rgb2ind to be done consistently, you need to generate a colormap that you use for all of the images. For example you could pick one of the images and use
[first_ind_image, map] = rgb2ind(first_rgb_image);
and after that you would use
rgb2ind(other_image, map)
And then when you went to display, you would
colormap(map)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Modify Image Colors finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!