Get perimeter of pixels around centre pixel
I am attempting to get a circle of pixels around a centre pixel. Ie, just like how FAST keypoint detector works, I want to get the perimeter pixels around it given a radius. However the math escapes me, I know theoretically how I could obtain it using trigonometry. Ie, I could use a for loop and iterate at 15 degrees. I know the triangle hypotenuse length is the radius, I know the angle.
Any advice how I could obtain a perimeter of pixels around a given pixel?
example image / drawing or such, please.
@berak please see the updated post
is your radius fixed ? (you could use a precalculated list of indices, and an offset point)
@berak I would prefer the radius be variable if possible.
isn't it a bresenham circle ?
I would second berak's suggestion about precalculating indices. As getting the list of points is time consuming, I would precalculate the indices for each radius.
This is especially useful if you want to make the operation a high number of pixels.