gistlib
main.mimg = imread('image.jpg'); [rows, cols, ~] = size(img); [r, c] = ndgrid(1:rows, 1:cols); mask = sqrt((r - rows/2).^2 + (c - cols/2).^2) <= min(rows,cols)/2; img(~mask) = 255; imshow(img); 188 chars7 lines
img = imread('image.jpg'); [rows, cols, ~] = size(img); [r, c] = ndgrid(1:rows, 1:cols); mask = sqrt((r - rows/2).^2 + (c - cols/2).^2) <= min(rows,cols)/2; img(~mask) = 255; imshow(img);
gistlibby LogSnag