Over a very broad range of scales (like, from the scale of 10km down to the scale of 1mm) the number of boundary pixels of a natural shape like an island increases according to a power law as you increase the resolution.
This means that your approach doesn’t give you an objective value because it depends so strongly on the resolution.
This way of computing the length of a boundary leads to the concept of box-counting dimension. When you increase the resolution of the pixel grid, you’ll get a larger number of pixels on the boundary. Keep refining the grid many times. Graph the log of the total number of pixels against the log of the number of boundary pixels. The box counting dimension is the slope of that graph.
Why would we call this “dimension”? Because if you do this to a line, the slope is 1, and if you do it to a square, the slope is 2.
Over a very broad range of scales (like, from the scale of 10km down to the scale of 1mm) the number of boundary pixels of a natural shape like an island increases according to a power law as you increase the resolution.
This means that your approach doesn’t give you an objective value because it depends so strongly on the resolution.
This way of computing the length of a boundary leads to the concept of box-counting dimension. When you increase the resolution of the pixel grid, you’ll get a larger number of pixels on the boundary. Keep refining the grid many times. Graph the log of the total number of pixels against the log of the number of boundary pixels. The box counting dimension is the slope of that graph.
Why would we call this “dimension”? Because if you do this to a line, the slope is 1, and if you do it to a square, the slope is 2.
More information: https://en.wikipedia.org/wiki/Fractal_dimension?wprov=sfla1