245x Filetype PPTX File size 2.40 MB Source: setiawanhadi.unpad.ac.id
MATLAB 2015a • Image Processing and Computer Vision –Use graphical tools to visualize and manipulate images and video. Connect to hardware and develop new ideas using libraries of reference-standard algorithms. • Products: –MATLAB –Computer Vision System Toolbox –Image Acquisition Toolbox –Image Processing Toolbox –Parallel Computing Toolbox –Signal Processing Toolbox –Statistics and Machine Learning Toolbox PCD-ML Pengolahan Citra Menggunakan MATLAB Images in Matlab • Matlab is optimised for operating on matrices • Images are matrices! • Many useful built-in functions in the Matlab Image Processing Toolbox • Very easy to write your own image processing functions • 3 PCD-ML Pengolahan Citra Menggunakan MATLAB Loading and displaying images >> I=imread('mandrill.bmp','bmp'); % load image image format as a string Matrix with image filename as a string image data >> image(I) % display image >> whos I Name Size Bytes Class I 512x512x3 786432 uint8 array Grand total is 786432 elements using 786432 bytes Matlab can only Display the Dimensions of I (red, perform arithmetic left half of the green and blue intensity operations on data mandrill with class double! image information) PCD-ML Pengolahan Citra Menggunakan MATLAB Ekstraksi Color Channel %----------membaca dan isi variabel----------------¬ gambar=imread(‘lena.jpg’); red=gambar; green=gambar; blue=gambar; %----------memproses per channel ---------------¬ red(:,:,2)=0; red(:,:,3)=0; green=(:,:,1)=0; green=(:,:,3)=0; blue(:,:,1)=0; blue(:,:,2)=0; %----------menampilkan gambar----------------¬ imshow(gambar) imshow(red) imshow(green) imshow(blue) PCD-ML Pengolahan Citra Menggunakan MATLAB Konversi RGB ke Gray %------- Image Processing Toolbox ------ gambar=imread(‘lena.jpg’); gray=rgb2gray(gambar); imshow(gray); %------- Conventional ------ gray2 = 0.2989 * rgb(:,:,1) +0.5870 * rgb(:,:,2) + 0.1140 * rgb(:,:,3); imshow(gray2); PCD-ML Pengolahan Citra Menggunakan MATLAB
no reviews yet
Please Login to review.