Fisrt steps in image processing
Fisrt steps in image processing
>> set (gca, 'units' , 'pixels ', 'Position' , [20 20 fliplr(size (imagel))] )
• In the indexed representation, a(i,j) indexes a
color array called the palette (Figure 3). The
color palette is a (P x 3) array where each line
is used to code a color according to its Red,
Green and Blue components (RGB) using a
real number between 0 and 1.
This representation is convenient since most
bitmap editing programs can provide an image
description in three planes, each one of them
corresponding to a primary color R, G or B,
encoded as an integer between 0 and 2n — 1 (n-
bit encoding).
%===== TESTLOGIC.M
load lena25; % Loading and displaying
subplot (131); imagesc(pixc+1); % the first image
colormap(cmap); axis('image');
load testlog1; % Loading and displaying
subplot(132); imagesc(pixt1+1); % the second image
axis('image')
%===== Logical operation
pixr = ANDlog(pixc,pixt1,size(cmap,1));
subplot (133) ; imagesc (pixr+1) ; axis (' image ') ;