updating the size of context window at each frame

4 visualizaciones (últimos 30 días)
likui fikui
likui fikui el 31 de Mzo. de 2015
Hi guys Im having a problem, i need to extract a window of size lets may m*n, from an image but the window size vary with each image of frame, it could be bigger or smaller problem is i have to add the last frame to the current and only same size of matrix can add so this is what i tried, well what i did take the four possiblies that can occur ,but the results im getting are not satisfactory, any suggestions?? thanks
if true
% code
{
[f1, f2]=size(hscf);
[f11, f22]=size(Hstcf);
if( f1> f11 && f2>f22)
C=zeros(f1,f2);
for i=1:1:f11
for j=1:1:f22
C(i,j)=Hstcf(i,j);
end
end
Hstcf=C;
elseif(f1<f11 &&f2<f22)
C=zeros(f1,f2);
for i=1:1:f1
for j=1:1:f2
C(i,j)=Hstcf(i,j);
end
end
Hstcf=C;
elseif(f1>f11 && f2<f22)
C=zeros(f1,f2);
for i=1:1:f11
for j=1:1:f2
C(i,j)=Hstcf(i,j)
end
end
Hstcf=C;
elseif(f1<f11 && f2>f22)
C=zeros(f1,f2);
for i=1:1: f1
for j=1:1:f22
C(i,j)=Hstcf(i,j);
end
end
Hstcf=C;
elseif(f1<f11 && f2==f22)
C=zeros(f1,f2);
for i=1:1: f1
for j=1:1:f22
C(i,j)=Hstcf(i,j);
end
end
Hstcf=C;
elseif(f1>f11 && f2==f22)
C=zeros(f1,f2);
for i=1:1: f11
for j=1:1:f22
C(i,j)=Hstcf(i,j);
end
end
Hstcf=C;
elseif(f1==f11 && f2>f22)
C=zeros(f1,f2);
for i=1:1: f1
for j=1:1:f22
C(i,j)=Hstcf(i,j);
end
end
Hstcf=C;
elseif(f1==f11 && f2<f22)
C=zeros(f1,f2);
for i=1:1: f1
for j=1:1:f2
C(i,j)=Hstcf(i,j);
end
end
Hstcf=C;
end }
end

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by