1

I have such a grid square disk. Every grid represents a pixel. My aim is to most accurately aprroximate this disk as a circle (max from inside). Radius of the circle should be 1 so I have to define a x-y plane whose minimum and maximum values -1, +1 respectively. So pixel 35 is the origin (0,0). By the way I don't want to draw a circle, I just need such a circle which gives me the coordinates of every single pixel.

For example: for pixel 3, it should give me a coordinate approximately (0 , 0.8). I can define such a circle, but I am not sure about coordinates. I don't ask any code but some tips or advices would be appreciated. I am also using emgucv library for this project. Should I define this coordinates from scratch or is there any pre-defined class or something that speed me up.

thanks

enter image description here

4

1 回答 1

2

要计算像素到原点相对于圆半径的距离,您只需要半径即可。为此,您可以通过“磁盘”的(四分之一)周界并计算最小/最大距离(根据您的需要)。结果是圆的半径

要获得像素的相对距离,请计算像素到原点的距离并将其除以上述测量的半径

于 2012-06-08T15:34:48.540 回答