srujanangg
unread,May 30, 2012, 9:50:49 PM5/30/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi
By using blkproc command in matlab ,you can divide the image into number of nonoverlaping blocks.
B = blkproc(A,[m n],fun) processes the image A by applying the function fun to each distinct m-by-n block of A, padding A with 0's if necessary. fun is a function handle that accepts an m-by-n matrix, x, and returns a matrix, vector, or scalar y.
y = fun(x)
blkproc does not require that y be the same size as x. However, B is the same size as A only if y is the same size as x.
B = blkproc(A,[m n],[mborder nborder],fun) defines an overlapping border around the blocks. blkproc extends the original m-by-n blocks by mborder on the top and bottom, and nborder on the left and right, resulting in blocks of size (m+2*mborder)-by-(n+2*nborder). The blkproc function pads the border with 0's, if necessary, on the edges of A. The function fun should operate on the extended block.
The line below processes an image matrix as 4-by-6 blocks, each having a row border of 2 and a column border of 3. Because each 4-by-6 block has this 2-by-3 border, fun actually operates on blocks of size 8-by-12.
B = blkproc(A,[4 6],[2 3],fun)
B = blkproc(A,'indexed',...) processes A as an indexed image, padding with 0's if the class of A is uint8 or uint16, or 1's if the class of A is double.