Reputation: 11
What does the following MATLAB code do?
binaryImage = zeros(size(Image));
binaryImage(106<=Image(:)&Image(:)<=169) = 1;
Upvotes: 1
Views: 203
Reputation: 19329
In the first statement the binaryImage
variable is set to a matrix of zeros of the same size as the matrix Image
. The second statement sets all elements of the binaryImage
matrix to one where the corresponding element in the Image
matrix is between 106 and 169.
Upvotes: 5