Calculate distance from known inner diameter of coil, bobbin and detected image