| Image Processing Toolbox | ![]() |
Set block values in quadtree decomposition
Syntax
Description
J = qtsetblk(I,S,dim,vals) replaces each dim-by-dim block in the quadtree decomposition of I with the corresponding dim-by-dim block in vals. 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.
Class Support
I can be of class logical, uint8, uint16, or double. S is of class sparse.
Remarks
The ordering of the blocks in vals must match the columnwise order of the blocks in I. For example, if vals is 4-by-4-by-2, vals(:,:,1) contains the values used to replace the first 4-by-4 block in I, and vals(:,:,2) contains the values for the second 4-by-4 block.
Example
This example continues the qtgetblock example.
newvals = cat(3,zeros(4),ones(4)); J = qtsetblk(I,S,4,newvals) J = 0 0 0 0 2 3 6 6 0 0 0 0 4 5 6 8 0 0 0 0 10 15 7 7 0 0 0 0 20 25 7 7 1 1 1 1 1 2 3 4 1 1 1 1 5 6 7 8 1 1 1 1 9 10 11 12 1 1 1 1 13 14 15 16
See Also
| qtgetblk | radon | ![]() |