- Description:
- Computes the mean pixel value and the standard deviation of the pixels in the input image (which has a dimension width and height).
- Method:
- The mean and standard deviations are computed using the following equations:
fmean = (sum(src(x,y)) / (width * height)
fstddev = sqrt( (sum(src(x,y)^2) - fmean^2) / (width * height) )
- Parameters
-
[in] | src[] | Pointer to array containing input image (UQ8.0) |
[in] | src_addr[] | Pointer to structure containing dimensional information of src |
[out] | fmean | Parameter corresponding to the mean of the image |
[out] | fstddev | Parameter corresponding to the standard deviation of the image |
[in,out] | pixelsProcessed | Parameter corresponding to the number of pixels already processed |
[in,out] | fcurrentSum | Parameter corresponding to the sum of pixels already processed |
[in,out] | fcurrentSqSum | Parameter corresponding to the square of the sum of pixels already processed |
- Assumptions:
- I/O buffer pointers are assumed to be not aliased.
- PARAMETER INITIALIZATION:
- pixelsProcessed, fcurrentSum, and fcurrentSqSum are exposed on the API to aid in block-based processing.
- They shall be initialized to zero before processing each image.
- If a user wants to divide processing of the image into smaller blocks, these parameters should only be set to zero before processing the first block, and should not be modified in-between blocks, as they maintain the state of the intermediate results within the image processing.
- Performance Considerations:
- For best performance, the following parameter settings are recommended:
- Set width equal to stride
- Set all stride values to a multiple of 16
- Set all width values to a multiple of 16