%-- 12/2/2016 8:32 AM --%
% This is my command history from class
% It DOES contain errors
I = [0,1,0.5];
I
imshow(I)
r = [1 0 0];
g = [0 1 0];
b = [0 0 1];
I = cat(3,r,g,b)
imshow(I)
%-- 12/2/2016 9:11 AM --%
ls
I = imread('DesertSmall.jpg');
I
gray = I(:,:,:1) + I(:,:,2) + I(:,:,3);
gray = I(:,:,1) + I(:,:,2) + I(:,:,3);
imshow(gray)
shg
gray = (I(:,:,1) + I(:,:,2) + I(:,:,3))/3;
imshow(gray)
gray = (double(I(:,:,1) + I(:,:,2) + I(:,:,3))/3;
gray = (double(I(:,:,1) + I(:,:,2) + I(:,:,3))/3);
I = double(I)/255;
minmax(I(:))
minmax(I(:)')
I = imread('DesertSmall.jpg');
minmax(I(:)')
I = double(I)/255;
minmax(I(:)')
I = cat(3,r,g,b)
r = [1 0 0];
g = [0 1 0];
b = [0 0 1];
I = cat(3,r,g,b)
I(:)
I(:)'
minmax(I(:))
minmax(I(:)')
I = imread('DesertSmall.jpg');
I = double(I)/255;
imshow(I)
gray = (double(I(:,:,1) + I(:,:,2) + I(:,:,3))/3);
imshow(gray)
shg
imshow(gray)
shg
imshow(gray)
plot(I(20,:),'r.-')
shg
plot(I(:,20),'r.-')
shg
Ismall = cat(3,r,g,b)
gray = (double(Ismall(:,:,1) + Ismall(:,:,2) + Ismall(:,:,3))/3);
gray
gray(2,:)(
gray(2,:)
gray(:,2)
I(:,20)
I(:,20)'
I(2:end,20)-I(1:(end-1),20)
dIdi = I(2:end,20)-I(1:(end-1),20)
imshow(dIdi)
plot(dIdi,'b.-')
shg
dIdi = I(2:end,20)-I(1:(end-1),20) % not center on pixel
dIdi = imfilter(I,[1;0;-1]); % along i
imshow(dIdi)
shg
imshow(dIdi)
