Roundness VS Circularity
Roundness and circularity both give a number between 0 and 1. Both are only 1 for a perfect circle. And both go to zero when you give it an infinitely long line.
Circularity
Circularity is the difference between area and perimeter. If the object is a circle the area to perimeter is maximum (1)
This is done using both the Area and Perimeter to calculate the squared radius. Then dividing the 2 be each other.
Via Area
Via Perimeter
Resulting in
Roundness
Roundness is based on the relation between the enclosing circle and the object. It calculates the area of both and divided them.
This means roundness is more focused if the contours covers a perfect area and less if the perimeter is bumpy or not.
Difference with an Oval
Lets take an oval with one radius twice the lenght of the other. So \(r_1 = 2 r_2\)
Roundness Enclosing circle has radius of the biggest radius \(2 r_2\). Meaning the area would be \((2 r_2)^2 \pi\). The area of the oval would be \(r_1 r_2 \pi = (2 r_2) r_2 \pi\)
The roundness would be
Circularity The area stays the same. The perimeter
Make circularity
Difference with an dented circle
Lets take a perfect circle and remove a pizza slice of 1 degree (you know what you do at fun math parties).
The area will be \(\frac{359}{360} r^2 \pi\)
The enclosing circle will be \(r^2 \pi\)
The roundness would now be \(\frac{359}{360}\)
The perimeter will now be \(\frac{359}{360} 2 r \pi + 2 r\)
So the circularity will be
Conclusion
Circularity is great for quantifying how smooth a surface is. Where roundness is great for quantifying how much it overlaps with a circle