Region of Interest Processing • Process image only in the predefined area. • The predefined area is called “Region Of Interest” (ROI). • Function is the same as before but applied to only ROI.
ROI Selection: MATLAB • Command: roipoly • Syntax: roipoly(im); roipoly(im, [x 0 x 1 …xm], [y 0 y 1 …ym]; • im : input image • (x 0, y 0), (x 1, y 1), …, (xm, ym) : coordinate of the polygon covering region of interest. • E. g. roi = roipoly(im, [60 100 60], [40 40 80 80]);
Mask for ROI • Binary image with the white (1) indicating ROI. Mask coordinate: (222, 21) (272, 21) (300, 75) (270, 121) (221, 121) (191, 75) http: //www. mathworks. com/access/helpdesk/help/toolbox/images/roipoly. html
ROI Filtering: MATLAB • Command: roifilt 2 • Syntax: roifilt 2(filter, image, roi); • filter : 2 D linear filter • image : input image • roi : region of interest (1: ROI, 0: not ROI) TRY !!
Effect of ROI Filtering ROI at this coin • Unsharp masking in ROI. http: //www. mathworks. com/access/helpdesk/help/toolbox/images/roifilt 2. html
ROI using Thresholding • ROI dapat dibuat dengan menggunakan thresholding. • Misal jika nilai pixel > 128 maka logika ROI di pixel tsb bernilai 1, dan jika nilai pixel <128 maka logika ROI di pixel tsb bernilai 0. s = size(greencocoon); cocoon_ROI = greencocoon; for i=1: s(1, 2) %x for j=1: s(1, 1) %y if greencocoon(j, i) < 128 cocoon_ROI(j, i) = 0; end if greencocoon(j, i) > 128 cocoon_ROI(j, i) = 1; end end cocoon_ROI = logical(cocoon_ROI); cocoon_result = roifilt 2(HPF, greencocoon, cocoon_ROI);
Bagi yang Muslim dipersilakan sholat zhuhur dulu. Kuliah dimulai pukul 12: 10. Terima Kasih