It looks like whoever wrote this is not familiar with the vectorized methods in MATLAB - this code isvery inefficient. But anyway, all you have to do is to get rid of the "if" test for three distinct cases, and just change the numbers to whatever they are for whatever color you want.
if (InputImg(i,j,1)>=0.6) & (InputImg(i,j,2)>=0.6) & (InputImg(i,j,3)<=0.3) % Change these #'s
Best Answer