Message Boards Message Boards

Measuring the fractal dimension of a tree photo

Posted 7 years ago
POSTED BY: Szabolcs Horvát
9 Replies

I know I'm only 7 years late, but I was curious the fractal dimension of different Persian carpets, so I used your tool on them. Here's some of the best results I got:

1st Rug

2nd Rug

3rd Rug

This is amazing that it worked and it's actually telling me the different dimensions of these carpets. I was curious how to improve the performance of the tool because for most rugs, I only get 1 or 2 elements for the seq. Also, the first couple frames tend to look just random. Any ideas on how I can tweak my images to get better performance / more frames?

Secondly, I'm wondering how accurate the dimensions are. Why do all rugs fit the power law so perfectly? Is that just because they're actually fractals or because of the way the tool is drawing the boxes?

Again thank you for making this it's been a huge help to me and it is so cool!

Best, Willem

POSTED BY: Willem Nielsen

Thanks for sharing this sweet post, Szabolcs. It looks like you manage to snap a picture where the parallax is not messing up too much the computation.

Does it make sense to compare structures with similar fractal dimensions? What objects would we find with a dimensions around 1.85 like these trees?

POSTED BY: Matthias Odisio

This crop of the Amazon river gives 1.96.

enter image description here enter image description here

POSTED BY: Matthias Odisio

Thanks for the post Matthias! This is a beautiful example of a self-similar structure.

Unfortunately I only had time for a very quick test right now, but if we use more box sizes (a proper way would be to pad the image when necessary), we get a clearer picture about what is going on.

This river network is so dense that if we look at it from far enough, then it appears to fully cover the ground. It looks two-dimensional. But as we zoom in, the self-similarity becomes clear and the fractal nature emerges. Here's the scaling plot I got:

enter image description here

The horizontal axis is proportional to the number of boxes that the image was partitioned into. Thus a large number corresponds to a small box size.

There is a clear break in the middle of the curve. The slope of the curve is ~2 to the left of that break (i.e. for large boxes), which indicates that at this scale the object looks two-dimensional. The slope is ~1.5 to the right of that break (i.e. small boxes), which shows that it looks like a fractal at that scale. The power law is valid separately on both sides of the break.

To plot this, I was sloppy and simply cropped the image to {2580, 1810} to have many common divisors. I think a better way would be to pad the image with white pixels when it cannot be partitioned into an integer number of boxes. This way you can use an arbitrary box size.


If we could zoom in without limit, the exponent would become 1 when the rivers don't branch out anymore. They look like lines at this point. If we could zoom even more, the exponent would become 2 when the width of the rivers becomes visible.

POSTED BY: Szabolcs Horvát

This is so cool.

POSTED BY: Eduardo Serna

enter image description here - Congratulations! This post is now Staff Pick! Thank you for your wonderful contributions. Please, keep them coming!

POSTED BY: Moderation Team

Felicitation, very pedagogic André Dauphiné

POSTED BY: André Dauphiné

Nice! Thanks for sharing. I was already wondering if you had used BlockMap or Map[...Partition[...]], but well, you thought of both.

POSTED BY: Sander Huisman

Actually, I used a compiled version of Map + Partition when @Yode in the StackExchange chatroom reminded me of BlockMap. Strangely, their timing scales differently with problem size, but I haven't investigated in detail yet.

POSTED BY: Szabolcs Horvát
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract