Thoughts on a project

Hello,

I am trying to achieve the following result using opencv and computer vision techniques. Kindly suggest me ideas on how can we possibly solve the problem:

I am trying to draw curves around a circle to understand the number of pixels it is taking to convert from white circle to black background. I.e imaging a picture of a white circle with black with noise. Now, I want to draw two circles, the inner circle would represent the region until the point where perfect white circle is observed, the outer circle is the region from where perfect black background is observed. I.e., I want to ascertain the pixel range required to convert from perfect white to perfect black. In other words, we can say that I am trying to understand how many pixels are consumed by noise.

Kindly suggest any ideas if you have any.