1 / 23

Pengolah Citra Digital 2

Pengolah Citra Digital 2. Citra Gray & RGB. Gray. Red. Green. Blue. Definisi Citra Digital. 12. 28. 10. 155. 67. 0. 0. 0. 0. 255. 0. 127. 0. 0. 0. 255. 127. 0. 0. 0. 0. Definisi Citra Digital. Image matrix. Screen. Proses Digitalisasi. I ( x , y ). I ( i, j ).

shiri
Download Presentation

Pengolah Citra Digital 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Pengolah Citra Digital 2

  2. Citra Gray & RGB Gray Red Green Blue

  3. Definisi Citra Digital ... 12 28 10 ... 155 67 ... ...

  4. 0 0 0 0 255 0 127 0 0 0 255 127 0 0 0 0 Definisi Citra Digital Image matrix Screen

  5. Proses Digitalisasi I(x, y) I(i, j) DIGITALISASI (SCANNER)

  6. Sampling Citra Kontinyu I(x, y) Sampler

  7. Definisi Histogram

  8. MelihatInformasiGambar • imshow(‘coins.png’) • imfinfo(‘coins.png’) • Cobalahuntkgambar lain (pears.png, peppers.png, ataufotoanda)

  9. Menampilkan Histogram • Figure, imshow(‘coins.png’) • Figure, imhist(‘coins.png’) • Cobalahuntkgambar lain (pears.png, peppers.png, ataufotoanda)

  10. Ekstraksi R, G dan B • lenna = imread('lenna.jpg'); • r = lenna(:,:,1); • g = lenna(:,:,2); • b = lenna(:,:,3);

  11. Konversi ke Grayscale • bisa dengan fungsi bawaan Matlab: • gray = rgb2gray(lenna); • bisa disesuaikan dengan konstanta sendiri: • gray2 = .3*r + .2*g + .5*b;

  12. Pseudocoloring • Gambar grayscale bisa kita buat seoalh2 berwarna dengan pesudo color • Pseudocoloring dengan colormap • contoh: • figure, imshow(r), colormap(jet), colorbar

  13. Pseudocoloring

  14. Konversi ke Citra Biner • citra biner adalah citra yang hanya direpresentasikan nilai tiap pixelnya dalam satu bit (satu nilai binary) • nilai pixel 0 berati hitam • nilai pixel1 berarti putih • Konversi dilakukan dengan thresholding pada citra grayscale • threshold bisa dihitung atau sembarang • nilai pixel dibawah threshold jadi 0 • nilai pixel diatas threshold jadi 1

  15. Konversi ke Citra Biner • im = imread(‘japan.png’); • imgray = rgb2gray(im); • thresh = graythresh(imgray); • imbw = im2bw(imgray, thresh); • figure, imshow(imbw);

  16. Operasi Citra

  17. DeteksiTepi BW = edge(I) BW = edge(I,'sobel') BW = edge(I,'prewitt') BW = edge(I,'roberts') BW = edge(I,'log') BW = edge(I,'canny')

  18. Negasi • Negasiadalah proses pemetaannilai pixel suatucitra, yaitupadacitrabiner, pixel hitamdijadikanputihdanputihdijadikanhitam. Sedangkanpadacitra grayscale atauberwarna, nilaimaksimum pixel dikurangidengannilai pixel yang sedangdiproses. • a=imread('bunga.jpg'); • c=250-a; Negasi • figure,imshow(c)

  19. Improve Image Contrast • I = imread('pout.tif'); • imshow(I) • figure, imhist(I) • I2= histeq(I); • figure, imshow(I2) • figure, imhist(I2)

  20. Write the Image to a Disk File • imwrite (I2, 'pout2.png');

  21. Example • I = imread('rice.png'); • imshow(I) • background = imopen(I,strel('disk',15)); • figure, imshow(background) • I2 = imsubtract(I,background); • figure, imshow(I2) • I3 = imadjust(I2); • figure, imshow(I3); • level = graythresh(I3); • bw = im2bw(I3,level); • figure, imshow(bw) • [labeled,numObjects] = bwlabel(bw,4); • numObjects • figure, imshow(labeled); • impixelregion • pseudo_color = label2rgb(labeled, @spring, 'c', 'shuffle'); • figure, imshow(pseudo_color); • graindata = regionprops(labeled,'basic') • area51 = graindata(51).Area

  22. Rotating an Image • I = imread('circuit.tif'); • J = imrotate(I,35,'bilinear'); • imshow(I) • figure, imshow(J)

More Related