problem with storing in an array
% The previous code was omitted
% Part of the code for the preliminary detection of extreme points
num = 0;
extreme_point = [];
for oct_i = 1 : octave
dog = dog_pyr{oct_i};
[dog_r, dog_c, dog_page] = size(dog);
for r = 6 : dog_r – 5
for c = 6 : dog_c – 5
for page_i = 2 : dog_page – 1
dog_near = zeros(3, 3, 3);
dog_near(:, :, 1) = dog(r – 1 : r + 1, c – 1 : c + 1, page_i – 1);
dog_near(:, :, 2) = dog(r – 1 : r + 1, c – 1 : c + 1, page_i);
dog_near(:, :, 3) = dog(r – 1 : r + 1, c – 1 : c + 1, page_i + 1);
point_vale = dog_near(2, 2, 2);
if (point_vale == max(dog_near(:))) || (point_vale == min(dog_near(:)))
num = num +1;
sigma_i = k ^ (page_i -1) * sigma0;
extreme_point(num, 🙂 = [oct_i, page_i, r, c, sigma_i, 0]; % ???
end
end
end
end
end
hi, I’d like to ask you a questio, about the last line "extreme_point(num, 🙂 = [oct_i, page_i, r, c, sigma_i, 0];", Pls if it is written "extreme_point(num) = [oct_i, page_i, r, c, sigma_i, 0];", an error message that the assignment cannot be performed because the index on the left is incompatible with the size on the right will appear.
May I ask why this error occurs?
At the beginning of learning not quite understand, this is about the sift algorithm part of the content, the overall problem is all machine rollover, please understand.% The previous code was omitted
% Part of the code for the preliminary detection of extreme points
num = 0;
extreme_point = [];
for oct_i = 1 : octave
dog = dog_pyr{oct_i};
[dog_r, dog_c, dog_page] = size(dog);
for r = 6 : dog_r – 5
for c = 6 : dog_c – 5
for page_i = 2 : dog_page – 1
dog_near = zeros(3, 3, 3);
dog_near(:, :, 1) = dog(r – 1 : r + 1, c – 1 : c + 1, page_i – 1);
dog_near(:, :, 2) = dog(r – 1 : r + 1, c – 1 : c + 1, page_i);
dog_near(:, :, 3) = dog(r – 1 : r + 1, c – 1 : c + 1, page_i + 1);
point_vale = dog_near(2, 2, 2);
if (point_vale == max(dog_near(:))) || (point_vale == min(dog_near(:)))
num = num +1;
sigma_i = k ^ (page_i -1) * sigma0;
extreme_point(num, 🙂 = [oct_i, page_i, r, c, sigma_i, 0]; % ???
end
end
end
end
end
hi, I’d like to ask you a questio, about the last line "extreme_point(num, 🙂 = [oct_i, page_i, r, c, sigma_i, 0];", Pls if it is written "extreme_point(num) = [oct_i, page_i, r, c, sigma_i, 0];", an error message that the assignment cannot be performed because the index on the left is incompatible with the size on the right will appear.
May I ask why this error occurs?
At the beginning of learning not quite understand, this is about the sift algorithm part of the content, the overall problem is all machine rollover, please understand. % The previous code was omitted
% Part of the code for the preliminary detection of extreme points
num = 0;
extreme_point = [];
for oct_i = 1 : octave
dog = dog_pyr{oct_i};
[dog_r, dog_c, dog_page] = size(dog);
for r = 6 : dog_r – 5
for c = 6 : dog_c – 5
for page_i = 2 : dog_page – 1
dog_near = zeros(3, 3, 3);
dog_near(:, :, 1) = dog(r – 1 : r + 1, c – 1 : c + 1, page_i – 1);
dog_near(:, :, 2) = dog(r – 1 : r + 1, c – 1 : c + 1, page_i);
dog_near(:, :, 3) = dog(r – 1 : r + 1, c – 1 : c + 1, page_i + 1);
point_vale = dog_near(2, 2, 2);
if (point_vale == max(dog_near(:))) || (point_vale == min(dog_near(:)))
num = num +1;
sigma_i = k ^ (page_i -1) * sigma0;
extreme_point(num, 🙂 = [oct_i, page_i, r, c, sigma_i, 0]; % ???
end
end
end
end
end
hi, I’d like to ask you a questio, about the last line "extreme_point(num, 🙂 = [oct_i, page_i, r, c, sigma_i, 0];", Pls if it is written "extreme_point(num) = [oct_i, page_i, r, c, sigma_i, 0];", an error message that the assignment cannot be performed because the index on the left is incompatible with the size on the right will appear.
May I ask why this error occurs?
At the beginning of learning not quite understand, this is about the sift algorithm part of the content, the overall problem is all machine rollover, please understand. array,sift,if MATLAB Answers — New Questions
​