I need some help,(i.e) my image is 192x192, i need to divide it into 3x3,and from each 3x3 block,by taking center pixel value as threshold, i need to compare with other neighbouring 8 pixel values, if that value is less than threshld, put 0, else 1
Mostra commenti meno recenti
x=imread('192x192' image); g=mat2tiles(x,[3,3]); f=cellfun(..............)% i need ur help plzzzzzzz
Risposta accettata
Più risposte (1)
Teja Muppirala
il 30 Ago 2016
Modificato: Teja Muppirala
il 30 Ago 2016
If you have the Image Processing Toolbox, you can use BLOCKPROC , which is a general function for block processing.
x = randi(99, 192,192); % Sample data
out = blockproc(x, [3 3], @(I)I.data >= I.data(2,2)) % Is the block data greater than the middle element?
Categorie
Scopri di più su Neighborhood and Block Processing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!