Routine to calculate the ratio between the total sum of the perimeters and the total sum of the areas of the white structures of a binary image