Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- WSTĘP
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- clc
- clear all
- close all
- imfinfo('lena.jpg');
- imfinfo('lena.bmp');
- jpg = imread('lena.jpg');
- bmp = imread('lena.bmp');
- figure(1)
- imshow(jpg)
- figure(2)
- imshow(bmp)
- figure(3)
- newmap = rgb2gray(jpg)
- imshow(newmap)
- imwrite(newmap,'lena_gray.bmp');
- figure(4)
- colormap gray
- mesh(newmap)
- figure(5);
- plot(bmp(10,: ))
- figure(6);
- plot(bmp(:,10 ))
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- OBRAZY INDEKSOWANE
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- clc
- clear all;
- close all;
- lena = imread('lena_gray.bmp');
- [X, map] = gray2ind(lena, 256);
- figure(1)
- imshow(X, map);
- colormap turbo;
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- SYSTEMY (MODELE) BARW
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- clc
- clear all
- close all
- lena = imread('lena.bmp');
- R = lena(:,:,1); G = lena(:,:,2); B = lena(:,:,3);
- figure(1);
- subplot(2,2,1);
- imshow(lena);
- title('Oryginal');
- subplot(2,2,2);
- imshow(R);
- title('R');
- subplot(2,2,3);
- imshow(G);
- title('G');
- subplot(2,2,4);
- imshow(B);
- title('B');
- lenahsv = rgb2hsv(lena);
- R = lenahsv(:,:,1); G = lenahsv(:,:,2); B = lenahsv(:,:,3);
- figure(2);
- subplot(2,2,1);
- imshow(lenahsv);
- title('Oryginal');
- subplot(2,2,2);
- imshow(R);
- title('R');
- subplot(2,2,3);
- imshow(G);
- title('G');
- subplot(2,2,4);
- imshow(B);
- title('B');
- lenaycbcr = rgb2ycbcr(lena);
- R = lenaycbcr(:,:,1); G = lenaycbcr(:,:,2); B = lenaycbcr(:,:,3);
- figure(3);
- subplot(2,2,1);
- imshow(lenaycbcr);
- title('Oryginal');
- subplot(2,2,2);
- imshow(R);
- title('R');
- subplot(2,2,3);
- imshow(G);
- title('G');
- subplot(2,2,4);
- imshow(B);
- title('B');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement