From: raj patil on
when i am trying to use function edge with my own handwritten scanned image stored as .tif i am getting the error as input image should be two dimentional. what to do?
From: David Young on
It would help if you showed the code that causes the problem. One guess, though, is that perhaps you are passing a filename string to the edge function, rather than reading in the image with imread and passing the image itself to the function. Is that the explanation?
From: ImageAnalyst on
More likely is that he has a color image. You can check with the size
command:
[rows columns numberOfColorBands] = size(imageArray);
if numberOfColorBands > 1
% It's color, so convert to monochrome.
imageArray = rgb2gray(imageArray);
% Alternatively you can pick a particular color band
% imageArray = imageArray(:,:,3);
end
 | 
Pages: 1
Prev: problem
Next: code for Compressed Sensing?