Reputation: 2698
Why is that whenever I try to use detectSURFFeatures(img)
with a binary image in matlab gives me proper points but whenever I use detectMSERFeatures(img)
with the same binary image
gives me error instead of pointing some valid regions?
ERROR:
Error using detectMSERFeatures
Expected input number 1, I, to be one of these types:
uint8, int16, uint16, single, double
Instead its type was logical.
Error in detectMSERFeatures>parseInputs (line 75)
validateattributes(I,{'uint8', 'int16', 'uint16', ...
Error in detectMSERFeatures (line 64)
[Iu8, params] = parseInputs(I,varargin{:});
Upvotes: 1
Views: 1759
Reputation: 36
Try this:
make image 2 double first by using img=im2double(img);
then feed it to MSER
detectMSERFeatures(img)
Upvotes: 2
Reputation: 7817
detectMSERFeatures
does not accept logical inputs, as stated in the documentation and in the error you are receiving. detectSURFFeatures
does. I don't know if there's a specific reason why, as I'm not familiar with the limitations of the different algorithms.
You could simply convert your binary image to one of the types listed, and run MSER on it:
detectMSERFeatures(double(img));
Upvotes: 2