f



dividing an iamge into blocks and storing using indexing

i want to divide an image into blocks  and store each block with block location in the image.for example
image=[1     2     3     4;
           5     6     7     8; 
           9    10    11   12; 
           13  14     15  16];divide it into blocks of size (2 x 2)
g(1,1)=[1 2;                                         g(1,2)=[3  4; 
            5 6];      //block(1,1)                              7 8];  //block(1,2) 
                                                              same row of block but different coloum
            

g(2,1)=[9 10;                                      g(2,2)=[11 12;
            13 14];   //block(2,1)                            15 16];   //block(2,1)
                                                              same coloum of block but different row
0
kamran
3/29/2010 5:22:02 AM
comp.soft-sys.matlab 210402 articles. 11 followers. lunamoonmoon (258) is leader. Post Follow

2 Replies
906 Views

Similar Articles

[PageSpeed] 42

"kamran javed" <kamranpieas@gmail.com> wrote in message <hopddq$3ac$1@fred.mathworks.com>...
> i want to divide an image into blocks  and store each block with block location in the image.for example
> image=[1     2     3     4;
>            5     6     7     8; 
>            9    10    11   12; 
>            13  14     15  16];divide it into blocks of size (2 x 2)
> g(1,1)=[1 2;                                         g(1,2)=[3  4; 
>             5 6];      //block(1,1)                              7 8];  //block(1,2) 
>                                                               same row of block but different coloum
>             
> 
> g(2,1)=[9 10;                                      g(2,2)=[11 12;
>             13 14];   //block(2,1)                            15 16];   //block(2,1)
>                                                               same coloum of block but different row

stuff already available in the FEX...

http://www.mathworks.com/matlabcentral/fileexchange/14801

us
0
us
3/29/2010 5:29:04 AM
kamran javed wrote:
> i want to divide an image into blocks  and store each block with block 
> location in the image.for example
> image=[1     2     3     4;
>           5     6     7     8;           9    10    11   12;           
> 13  14     15  16];divide it into blocks of size (2 x 2)

blkproc() if your processing doesn't need to know what the coordinates 
are of the submatrix that you are processing.
0
Walter
3/29/2010 5:33:09 AM
Reply: