필터 지우기
필터 지우기

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 (최근 30일)
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;

답변 (1개)

madhan ravi
madhan ravi 2018년 12월 5일
편집: madhan ravi 2018년 12월 5일
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

카테고리

Help CenterFile Exchange에서 Google Earth에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by