>> img = imread('airplane.JPG'); >> img = double(img)/255; >> image(img) >> imc = img(1:4:end,1:4:end,:); >> imc = zeros(size(imc)); for i = 1:4, for j = 1:4, imc = imc + img(i:4:end,j:4:end,:); end end imc = imc / 16; % % imc is a down-sampled version of img % >> image(imc) [V,E,a] = imgeig5(imc,5,2); xsz = 240 ysz = 320 >> Iteration 1: a few Ritz values of the 20-by-20 matrix: 0 0 0 0 0 0 Iteration 2: a few Ritz values of the 20-by-20 matrix: 11798 14530 14804 36824 51469 1e+08 >> s2 = sparsecut(a,V(:,2),.03); imcut(imc,s2) >> s3 = sparsecut(a,V(:,3),.03); >> imcut(imc,s3) >> s4 = sparsecut(a,V(:,4),.03); >> imcut(imc,s4)