sunny
sunny

Reputation: 11

could someone explain me this matlab code?

What does the following MATLAB code do?

binaryImage = zeros(size(Image));
binaryImage(106<=Image(:)&Image(:)<=169) = 1;

Upvotes: 1

Views: 203

Answers (1)

srgerg
srgerg

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

Related Questions