Impact-Site-Verification: dbe48ff9-4514-40fe-8cc0-70131430799e

Search This Blog

Crop an Image without built-in function| MATLAB

Code:

function z = crop_image(x, rmin, cmin, rpix, cpix)
  z=[];
temp=1;
gemp=1;
for i=rmin:(rmin+rpix-1)
    for j=cmin:(cmin+cpix-1)
        z(temp,gemp)=x(i,j);
        gemp=gemp+1;
    end
    temp=temp+1;
    gemp=1;
end
end

No comments

Popular Posts

Followers