How to find the fractal dimension of the image?why do we need it?

3 次查看(过去 30 天)
I need to find the features of the image in which i need to find the fractal dimension..i need to known how to find it and is i need to segment the image before i find fractal dimension.below is the code i have taken from web can i use this... below is the image to be processed </matlabcentral/answers/uploaded_files/10293/7c2m.jpg>
if true
% FRACTDIM Compute the fractal dimension of an image
%
% D = fractdim(IMAGE)
%
% Calculates the fractal dimenstion (box-counting method) of a black and
% white edge image. function D=fractdim(IMAGE) [M,N]=size(IMAGE); i=mod(M,4); j=mod(N,4); IMAGE(M+4-i,:)=zeros(1,N); IMAGE(:,N+4-i)=zeros(M+4-i,1); [i,j]=size(IMAGE);
if M > N r=M; else r=N; end
D=log(sum(reshape(IMAGE,i*j,1)))/log(r); end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Fractals 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by