IMG_clipping_16s


Detailed Description


Functions

void IMG_clipping_16s (const short *restrict x, short rows, short cols, short *restrict r, short THRES_MAX, short THRES_MIN)


Function Documentation

void IMG_clipping_16s ( const short *restrict  x,
short  rows,
short  cols,
short *restrict  r,
short  THRES_MAX,
short  THRES_MIN 
)

Description:
This function truncates elements of an input image to user defined maximum and minimum values. Each input and output pixel is 16-bit signed and the size of the matrix is defined by the input dimension parameters "rows" and "cols".
The output matrix has the same size as the input matrix and each pixel is clipped to the user defined minimum or maximum values if is less than the minimum or greater than the maximum respectively. Otherwise, the pixel is passed to the output unchanged.
Parameters:
x Input image of size cols-by-rows
rows Height of the input image
cols Width of the input image
r Output image pointer
THRES_MAX User-defined MAX threshold value
THRES_MIN User-defined MIN threshold value
Algorithm:
The natural C implementation has no restrictions. The optimized intrinsic C code has restrictions as noted in Assumptions below.
Assumptions:
  • The input and output arrays should not overlap
  • The input and output arrays must be 64-bit aligned
  • The THRES_MAX parameter must be greater than or equal to THRES_MIN
  • The number of image pixels (cols x rows) must be a multiple of 8
Implementation Notes:
  • This code is fully interruptible
  • This code is compatible with C66x processors
Benchmarks:
See IMGLIB_Test_Report.html for cycle and memory information.


Copyright 2012, Texas Instruments Incorporated