(This question was already asked on Stack Overflow under the tags Matlab/Octave/Signal-processing/Image-processing, but I am reposting it here following the advice of one user that this site may be a more appropriate forum for such questions.)
Is it common/useful to generate an anti-aliased boolean mask for CCD image integration purposes ?
Let's imagine that I want to integrate the light that strikes a given area of a CCD sensor. The boundaries of this area correspond to physical coordinates that have no obligation to coincide exactly with the pixels of my CCD sensor.
In Matlab/Octave/(or even Scientific Python), the common algorithm used for integrating such an area is to define a boolean mask using a logical operation on an array, such as:
mask = R < radius;
(where 'R', and therefore 'mask', are 2D arrays and 'radius' is a float). Such a mask has values of 0 or 1.
I can then integrate the pixels that are comprised within the boundaries of my area by summing the masked image:
integrated_signal = sum(sum(mask.*image));
(where 'image' is the output of the CCD sensor, a 2D array with U16 values for instance).
However, mathematically speaking, nothing would prevent me from defining a continuous-valued mask, that is, a mask whose pixels could take any value between 0 and 1. Physically, this means that I could integrate portions of pixels. I could even compute such a mask using an anti-aliasing algorithm in order to create better approximations of non-square-friendly shapes such as circles (for integrating a signal with revolution symmetry, let's say).
My question to digital imaging geeks is the following: Is it standard practice to define such anti-aliased mask for integration purposes of imaging sensors ? Is it useful (as I suspect), or does it produce physically irrelevant results ?