Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 wyswietlenie,przyciemnienie
- a = imread ('maki.jpg');
- figure (1);
- subplot(2,2,1);
- image(a);
- b = a;
- b=double(b);
- c= input ('Podaj wartosc przyciemnienia: ')
- b= b-c;
- subplot(2,2,2);
- b=uint8(b);
- image(b);
- 2
- a= imread('maki.jpg');
- a= double(a);
- figure (1);
- subplot(2,2,1);
- a=uint8(a);
- image(a);
- b=a;
- r=b(:,:,1);
- g=b(:,:,2);
- b=b(:,:,3);
- b=0.299*r+0.587*g+0.114*b;
- subplot(2,2,2);
- image(b);
- czarno=0.299*r+0.587*g+0.114*b;
- czarno=uint8(czarno);
- [m,n]=size(czarno);
- p=80;
- for i=1:m
- for j=1:n
- if czarno(i,j)<=p
- czarno(i,j)=0;
- else
- end
- end
- end
- czarno(i,j)=255;
- colormap(gray(256));
- subplot(2,2,3);
- image(czarno);
- 3 zmiana koloru
- close all;
- clear all;
- d=imread('maki.jpg');
- image(d);
- [y x] = ginput(1);
- x=floor(x);
- y=floor(y);
- punkt=d(y,x,:);
- figure(2);
- image(punkt);
- 4
- clear all;
- img = imread('maki.jpg');
- kolum = size(img, 1);
- wiersz = size(img, 2);
- img2 = zeros(kolum + 30, wiersz +30, 3);
- for i=1:kolum+30
- for j = 1:wiersz+30
- img2(i,j, 2) = 255;
- end
- end
- for i = 16:kolum+15
- for j = 16:wiersz +15
- img2( i, j, :) = img(i-15, j-15, :);
- end
- end
- img2 = uint8(img2);
- figure(1);
- image(img2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement