Unable to perform assignment because the size of the left side is 56-by-37 and the size of the right side is 37-by-56. Error in myMeanShiftSegmentation (line 21) subsampled(:, :, i) = I1;
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
getting above error when trying to run mean shift segmentation algorithm
original = imread(inpImg);
channelCount = size(original ,3);
num_rows_original = size(original, 1);
num_cols_original = size (original, 2);
subsampled = zeros(floor(num_cols_original/5)+1, floor(num_rows_original/5)+1, channelCount);
subsampled = uint8(subsampled);
for i = 1:channelCount
original1 = original(:, :, i);
original1 = double(original1);
gfilter = fspecial('gaussian', 5, 1);
I1 = conv2(original1, gfilter, 'same');
I1 = uint8(I1);
I1 = I1(1:5:end, 1:5:end);
subsampled(:, :, i) = I1;
end;
0 comentarios
Respuestas (1)
madhan ravi
el 5 de Dic. de 2018
Editada: madhan ravi
el 5 de Dic. de 2018
Use a cell array to store the values :
P.S- I have no experience with mean shikft algorithm
subsampled=cell(1,n);
for i=1:n
subsampled{i}=I1;
end
0 comentarios
Ver también
Categorías
Más información sobre Stateflow en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!