Cody

# Problem 2897. Image Series 3 Complementary

Solution 1159149

Submitted on 10 Apr 2017 by H M Dipu Kabir
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))

out = 10×10 uint8 matrix 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

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))

out = 11×11 uint8 matrix 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

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))

out = 6×6 uint8 matrix 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