You are here : matlabImage Processingqtgetblk

qtgetblk() - Image Processing

[vals, r, c] = qtgetblk(I, S, dim) returns
in vals an array containing the dim-by-dim blocks
in the quadtree decomposition of I. S is
the sparse matrix returned by qtdecomp; it contains
the quadtree structure. vals is a dim-by-dim-by-k array,
where k is the number of dim-by-dim blocks
in the quadtree decomposition; if there are no blocks of the specified
size, all outputs are returned as empty matrices. r and c are
vectors containing the row and column coordinates of the upper left
corners of the blocks.[vals, idx] = qtgetblk(I, S, dim) returns
in idx a vector containing the linear indices of
the upper left corners of the blocks.


Syntax

[vals, r, c] = qtgetblk(I, S, dim)[vals, idx] = qtgetblk(I, S, dim)


Example

I = [1    1    1    1    2    3    6    6
     1    1    2    1    4    5    6    8
     1    1    1    1   10   15    7    7
     1    1    1    1   20   25    7    7
    20   22   20   22    1    2    3    4
    20   22   22   20    5    6    7    8
    20   22   20   20    9   10   11   12
    22   22   20   20   13   14   15   16];
 
 S = qtdecomp(I,5);

[vals,r,c] = qtgetblk(I,S,4)


Output / Return Value


Limitations


Alternatives / See Also


Reference