Cody

Solution 574337

Submitted on 5 Feb 2015 by Gergely Patay
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% A=imread('http://www.mathworks.com/matlabcentral/profiles/3374772.jpg'); A=rgb2gray(A); o=[63 63 63 63 63 63 63 63 64 64 63 63 63 63 63 63 63 63 64 64 63 63 63 63 63 63 63 63 64 64 63 63 63 63 63 63 63 63 64 64 63 63 63 63 63 63 63 63 64 64 63 63 63 63 63 63 63 63 64 64 63 63 63 63 63 63 63 63 64 64 63 63 63 63 63 63 63 63 64 64 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62]; assert(isequal(image_complementary(A(1:10,1:10)),o))

2   Pass
%% A=imread('http://www.mathworks.com/matlabcentral/profiles/3374772.jpg'); A=rgb2gray(A); o=[62 62 62 62 62 62 62 63 63 63 63 62 62 62 62 62 62 62 62 62 62 62 63 63 63 63 63 63 63 62 62 62 62 63 63 63 63 63 63 63 62 62 62 62 64 64 64 64 64 64 64 63 63 63 63 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 66 66 66 66 66 66 66 66 66 66 66]; assert(isequal(image_complementary(A(10:20,10:20)),o))

3   Pass
%% A=imread('http://www.mathworks.com/matlabcentral/profiles/3374772.jpg'); A=rgb2gray(A); o=[133 122 85 117 125 192 134 151 100 120 162 211 144 179 110 126 177 206 155 174 88 118 150 195 155 162 86 146 165 213 166 172 110 162 162 193]; assert(isequal(image_complementary(A(100:105,100:105)),o))

Suggested Problems

More from this Author21