%
% This is just a history of what I typed in class.
% It almost surely contains errors.
%
I = imread('ball.png');
imshow(I);
I = double(I);
I = (I(:,:,1)+I(:,:,2)+I(:,:,3))/3;
I = uint8(I);
imshow(I)
mesh(I)
shg
mesh(double(I)\)
mesh(double(I))
help normpdf
x = -3:.1:3;
plot(x)
shg
h = normpdf(x,0,1);
plot(h)
plot(h,'.')
shg
h
plot(x,y)
plot(x,h)
shg
plot(x,h,'.')
shg
sum(h)
h = normpdf(x,2,1);
plot(x,h,'.')
shg
h = normpdf(x,0,2);
plot(x,h,'.')
shg
mesh(I)
shg
mesh(double(I))
shg
cd ..
dir
cd class1_1
ls
I = imread('DesertSmall.jpg');
imshow(I)
shg
I = double(I);
I = (I(:,:,1)+I(:,:,2)+I(:,:,3))/3;
I = uint8(I);
imshow(I)
shg
h = [1 0 -1]'
dIdi = imfilter(I,h);
imshow(dIdi);
shg
h = -h
dIdi = imfilter(I,h);
imshow(dIdi);
shg
imshow(dIdi+128);
shg
imshow(10*dIdi+128);
shg
I = double(I);
dIdi = imfilter(I,h);
imshow(10*dIdi+128);
imshow(dIdi);
shg
class(I)
I = I/255;
dIdi = imfilter(I,h);
imshow(dIdi);
shg
imshow(dIdi+0.5);
shg
dIdj = imfilter(I,h');
imshow(dIdj+0.5);
shg
m = sqrt(dIdi.*dIdi+dIdJ.*dIdj);
m = sqrt(dIdi.*dIdi+dIdj.*dIdj);
imshow(m)
shg
theta = atan2(dIdi,dIdj);
imshow(theta)
shg
minmax(theta(:))
minmax(theta(:)')
I = uint8(I);
imshow(I)
shg
I = imread('DesertSmall.jpg');
I = double(I);
I = I/255;
I = (I(:,:,1)+I(:,:,2)+I(:,:,3))/3;
I = I*255;
I = uint8(I);
imshow(I)
shg
