Prev: hyperbolic interpolation
Next: Batch job
From: ImageAnalyst on 10 Mar 2010 21:52 On Mar 10, 6:41 pm, "yusuf awal" <awaludin...(a)yahoo.com> wrote: > Hi Przemo, > Thanks for your suggestion. unfortunately I don't have imfilter and roifilt2 function, since I am using Matlab R2007a. any alternative for that? > > thanks > > ysf ------------------------------------------------------------------------------------------------------ Depends on what you want to do. Masking can be something as simple as setting a region to zero if you're going to do something like thresholding. Like this: matrixX = uint8(254 * rand(250, 52)+1) row1 = 60; row2 = 90; col1 = 2; col2 = 7; matrixX(row1:row2, col1:col2) subplot(1,2, 1); image(matrixX); set(gcf, 'Position', get(0,'Screensize')); % Maximize figure. title('Original 250x52 Array'); maskedMatrixX = matrixX; % Make it a copy, at first. % Now do the masking - make it zero in the mask region. maskedMatrixX(row1:row2, col1:col2) = 0; subplot(1,2, 2); image(maskedMatrixX); % axis 'square'; title('Masked Array');
From: yusuf awal on 13 Mar 2010 00:14
Many thanks ImageAnalyst, I understand how to create a mask now. cheers ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <eb829c2d-0222-45a8-b515-bdd65f26e2c4(a)z35g2000yqd.googlegroups.com>... > On Mar 10, 6:41 pm, "yusuf awal" <awaludin...(a)yahoo.com> wrote: > > Hi Przemo, > > Thanks for your suggestion. unfortunately I don't have imfilter and roifilt2 function, since I am using Matlab R2007a. any alternative for that? > > > > thanks > > > > ysf > ------------------------------------------------------------------------------------------------------ > Depends on what you want to do. Masking can be something as simple as > setting a region to zero if you're going to do something like > thresholding. Like this: > > matrixX = uint8(254 * rand(250, 52)+1) > row1 = 60; > row2 = 90; > col1 = 2; > col2 = 7; > matrixX(row1:row2, col1:col2) > subplot(1,2, 1); > image(matrixX); > set(gcf, 'Position', get(0,'Screensize')); % Maximize figure. > title('Original 250x52 Array'); > maskedMatrixX = matrixX; % Make it a copy, at first. > % Now do the masking - make it zero in the mask region. > maskedMatrixX(row1:row2, col1:col2) = 0; > subplot(1,2, 2); > image(maskedMatrixX); > % axis 'square'; > title('Masked Array'); |