The fractal dimension parameter calculates a value that varies between 1 and 2 and describes the roughness of the biofilm boundary between foreground and background pixel in a cross-section at height z. Higher values of the fractal dimension parameter indicate a rougher biofilm boundary. Please help me in calculating this fractal dimension.