Skip to content
Snippets Groups Projects
Commit e62e5f5b authored by Eric Wait's avatar Eric Wait
Browse files

Added a function that will pad an image to an even dimension in width and height

parent abac8f50
Branches
No related tags found
No related merge requests found
function imOut = PadEven(im)
cPad = mod(size(im,2),2);
rPad = mod(size(im,1),2);
imOut = zeros(size(im,1)+rPad,size(im,2)+cPad,size(im,3),'like',im);
imOut(1:size(im,1),1:size(im,2),:) = im;
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment