MSER conventions for the direction of increase of the y-variable
2 views (last 30 days)
Show older comments
I have found what I think is a clash of conventions in Matlab's treatment of MSERs. When using pixel coordinates, it is conventional for y to increase as you move down, but when displaying plots the convention is for y to decrease as you move down. An MSER comes with several fields: Location and PixelList seem to me to use the first convention, but Orientation seems to me to use the second convention. It would be great if someone who is familiar with MSERs in Matlab could confirm or deny this. If I'm right it would be important to spell out this clash of conventions in the documentation. A consistent set of conventions would change the sign of the Orientation. I have spent a lot of time trying to figure out why my programs don't work. (I have of course to bear in mind the alternative explanation that my algorithm is rubbish ;-(
I need an example of detectMSERFeatures, where I have control, but I can't get it to work. The following code demonstrates the basic problem and also my failure with detectMSERFeatures.
clear; close all;
side=1000;
im = ones(side);
xC=round(side/2); yC=round(side/4);
alpha = pi/5;
[x,y]=(meshgrid(1:side,1:side));
x = double(x); y=double(y);
xL = x(:)-xC; yL=y(:)-yC;
uL = xL*cos(alpha) + yL*sin(alpha);
vL = -xL*sin(alpha) + yL*cos(alpha);
mj=200; mi=20;
uL = uL/mj; vL = vL/mi;
ellCond = uL.^2 + vL.^2 < 1;
im(ellCond) = 0;
imshow(im);figure(gcf);
xLe =xL(ellCond); yLe=yL(ellCond);
figure; plot(xLe,yLe); figure(gcf);
M=detectMSERFeatures(im);
figure; plot(M); figure(gcf);
0 Comments
Answers (0)
See Also
Categories
Find more on MATLAB Support Package for USB Webcams in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!