0

I have an image which I want to extract the pixels of the specific part of that. This part is a quarter circle, and my desire is to obtain the pixels of that.

I have the coordinates of the center and points which the lines connected to the circle. How is it possible to extract one quarter and ignore other parts?

Majid R
  • 1
  • 1

1 Answers1

2

The disk has the equation (X-Xc)²+(Y-Yc)²≤R².

The half planes meeting at the center have equations c(X-Xc) + s(Y-Yc)≥0 where c and s are the cosine and sine of the angle.

Hence, scan the image (or just the bounding box of the circle) and consider the pixels (X, Y) such that the three constraints are satisfied.