Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function obrazek = skala_szarosci(A)
- [x, y, z] = size(A);
- for (ii = 1 : x)
- for (jj = 1 : y)
- % Ustalanie nasycenia koloru czarnego na podstawie wartości składowych RGB
- obrazek(ii, jj) = 0.2989 * A(ii, jj, 1) + 0.5870 * A(ii, jj, 2) + 0.1140 * A(ii, jj, 3);
- endfor
- endfor
- endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement