updating the size of context window at each frame
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
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
0 comentarios
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
