Modified Haussdorf Fractal Dimension
% 150507: Reza Farrahi Moghaddam (imriss@ieee.org) (May 7th, 2015)
% Modified Haussdorf Fractal Dimension
%
% Main features:
% 1. Valuing both White and Black pixels,
% 2. Probabilistically discarding boxes of less value.
%
% SYNTAX: [D, D_old, I, D_ref] = hausDim_Modified_R(I, method_flag)
% I: Input image (White pixels are assumed as information),
% method_flag: 'edg' to use edge of I, 'ske' to use skeleton of I, 'pre' to preprocess I, 'full' to preprocess and then use the edge and skeleton.
% D: Modified Haussdorf Fractal Dimension of I after preprocessing (if any),
% D_old: Haussdorf Fractal Dimension of I after preprocessing (if any),
% D_ref: Haussdorf Fractal Dimension of the unprocessed I,
% I: Processed output of I.
%
% Based on: http://www.mathworks.com/matlabcentral/fileexchange/30329-hausdorff--box-counting--fractal-dimension
%
% Requires:
% 1. Hausdorff (Box-Counting) Fractal Dimension (http://www.mathworks.com/matlabcentral/fileexchange/30329-hausdorff--box-counting--fractal-dimension)
% 2. inpaint_nans (http://www.mathworks.com/matlabcentral/fileexchange/4551-inpaint-nans)
% 3. Universal Color to Gray Conversion (http://www.mathworks.com/matlabcentral/fileexchange/27578-universal-color-to-gray-conversion)
%
% Examples:
% I = mat2gray(double(imread('http://4.bp.blogspot.com/-aHCfmDvyzFU/Un_U-Neo_GI/AAAAAAAAGpQ/DWzjztkh4HM/s1600/sierpinski.png')));
% [D, D_old, I, D_ref] = hausDim_Modified_R(I, 'edg'); % D = 1.5843, D_ref = 1.5999
%
% I = mat2gray(double(imread('http://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Sierpinski_carpet.png/480px-Sierpinski_carpet.png')));
% [D, D_old, I, D_ref] = hausDim_Modified_R(I, 'edg'); % D = 1.6794, D_ref = 1.8811
%
% I = mat2gray(double(imread('http://www.math.upenn.edu/~pstorm/images/round_Sierpinski_carpet.png')));
% [D, D_old, I, D_ref] = hausDim_Modified_R(I, 'edg'); % D = 1.6263, D_ref = 1.7129
%
Cita come
Reza Farrahi Moghaddam (2025). Modified Haussdorf Fractal Dimension (https://www.mathworks.com/matlabcentral/fileexchange/50790-modified-haussdorf-fractal-dimension), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- Image Processing and Computer Vision > Image Processing Toolbox > Image Filtering and Enhancement > Morphological Operations >
- MATLAB > Graphics > Images > Modify Image Colors >
Tag
Riconoscimenti
Ispirato da: Hausdorff (Box-Counting) Fractal Dimension, inpaint_nans, Universal Color to Gray Conversion
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.