function B = hw049 ( A )

  [ m, n, k ] = size ( A );
  B = A;

  shade1 = [ 0.4061, 0.3105, 0.2834 ];

  for j = 1 : n
    for i = 1 : m

      rgb = double ( [ A(i,j,1), A(i,j,2), A(i,j,3) ] );
      rgb_sum = sum ( rgb );
      shade2 = rgb / rgb_sum;

      d = norm ( shade1 - shade2 );

      if ( 0.05 < d | rgb_sum < 550 )
        B(i,j,1:3) = 255;
      end

    end
  end

  return
end
