I am trying to realize the daugman algorithm in java code. While reviewing the formula I found a line integral with a mid point and a radius as parameters. Now I am trying to understand how to calculate this integral. $$ \oint\limits_{x0, y0, r}^{} \frac{I(x,y)}{2πr} ds $$ (x0,y0) is the center and r the radius. I(x,y) is the Image with pixelvalues. Can anyone explain how to calculate this?
Asked
Active
Viewed 35 times
0
-
2(1) This is a math (rather than Mthematica) question, hence voting to redirect to math.SE (2) I would parametrize the circle by theta, so the computation becomes (after removing constant factor) integral of I(theta) dtheta (since ds=r*dtheta). I is constant on each square raster so it becomes a matter of figuring out which rasters are intersected by the circle, and the arc length of intersection inside each such raster. – Daniel Lichtblau Nov 14 '20 at 17:03
-
@DanielLichtblau thanks. Am I understanding it right, that I can sum up all pixelvalues from pixels, which lay on the border of the circle with mid (x0,y0) and radius r? – Nov 14 '20 at 19:05
-
It is a weighted sum of those pixel values, the weights being the arc lengths that intersect each such pixel. – Daniel Lichtblau Nov 14 '20 at 21:08
1 Answers
0
$$ \mathop{\oint}_{s(t)=(x_0+i y_0)+re^{it}}\frac{I(x,y)}{2\pi r}ds=\\ \frac{1}{2\pi r}\int_0^{2\pi} I\bigg(g(t),h(t)\bigg)\sqrt{(g')^2+(h')^2}dt $$ where $g(t)=\text{Re}[s(t)]$ and $h(t)=\text{Im}[s(t)]$.
Dominic
- 440