Search
Code Directory
ASP
ASP.NET
C/C++
CFML
CGI/PERL
Delphi
Development
Flash
HTML
Java
JavaScript
Pascal
PHP
Python
SQL
Tools
Visual Basic & VB.NET
XML
New Code
 dbForge Studio for PostgreSQL 2.3.212 HTMLPad 2020 16.2 WeBuilder 2020 16.2 Rapid CSS 2020 16.2 Rapid PHP 2020 16.2 C# HTML to PDF 2020.8.1 Flowrigami 1.0.0.1 Vue Injector 3.3 Spectrum Analyzer pro Live 2019 Devart Excel Add-in for HubSpot 2.1 RentALLScript - Airbnb clone 2.2 SuiteCRM Theme Customization 7.11.6 iScripts NetMenus 3.1 iScripts EasyIndex 2.2 iScripts EasySnaps 2.0
Top Code
Top Rated
 Uber Clone with Safety Measure Addons 2.0 Answers phpSoftPro 3.12 phpEnter 5.1. Quick Maps For Dynamics CRM 3.1 Single Leg MLM 1.2.1 Azizi search engine script PHP 4.1.10 Paste phpSoftPro 1.4.1 Extreme Injector 3.7 Deals and Discounts Website Script 1.0.2 Solid File System OS edition 5.1 Classified Ad Lister 1.0 Aglowsoft SQL Query Tools 8.2 Invoice Manager by PHPJabbers 3.0 ICPennyBid Penny Auction Script 4.0 PHP Review Script 1.0
boxcount 1.0
File ID: 84470

boxcount 1.0
File Size: 1.6 MB
 Submit Rating:
boxcount 1.0 Description
Description: BOXCOUNT Box-Counting of a D-dimensional array (with D=1,2,3).

The Box-counting method is useful to determine fractal properties of a
1D segment, a 2D image or a 3D array. If C is a fractal set, with fractal dimension DF < D, then the number N of boxes of size R needed to cover the set scales as R^(-DF). DF is known as the Minkowski-Bouligand dimension, or Kolmogorov capacity, or Kolmogorov dimension, or simply box-counting dimension.

[N, R] = BOXCOUNT(C), where C is a D-dimensional array (with D=1,2,3), 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.

BOXCOUNT(C,'plot') also shows the log-log plot of N as a function of R
(if no output argument, this option is selected by default).

BOXCOUNT(C,'slope') also shows the semi-log plot of the local slope DF = - dlnN/dlnR as a function of R. If DF is contant in a certain range of R, then DF is the fractal dimension of the set C.

The execution time depends on the sizes of C. It is fastest for powers
of two over each dimension.

Examples:

c = (rand(1,2048)<0.2);
boxcount(c);

c = randcantor(0.8, 512, 2);
boxcount(c);
figure, boxcount(c, 'slope');