??? Index exceeds matrix dimensions.
1 view (last 30 days)
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);
sampleRGB_OD_Blur(:,:,k) = filter2(H2,sampleRGB_OD(:,:,k),'same');
% 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);
Please help The complete code is here... http://web.hku.hk/~ccsigma/color-deconv/color-deconv.html
Image Analyst on 28 Mar 2014
Before the error line, put this line:
[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.