Choosing number of subdivisions for approximating double integrals in context of image processing

22 Views Asked by At

I have a few double integrals that I have to approximate that are based on getting motion parameters from a sequence of images, and I have chosen to use Riemann sums for that purpose. These integrals are over the domain $R = [-w,w] \times [-h,h]$, where $2w$ and $2h$ are the image width and height respectively.

What would be an appropriate number of subdivisions $m$ and $n$ to choose to ensure that I can use code to evaluate the integrals in all cases? I am confused as we don't have access to all necessary values of $x_{ij}$ and $y_{ij}$ as $m$ and $n$ increase.

I was thinking of considering the image frames as my grids of values, but I don't know what the pixel widths and heights would be. I am not even sure if this is the correct approach for approximating the integrals, so please suggest if there are other appropriate approaches.

Here is one of the integrals that I am approximating:

$$\iint ((u-u_r)\beta - (v - v_r)\alpha)(-xy\beta + (y^2 + 1)\alpha) \ dxdy$$