Logo by mauxuam - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. April 19, 2024, 12:43:26 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Help with the Mass Radius method  (Read 1875 times)
0 Members and 1 Guest are viewing this topic.
clueso
Guest
« on: June 15, 2007, 11:11:28 AM »

Hello Everyone,

I am currently working on a project where I need to do extract the fractal dimension from greyscale images. I have some MATLAB code for running the mass radius method to computing the same.

the code basically starts from a fixed point(centre of image) and considers concentric circles with increasing radii (R).For each circle, the number of pixels which are "set" and which lie inside the circle are counted (N) and then finally the dimension if extracted from a log-log plot of N v.s R. However, I read in a paper that the number of pixels which are not set should also be counted but i am unsure as to how this data can be used.

If anyone has some good links on the mass-radius method or even some code/pseudocode and can pass it on, it would be a great help.

Thanks in advance.
Logged
lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #1 on: June 15, 2007, 05:47:53 PM »

some links from the ever-useful paul bourke, in rough order of perceived usefulness:

http://local.wasp.uwa.edu.au/~pbourke/fractals/multifrac/
http://local.wasp.uwa.edu.au/~pbourke/fractals/fracdim/
http://local.wasp.uwa.edu.au/~pbourke/fractals/compass/
Logged

Nahee_Enterprises
World Renowned
Fractal Senior
******
Posts: 2250


use email to contact


nahee_enterprises Nahee.Enterprises NaheeEnterprise
WWW
« Reply #2 on: June 16, 2007, 12:14:29 AM »

Hello Everyone, .....

Greetings and welcome to this Forum!!    smiley

It looks like Thomas Ludwig (lycium) has got you off to a good start with those links.  If you need some more references, let us know.


« Last Edit: June 16, 2007, 12:18:59 AM by Nahee_Enterprises » Logged

clueso
Guest
« Reply #3 on: June 18, 2007, 07:43:10 PM »

The references were quite helpful, but more importantly I discovered a bug in the program I was using and fixing that kind of took care of my problems tongue stuck out

But there is still a technical curiosity I have. The site by Bourke also mentions measuring the "mass" in a circle of a certain radius. But what is the best way to define the "mass" in an image? I am simply increasing the mass by 1 everytime I find a "set" pixel and I ignore the ones that are not set. This yields decent results than counting a set pixel as "2" and an unset one as "1" (the only other case I tried), but in case anyone has some better ideas I am keen to know.

Thanks for the help on my last query smiley

Logged
lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #4 on: June 19, 2007, 05:24:40 AM »

definitely count 1 as mass and 0 as not! wink

regarding the inside/outside counting, i think you can considerably improve the accuracy of this estimate, especially for small circles, if you consider sub-pixel converage. that is, if you have a set pixel which overlaps the circle boundary, consider the fractional area of the overlap instead of just 0 or 1. i worked out and simplified the equations for this some years ago using stokes' theorem, for drawing anti-aliased (or "blurred" as it is known on these forums wink) circles, and it was quite fast as you only need to compute it on the boundary.

of course, you can approximate this analytical answer to any degree of accuracy desired by simply increasing the resolution of your source image, which has the added benefit of giving a truer estimate of the actual "mass of the fractal". beyond this you can actually plot the fractal in a sub-pixel-correct manner and consider that weight in addition to the area-weighting above...


edit: sorry, i meant green's theorem; stokes' theorem is the next one up.
« Last Edit: June 19, 2007, 05:26:49 AM by lycium » Logged

Nahee_Enterprises
World Renowned
Fractal Senior
******
Posts: 2250


use email to contact


nahee_enterprises Nahee.Enterprises NaheeEnterprise
WWW
« Reply #5 on: June 19, 2007, 07:36:45 PM »

i worked out and simplified the equations for this some years ago using stokes' theorem,
for drawing anti-aliased (or "blurred" as it is known on these forums wink) circles.....

I do not mind the use of anti-aliasing, when it is done well.   wink
Just have a concern when an image from the M/J-Set has been blurred to the point of appearing as if it was a "flame" fractal.   cheesy

It all stems from my life of wearing glasses for near-sightedness (been that way since I was a young child).  I prefer things not to look like I was not using my corrective lenses.    grin

Logged

David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #6 on: August 02, 2010, 05:20:18 AM »

The references were quite helpful, but more importantly I discovered a bug in the program I was using and fixing that kind of took care of my problems tongue stuck out

But there is still a technical curiosity I have. The site by Bourke also mentions measuring the "mass" in a circle of a certain radius. But what is the best way to define the "mass" in an image? I am simply increasing the mass by 1 everytime I find a "set" pixel and I ignore the ones that are not set. This yields decent results than counting a set pixel as "2" and an unset one as "1" (the only other case I tried), but in case anyone has some better ideas I am keen to know.

Thanks for the help on my last query smiley



Maybe by "mass" he means somehow use the number of hits on a given pixel rather than simply counting a hit pixel as 1.
However you'd have to have a way of adjusting the range of hit counts so that equivalent results are acheived independantly of the number of total iterations (given a minimum number of iterations).
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Radius and angle-factors seperated Mandelbrot & Julia Set Krumel 2 2206 Last post August 21, 2010, 04:35:43 PM
by kram1032
Mass Hysteria Mandelbulb3D Gallery lenord 0 600 Last post December 31, 2011, 03:57:38 AM
by lenord
Damien Hirst and the temple of mass consumption Mandelbulb3D Gallery Sitting Duck 2 1188 Last post August 20, 2013, 11:32:34 PM
by Sitting Duck
Supermodulus radius generating superelipse shape (new) Theories & Research Alef 9 1587 Last post August 31, 2017, 11:58:17 AM
by Alef
2D Mandelbox: Separating radius of inversion from max radius Amazing Box, Amazing Surf and variations CozyG 2 5736 Last post August 23, 2017, 02:53:55 AM
by mclarekin

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.176 seconds with 24 queries. (Pretty URLs adds 0.01s, 2q)