Cody

Solution 190184

Submitted on 12 Jan 2013
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Fail
%% chars=char([32:126,161:255]); bitmap=mean(double(imread('http://www.alfnie.com/software/monobitmap.bmp'))/255,3); bitmap=reshape(bitmap,size(bitmap,1),[],numel(chars)); img=imread('cameraman.tif'); img=sqrt(double(img(ceil(.25:.25:end),ceil(.25:.25:end)))/256); img=img(1:floor(size(img,1)/size(bitmap,1))*size(bitmap,1),1:floor(size(img,2)/size(bitmap,2))*size(bitmap,2)); str=gray2char(img,chars,bitmap) assert(isequal(size(str),[39 73])); [i,loc]=ismember(str,chars); assert(all(all(i))); img=permute(reshape(img,size(bitmap,1),size(img,1)/size(bitmap,1),size(bitmap,2),size(img,2)/size(bitmap,2)),[1,3,2,4]); d=mean(mean(mean(abs(bitmap(:,:,loc)-img(:,:,:)).^2,3),2),1); assert(d<=0.102);

Error: Out of memory. Type HELP MEMORY for your options.

2   Fail
%% chars=char([32:126,161:255]); bitmap=mean(double(imread('http://www.alfnie.com/software/monobitmap.bmp'))/255,3); bitmap=reshape(bitmap,size(bitmap,1),[],numel(chars)); img=load('clown.mat'); img=mean(ind2rgb(img.X,img.map),3); img=double(img(ceil(.25:.25:end),ceil(.25:.25:end))).^.25; img=img(1:floor(size(img,1)/size(bitmap,1))*size(bitmap,1),1:floor(size(img,2)/size(bitmap,2))*size(bitmap,2)); str=gray2char(img,chars,bitmap) assert(isequal(size(str),[30 91])); [i,loc]=ismember(str,chars); assert(all(all(i))); img=permute(reshape(img,size(bitmap,1),size(img,1)/size(bitmap,1),size(bitmap,2),size(img,2)/size(bitmap,2)),[1,3,2,4]); d=mean(mean(mean(abs(bitmap(:,:,loc)-img(:,:,:)).^2,3),2),1); assert(d<=0.172);

Error: Out of memory. Type HELP MEMORY for your options.