MSER conventions for the direction of increase of the y-variable

2 Ansichten (letzte 30 Tage)
David Epstein
David Epstein am 11 Aug. 2016
Bearbeitet: David Epstein am 12 Aug. 2016
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);

Antworten (0)

Kategorien

Mehr zu MATLAB Support Package for USB Webcams finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by