<< NL_V_LoadBody3D NL_V: Vision NL_V_Moravec >>

NARVAL >> NL_V: Vision > NL_V_MRA

NL_V_MRA

Perform a scale modification on a matrix (Multi Resolution Analysis).

Calling Sequence

[R] = NL_V_MRA(I,Z,O)

Arguments

I :

Matrix.

Z :

Scale factor.

O :

Mode.

R :

Output matrix.

Description

NL_V_MRA performs the following scale modification on the matrix I of size (nxm) (Multi Resolution Analysis). The output matrix R size is Z times smaller than the one of I. There are four different modes: O=1 : mean, O=2 : max, O=3 : min and O=4 : median. Thus a single value is calculated for each non-overlapping block of size in respect with the defined mode.

Examples

dt=getdate();
seed=dt(10);
rand('seed',seed);//initialization of the random values generator
no=4;//quantity of obstacles (rectangle)
L=1000;//squared area side
hm=100;//minimal height
hM=250;//maximal height
wm=100;//minimal width
wM=250;//maximal width
Al=[0 %pi/2 %pi -%pi/2];//available angles for obstacles
[Xs,Ys,X,Y,H,W,A]=NL_V_RectanglesCorners(no,L,hm,hM,wm,wM);//generation of obstacles
[P]=NL_V_PotentialRectangles(X,Y,H,W,A,L);//generation of obstacle matrix
z=10;//zoom factor
o=2;// 1=mean, 2=max, 3=min, 4=median
Pz=NL_V_MRA(P,z,o);//application of NL_V_MRA
[Pzx,Pzy]=size(Pz);//image size
w1=1;//window index
scf(w1);
clf(w1);
grayplot(1:L,1:L,P);//graph visualization
xset("colormap",graycolormap(128));
w2=2;//window index
scf(w2);
clf(w2);
grayplot(1:Pzx,1:Pzy,Pz);//graph visualization
xset("colormap",graycolormap(128));

Report an issue
<< NL_V_LoadBody3D NL_V: Vision NL_V_Moravec >>