One dimensional sieve introduction: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 83: | Line 83: | ||
[29] [8] [24] [2x1 double] [2x1 double] [2x1 double] [3x1 double] [3x1 double] [5x1 double] [12x1 double] | [29] [8] [24] [2x1 double] [2x1 double] [2x1 double] [3x1 double] [3x1 double] [5x1 double] [12x1 double] | ||
====<span style="color:SaddleBrown"> | ====<span style="color:SaddleBrown">Tracing the granules through scale-space identifies candidate MSER's</span>==== | ||
{| border="0" cellpadding="5" cellspacing="5" | {| border="0" cellpadding="5" cellspacing="5" | ||
|- valign="top" | |- valign="top" | ||
|width="50%"|The granules contain all the information in the signal. The tree illustrates the relationship between granules. | |width="50%"|The granules contain all the information in the signal. The tree illustrates the relationship between granules. The granules at <math>X=8</math> (scales 1, 3, 5, 12) indicates a region that is stable of scale. Likewise at <math>X=24</math> (scales 1, 2). One might argue that the latter is the less stable. | ||
|[[Image:IllustrateSIV_1_08.png|400px|'o' non-linear filter (sieve)]] | |[[Image:IllustrateSIV_1_08.png|400px|'o' non-linear filter (sieve)]] | ||
|} | |} |
Revision as of 11:35, 15 November 2013
1D Signals to MSERs and granules
Matlab function IllustrateSIV_1 illustrates how MSERs (maximally stable extremal regions) and sieves are related. We start with one dimensional signals before moving to two dimensional images and three dimensional volumes.
Consider a signal, <math>X</math>X=getData('PULSES3WIDE') >blue X=0 5 5 0 0 1 1 4 3 3 2 2 1 2 2 2 1 0 0 0 1 1 0 3 2 0 0 0 6 0 0 |
Filter
Linear
A linear Gaussian filter with <math>\sigma=2</math> attenuates extrema without introducing new ones. But blurring may be a problem. |
h=fspecial('Gaussian',9,2); Y=conv(X,(h(5,:)/sum(h(5,:))),'same');
Non-linear: the starting point for MSER's
scaleA=1; Y1=SIVND_m(X,scaleA,'o');
scaleB=2; Y2=SIVND_m(X,scaleB,'o');
red=double(X)-double(Y1); green=double(Y1)-double(Y2);
Repeat over scales 0 to 15
Increasing the scale removes extrema of increasing length. The algorithm cannot create new maxima (it is an 'o' sieve) it is, therefore, scale-space preserving. |
YY=ones([length(X),1+maxscale]);
for scale=0:maxscale
Y2=SIVND_m(Y1,scale,'o',1,'l',4);
YY(:,scale+1)=Y2';
Y1=Y2; % each stage of the filter (sieve) is idempotent
end
Label the granules
We can create a data structure that captures the properties of each granule. The number in each disc indicates the granule scale. Each cell in the PictureElement field has a list of indexes recording the granule position (<math>X</math>). (In 1D this is best done run-length coded but this code is designed to also work in 2D.) | 'o' non-linear filter (sieve) |
g=SIVND_m(X,maxscale,'o',1,'g',4); g = Number: 10 area: [1 1 1 2 2 2 3 3 5 12] value: [6 1 1 2 5 1 1 1 1 1] level: [6 4 3 2 5 1 3 2 2 1] deltaArea: [5 2 1 7 3 12 2 2 7 19] last_area: [6 3 2 9 5 14 5 5 12 31] root: [29 8 24 24 2 21 8 14 8 8] PictureElement: {1x10 cell}
g.PictureElement
Columns 1 through 9
[29] [8] [24] [2x1 double] [2x1 double] [2x1 double] [3x1 double] [3x1 double] [5x1 double] [12x1 double]