Products & Services Solutions Academia Support User Community Company

Learn more about Image Processing Toolbox   

bestblk - Determine optimal block size for block processing

Syntax

siz = bestblk([m n],k)
[mb,nb] = bestblk([m n],k)

Description

siz = bestblk([m n],k) returns, for an m-by-n image, the optimal block size for block processing. k is a scalar specifying the maximum row and column dimensions for the block; if the argument is omitted, it defaults to 100. The return value siz is a 1-by-2 vector containing the row and column dimensions for the block.

[mb,nb] = bestblk([m n],k) returns the row and column dimensions for the block in mb and nb, respectively.

Algorithm

bestblk returns the optimal block size given m, n, and k. The algorithm for determining siz is

The same algorithm is then repeated for n.

Examples

siz = bestblk([640 800],72)

siz =

    64    50

See Also

blockproc

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS