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

조회 수: 3 (최근 30일)
Gowsalya Arumugam
Gowsalya Arumugam 2014년 3월 24일
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