function created for transform grayscale to binary doesn't work
2 views (last 30 days)
I've created this function m file to convert grayscale images to binary images (as gray2bin matlab function):
But, when I apply this function to a file in grayscale as:
it doesn't generate BW variable-image-matrix and doesn't generate m,n variables.
More Answers (1)
John Petersen on 6 Aug 2012
If you're interested, this should be faster code if your image is very large or you're doing many of them.
function BW = conv_to_BW(im)
BW = ones(m,n);
BW(im<10)) = 0;