Cody

Solution 1704994

Submitted on 9 Jan 2019 by Athi
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); g=12; d=[12 13 14 15 28 29 30 31 44 45 46 47 60 61 62 63 76 77 78 79 92 93 94 95 108 109 110 111 124 125 126 127 140 141 142 143 156 157 158 159 172 173 174 175 188 189 190 191 204 205 206 207 220 221 222 223 236 238 239]; assert(isequal(unique(image_or(A,g)),d))

2   Pass
A=imread('http://www.mathworks.com/matlabcentral/profiles/3374772.jpg'); A=rgb2gray(A); g=190; d=[190 191 254 255]; assert(isequal(unique(image_or(A,g)),d))

3   Pass
A=imread('http://www.mathworks.com/matlabcentral/profiles/3374772.jpg'); A=rgb2gray(A); g=191; d=[191 255]; assert(isequal(unique(image_or(A,g)),d))

4   Pass
A=uint8([ones(3,3) zeros(3,3)]); g=60; d=[60 61]; assert(isequal(unique(image_or(A,g)),d))

5   Pass
A=uint8(magic(8)); g=60; d=[60 61 62 63 124]; assert(isequal(unique(image_or(A,g)),d))

Suggested Problems

More from this Author22