??? Index exceeds matrix dimensions.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello I am working on a project in which i use deconvolution operation on a image of dataset..I taken code from the website...but when i apply it on my image it give the error "??? Index exceeds matrix dimensions" The code is....
H2 = ones(10,10) ./ 100;
sampleRGB_OD_Blur = zeros(height,width,channel);
for k=1:channel
sampleRGB_OD_Blur(:,:,k) = filter2(H2,sampleRGB_OD(:,:,k),'same');
end
% Manual sampling of three regions of interest from the micrograph to calculate
% relative optical intensity of each stains in three color channels
He = reshape(sampleRGB_OD_Blur(44,348,:),3,1); % ERROR
Eo = reshape(sampleRGB_OD_Blur(361,290,:),3,1);
Bg = reshape(sampleRGB_OD_Blur(425,77,:),3,1);
0 comentarios
Respuestas (1)
Image Analyst
el 28 de Mzo. de 2014
Before the error line, put this line:
whos sampleRGB_OD_Blur
[rows, columns, numberOfColorChannels] = size(sampleRGB_OD_Blur)
Don't use semicolons and look in the command window. What does it say? I bet it will say the size is not as big as 425 rows by 348 columns. After that, check out this link.
0 comentarios
Ver también
Categorías
Más información sobre Matrix Indexing 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!