Last active
November 8, 2016 07:59
-
-
Save dretax/e94e731b8b6f9ad9606c6bd6609117f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
img_bw = img_gray; | |
treshold_level = 0.4; % mean(mean(img_gray)) | |
for i = 1 : info.Height | |
for j = 1 : info.Width | |
if (img_gray(i,j) > treshold_level) | |
img_bw(i, j) = 255; | |
else | |
img_bw(i, j) = 0; | |
end | |
end | |
end | |
figure | |
imshow(img_bw); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment