I am working on getting coin diameter in pixels using OpenCV but I am not able to get perfect pixels diameter as it varies from 2- 6 pixels randomly by taking a image from same height. I am using HOughCircle method for coin detection. Is there any way by which pixels diameter always remain same from same height. it should not vary or any improvement.