0
$\begingroup$

I have a 2D mapping of some field that is parametrized by $x$ & $y$, $F(x,y)$. I want to integrate the values of the field that lie within a circle of radius $r$ and centered at $(x,y)$. How shall I formulate? I am interested in formulating the problem only. The following figure provides illustration.

enter image description here

Note: The field is a blackbox function so we cant evaluate integral directly.

$\endgroup$
  • $\begingroup$ Do you require subpixel accuracy ? $\endgroup$ – Yves Daoust May 7 at 13:33
  • $\begingroup$ @YvesDaoust Not really because the final measure shall be more or less an estimate $\endgroup$ – GENIVI-LEARNER May 7 at 16:49
  • 1
    $\begingroup$ Then average the pixels such that $(x-x_c)^2+(y-y_c)^2\le r^2$. $\endgroup$ – Yves Daoust May 7 at 16:52
  • $\begingroup$ Allright. If I have to have subpixel accuracy, how shall I go about then instead? $\endgroup$ – GENIVI-LEARNER May 7 at 21:43
  • $\begingroup$ You need to weigh the pixels on the outline with an estimate of the overlapped area. $\endgroup$ – Yves Daoust May 8 at 6:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.