[vals,r,c] = qtgetblk(I,S,dim)
returns blocks of size dim-by-dim from image
I with quadtree decomposition S. The function returns
the block values in vals and the row and column coordinates of the upper
left corner of the blocks in r and c.
Perform a quadtree decomposition of the image, specifying a threshold of 5. qtdecomp splits a block if the maximum value of the block elements minus the minimum value of the block elements is greater than the threshold.
Data Types: single | double | int16 | uint8 | uint16 | logical
Quadtree structure, specified as a sparse matrix. If
S(m,n) is nonzero, then the
coordinate (m,n) is the upper left corner of a block in
the decomposition, and the size of the block is given by
S(m,n). You can get a quadtree
structure by using the qtdecomp function.
Block values, returned as a
dim-by-dim-by-k array, where
k is the number of dim-by-dim blocks
in the quadtree decomposition. If the quadtree decomposition contains no blocks of the
specified size, then vals is returned as an empty matrix.
The ordering of the blocks in vals matches the column-wise order of
the blocks in I. For example, if vals is 4-by-4-by-2,
then vals(:,:,1) contains the values from the first 4-by-4 block in
I, and vals(:,:,2) contains the values from the second
4-by-4 block.
Row coordinates of the upper left corners of blocks, returned as a
k-element column vector of positive integers, where k is
the number of dim-by-dim blocks in the quadtree
decomposition. If the quadtree decomposition contains no blocks of the specified size, then
r is returned as an empty matrix.
Column coordinates of the upper left corners of blocks, returned as a
k-element column vector of positive integers, where k
is the number of dim-by-dim blocks in the quadtree
decomposition. If the quadtree decomposition contains no blocks of the specified size, then
c is returned as an empty matrix.
Linear indices of upper left corners of blocks, returned as a
k-element column vector of positive integers, where k is
the number of dim-by-dim blocks in the quadtree
decomposition. If the quadtree decomposition contains no blocks of the specified size, then
idx is returned as an empty matrix.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.