资源简介
利用MATLAB编程实现分形中计盒维数的方法。
代码片段和文件信息
function [nr] = boxcount(cvarargin)
%BOXCOUNT Box-Counting of a D-dimensional array (with D=123).
% [N R] = BOXCOUNT(C) where C is a D-dimensional array (with D=123)
% counts the number N of D-dimensional boxes of size R needed to cover
% the nonzero elements of C. The box sizes are powers of two i.e.
% R = 1 2 4 ... 2^P where P is the smallest integer such that
% MAX(SIZE(C)) <= 2^P. If the sizes of C over each dimension are smaller
% than 2^P C is padded with zeros to size 2^P over each dimension (e.g.
% a 320-by-200 image is padded to 512-by-512). The output vectors N and R
% are of size P+1. For a RGB color image (m-by-n-by-3 array) a summation
% over the 3 RGB planes is done first.
%
% The Box-counting method is useful to determine fractal proper
评论
共有 条评论