Code: clear; clc; rgb=imread('d:/matimage/nature.jpg'); imshow(rgb); [X_no_dither,map]= rgb2ind(rgb,8,'nodither'); figure, imshow(X_no_dither,map); [X_dither,map]=rgb2ind(rgb,8,'dither'); figure, imshow(X_dither,map); Output:
Leave a Comment