Qualcomm FastCV Library
1.7.1
|
Functions | |
FASTCV_API void | fcvFilterMedian3x3u8 (const uint8_t *__restrict srcImg, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dstImg) |
Blurs an image with 3x3 median filter. | |
FASTCV_API void | fcvFilterMedian3x3u8_v2 (const uint8_t *__restrict srcImg, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dstImg, unsigned int dstStride) |
Blurs an image with 3x3 median filter. | |
FASTCV_API void | fcvFilterGaussian3x3u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst, int blurBorder) |
Blurs an image with 3x3 Gaussian filter. | |
FASTCV_API void | fcvFilterGaussian3x3u8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride, int blurBorder) |
Blurs an image with 3x3 Gaussian filter. | |
FASTCV_API void | fcvFilterGaussian5x5u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst, int blurBorder) |
Blurs an image with 5x5 Gaussian filter. | |
FASTCV_API void | fcvFilterGaussian5x5u8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride, int blurBorder) |
Blurs an image with 5x5 Gaussian filter. | |
FASTCV_API void | fcvFilterGaussian11x11u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst, int blurBorder) |
Blurs an image with 11x11 Gaussian filter. | |
FASTCV_API void | fcvFilterGaussian11x11u8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride, int blurBorder) |
Blurs an image with 11x11 Gaussian filter. | |
FASTCV_API void | fcvFilterSobel3x3u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst) |
3x3 Sobel edge filter | |
FASTCV_API void | fcvFilterSobel3x3u8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride) |
3x3 Sobel edge filter | |
FASTCV_API void | fcvFilterCanny3x3u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst, int lowThresh, int highThresh) |
Canny edge filter. | |
FASTCV_API void | fcvFilterCanny3x3u8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride, int lowThresh, int highThresh) |
Canny edge filter. | |
FASTCV_API void | fcvFilterCanny3x3u8_v3 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride, int16_t *__restrict gx, int16_t *__restrict gy, unsigned int gradStride, int lowThresh, int highThresh) |
Canny edge filter. | |
FASTCV_API void | fcvImageDiffu8 (const uint8_t *__restrict src1, const uint8_t *__restrict src2, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst) |
Performs image difference by subracting src2 from src1. dst=src1-src2. | |
FASTCV_API void | fcvImageDiffu8_v2 (const uint8_t *__restrict src1, const uint8_t *__restrict src2, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride) |
Performs image difference by subracting src2 from src1. dst=src1-src2. | |
FASTCV_API void | fcvImageDiffs16 (const int16_t *__restrict src1, const int16_t *__restrict src2, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict dst, unsigned int dstStride) |
Compute image difference src1-src2. | |
FASTCV_API void | fcvImageDifff32 (const float *__restrict src1, const float *__restrict src2, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, float *__restrict dst, unsigned int dstStride) |
Performs image difference by subracting src2 from src1. dst=src1-src2. | |
FASTCV_API void | fcvImageDiffu8f32 (const uint8_t *__restrict src1, const uint8_t *__restrict src2, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, float *__restrict dst, unsigned int dstStride) |
Performs image difference by promoting both src1 and src 2 to floating point values and then subracting src2 from src1. dst=src1-src2. | |
FASTCV_API void | fcvImageDiffu8s8 (const uint8_t *__restrict src1, const uint8_t *__restrict src2, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int8_t *__restrict dst, unsigned int dstStride) |
Performs image difference by subracting src2 from src1. dst = ( src1 >> 1) - ( src2 >> 1). | |
FASTCV_API void | fcvImageGradientInterleaveds16 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict gradients) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients. | |
FASTCV_API void | fcvImageGradientInterleaveds16_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict gradients, unsigned int gradStride) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients. | |
FASTCV_API void | fcvImageGradientInterleavedf32 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, float *__restrict gradients) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients. | |
FASTCV_API void | fcvImageGradientInterleavedf32_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, float *__restrict gradients, unsigned int gradStride) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients. | |
FASTCV_API void | fcvImageGradientPlanars16 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict dx, int16_t *__restrict dy) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients. | |
FASTCV_API void | fcvImageGradientPlanars16_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict dx, int16_t *__restrict dy, unsigned int dxyStride) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients. | |
FASTCV_API void | fcvImageGradientPlanarf32 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, float *__restrict dx, float *__restrict dy) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients. | |
FASTCV_API void | fcvImageGradientPlanarf32_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, float *__restrict dx, float *__restrict dy, unsigned int dxyStride) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients. | |
FASTCV_API void | fcvFilterCorr3x3s8 (const int8_t *__restrict kernel, const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst) |
3x3 correlation with non-separable kernel. | |
FASTCV_API void | fcvFilterCorr3x3s8_v2 (const int8_t *__restrict kernel, const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride) |
3x3 correlation with non-separable kernel. | |
FASTCV_API fcvStatus | fcvFilterCorrNxNu8f32 (const float32_t *__restrict kernel, uint32_t N, const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t *__restrict dst, uint32_t dstStride) |
NxN correlation with non-separable kernel. Border values are ignored in this function. The filling of dst starts at (N/2,N/2) and ends at (srcWidth-1-N/2,srcHeight-1-N/2). NOTE: The border is N/2 wide pixel strips at top, bottom, left and right of image. | |
FASTCV_API fcvStatus | fcvFilterCorrNxNu8s16 (const int8_t *__restrict kernel, uint32_t N, int8_t shift, const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict dst, uint32_t dstStride) |
NxN correlation with non-separable kernel. Border values are ignored in this function. The filling of dst starts at (N/2,N/2) and ends at (srcWidth-1-N/2,srcHeight-1-N/2). NOTE: The border is N/2 wide pixel strips at top, bottom, left and right of image. | |
FASTCV_API fcvStatus | fcvFilterCorrNxNu8 (const int8_t *__restrict kernel, uint32_t N, int8_t shift, const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride) |
NxN correlation with non-separable kernel. Border values are ignored in this function. The filling of dst starts at (N/2,N/2) and ends at (srcWidth-1-N/2,srcHeight-1-N/2). NOTE: The border is N/2 wide pixel strips at top, bottom, left and right of image. | |
FASTCV_API void | fcvFilterCorrSep9x9s16 (const int16_t *__restrict kernel, const int16_t *src, unsigned int srcWidth, unsigned int srcHeight, int16_t *__restrict tmp, int16_t *dst) |
9x9 correlation with separable kernel. If src and dst point to the same address, it will do in-place. | |
FASTCV_API void | fcvFilterCorrSep9x9s16_v2 (const int16_t *__restrict kernel, const int16_t *srcImg, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict tmpImg, int16_t *dstImg, unsigned int dstStride) |
9x9 FIR filter (convolution) with seperable kernel. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place. | |
FASTCV_API void | fcvFilterCorrSep11x11s16 (const int16_t *__restrict kernel, const int16_t *src, unsigned int srcWidth, unsigned int srcHeight, int16_t *__restrict tmpImg, int16_t *dst) |
11x11 correlation with separable kernel. If src and dst point to the same address, it will do in-place. | |
FASTCV_API void | fcvFilterCorrSep11x11s16_v2 (const int16_t *__restrict kernel, const int16_t *srcImg, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict tmpImg, int16_t *dstImg, unsigned int dstStride) |
11x11 FIR filter (convolution) with seperable kernel. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place. | |
FASTCV_API void | fcvFilterCorrSep13x13s16 (const int16_t *__restrict kernel, const int16_t *src, unsigned int srcWidth, unsigned int srcHeight, int16_t *__restrict tmpImg, int16_t *dst) |
13x13 correlation with separable kernel. If src and dst point to the same address, it will do in-place. | |
FASTCV_API void | fcvFilterCorrSep13x13s16_v2 (const int16_t *__restrict kernel, const int16_t *srcImg, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict tmpImg, int16_t *dstImg, unsigned int dstStride) |
13x13 FIR filter (convolution) with seperable kernel. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place. | |
FASTCV_API void | fcvFilterCorrSep15x15s16 (const int16_t *__restrict kernel, const int16_t *src, unsigned int srcWidth, unsigned int srcHeight, int16_t *__restrict tmpImg, int16_t *dst) |
15x15 correlation with separable kernel. If src and dst point to the same address, it will do in-place. | |
FASTCV_API void | fcvFilterCorrSep15x15s16_v2 (const int16_t *__restrict kernel, const int16_t *srcImg, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict tmpImg, int16_t *dstImg, unsigned int dstStride) |
15x15 FIR filter (convolution) with seperable kernel. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place. | |
FASTCV_API void | fcvFilterCorrSep17x17s16 (const int16_t *__restrict kernel, const int16_t *src, unsigned int srcWidth, unsigned int srcHeight, int16_t *__restrict tmpImg, int16_t *dst) |
17x17 correlation with separable kernel. If src and dst point to the same address, it will do in-place. | |
FASTCV_API void | fcvFilterCorrSep17x17s16_v2 (const int16_t *__restrict kernel, const int16_t *srcImg, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict tmpImg, int16_t *dstImg, unsigned int dstStride) |
17x17 FIR filter (convolution) with seperable kernel. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place. | |
FASTCV_API void | fcvFilterCorrSepNxNs16 (const int16_t *__restrict kernel, int knlSize, const int16_t *srcImg, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict tmpImg, int16_t *dstImg, unsigned int dstStride) |
NxN correlation with separable kernel. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place. | |
FASTCV_API fcvStatus | fcvFilterCorrSepMxNu8 (const int8_t *kernelX, uint32_t knlSizeX, const int8_t *kernelY, uint32_t knlSizeY, int8_t shift, const uint8_t *srcImg, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *dstImg, uint32_t dstStride) |
MxN correlation with separable kernel. | |
FASTCV_API void | fcvImageIntensityStats (const uint8_t *__restrict src, unsigned int srcWidth, int xBegin, int yBegin, unsigned int recWidth, unsigned int recHeight, float *mean, float *variance) |
Calculates the mean and variance of intensities of a rectangle in a grayscale image. | |
FASTCV_API fcvStatus | fcvImageIntensityStats_v2 (const uint8_t *__restrict src, unsigned int srcWidth, int xBegin, int yBegin, uint32_t recWidth, uint32_t recHeight, float32_t *mean, float32_t *variance, fcvVarianceEstimator varianceEstimator) |
Calculates the mean and variance of intensities of a rectangle in a grayscale image. | |
FASTCV_API void | fcvImageIntensityHistogram (const uint8_t *__restrict src, unsigned int srcWidth, int xBegin, int yBegin, unsigned int recWidth, unsigned int recHeight, int32_t *histogram) |
Creates a histogram of intensities for a rectangular region of a grayscale image. Bins each pixel into a histogram of size 256, depending on the intensity of the pixel (in the range 0 to 255). | |
FASTCV_API void | fcvIntegrateImageu8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint32_t *__restrict dst) |
Builds an integral image of the incoming 8-bit image and adds an unfilled border on top and to the left. NOTE: border usually zero filled elsewhere. | |
FASTCV_API void | fcvIntegrateImageu8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint32_t *__restrict dst, unsigned int dstStride) |
Builds an integral image of the incoming 8-bit image and adds an unfilled border on top and to the left. NOTE: border usually zero filled elsewhere. | |
FASTCV_API void | fcvIntegratePatchu8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, int patchX, int patchY, unsigned int patchW, unsigned int patchH, uint32_t *__restrict intgrlImgOut, uint32_t *__restrict intgrlSqrdImgOut) |
Builds an integral image of the incoming 8-bit patch values and their squares and adds an unfilled border on top and to the left. NOTE: border usually zero filled elsewhere. | |
FASTCV_API void | fcvIntegratePatchu8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int patchX, int patchY, unsigned int patchW, unsigned int patchH, uint32_t *__restrict intgrlImgOut, uint32_t *__restrict intgrlSqrdImgOut) |
Builds an integral image of the incoming 8-bit patch values and their squares and adds an unfilled border on top and to the left. NOTE: border usually zero filled elsewhere. | |
FASTCV_API fcvStatus | fcvIntegratePatchu8_v3 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t patchX, uint32_t patchY, uint32_t patchW, uint32_t patchH, uint32_t *__restrict intgrlImgOut, uint32_t intgrlStride, uint32_t *__restrict intgrlSqrdImgOut, uint32_t intgrlSqrdStride) |
Builds an integral image of the incoming 8-bit patch values and their squares and adds an unfilled border on top and to the left. NOTE: border usually zero filled elsewhere. | |
FASTCV_API void | fcvIntegratePatch12x12u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, int patchX, int patchY, uint32_t *__restrict intgrlImgOut, uint32_t *__restrict intgrlSqrdImgOut) |
Builds an integral image of the incoming 12x12 8-bit patch values and their squares. It also adds an unfilled border on top and to the left. NOTE: border usually zero filled elsewhere. | |
FASTCV_API void | fcvIntegratePatch12x12u8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int patchX, int patchY, uint32_t *__restrict intgrlImgOut, uint32_t *__restrict intgrlSqrdImgOut) |
Builds an integral image of the incoming 12x12 8-bit patch values and their squares. It also adds an unfilled border on top and to the left. NOTE: border usually zero filled elsewhere. | |
FASTCV_API void | fcvIntegratePatch18x18u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, int patchX, int patchY, uint32_t *__restrict intgrlImgOut, uint32_t *__restrict intgrlSqrdImgOut) |
Builds an integral image of the incoming 18x18 8-bit patch values and their squares. It also adds an unfilled border on top and to the left. NOTE: border usually zero filled elsewhere. | |
FASTCV_API void | fcvIntegratePatch18x18u8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int patchX, int patchY, uint32_t *__restrict intgrlImgOut, uint32_t *__restrict intgrlSqrdImgOut) |
Builds an integral image of the incoming 18x18 8-bit patch values and their squares. It also adds an unfilled border on top and to the left. NOTE: border usually zero filled elsewhere. | |
FASTCV_API void | fcvIntegrateImageLineu8 (const uint8_t *__restrict src, uint16_t srcWidth, uint32_t *intgrl, uint32_t *intgrlSqrd) |
Integrates one line of an image or any portion of an image that is contiguous in memory. | |
FASTCV_API void | fcvIntegrateImageLine64u8 (const uint8_t *__restrict src, uint16_t *intgrl, uint32_t *intgrlSqrd) |
Integrates 64 contiguous pixels of an image. | |
FASTCV_API void | fcvFilterThresholdu8 (const uint8_t *src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *dst, unsigned int threshold) |
Binarizes a grayscale image based on a threshold value. | |
FASTCV_API void | fcvFilterThresholdu8_v2 (const uint8_t *src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *dst, unsigned int dstStride, unsigned int threshold) |
Binarizes a grayscale image based on a threshold value. | |
FASTCV_API fcvStatus | fcvFilterThresholdu8_v3 (const uint8_t *src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *dst, unsigned int dstStride, unsigned int threshold, uint8_t trueValue, uint8_t falseValue) |
Binarizes a grayscale image based on a threshold value. The binarized image will be in the two values selected by user. | |
FASTCV_API fcvStatus | fcvFilterThresholdRangeu8 (const uint8_t *src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *dst, uint32_t dstStride, uint8_t lowThresh, uint8_t highThresh) |
Binarizes a grayscale image based on a pair of threshold values. | |
FASTCV_API fcvStatus | fcvFilterThresholdRangeu8_v2 (const uint8_t *src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *dst, uint32_t dstStride, uint8_t lowThresh, uint8_t highThresh, uint8_t trueValue, uint8_t falseValue) |
Binarizes a grayscale image based on a pair of threshold values. The binarized image will be in the two values selected by user. | |
FASTCV_API void | fcvFilterDilate3x3u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst) |
Dilate a grayscale image by taking the local maxima of 3x3 neighborhood window. | |
FASTCV_API void | fcvFilterDilate3x3u8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride) |
Dilate a grayscale image by taking the local maxima of 3x3 neighborhood window. | |
FASTCV_API void | fcvFilterErode3x3u8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, uint8_t *__restrict dst) |
Erode a grayscale image by taking the local minima of 3x3 neighborhood window. | |
FASTCV_API void | fcvFilterErode3x3u8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, uint8_t *__restrict dst, unsigned int dstStride) |
Erode a grayscale image by taking the local minima of 3x3 nbhd window. | |
FASTCV_API void | fcvFilterGaussian5x5s16 (const int16_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, int16_t *__restrict dst, int blurBorder) |
Blur with 5x5 Gaussian filter. | |
FASTCV_API void | fcvFilterGaussian5x5s16_v2 (const int16_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict dst, unsigned int dstStride, int blurBorder) |
Blur with 5x5 Gaussian filter. | |
FASTCV_API void | fcvFilterGaussian5x5s32 (const int32_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, int32_t *__restrict dst, int blurBorder) |
Blur with 5x5 Gaussian filter. | |
FASTCV_API void | fcvFilterGaussian5x5s32_v2 (const int32_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int32_t *__restrict dst, unsigned int dstStride, int blurBorder) |
Blur with 5x5 Gaussian filter. | |
FASTCV_API uint32_t | fcvImageSegmentationRegionGrow (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t numChannel, uint32_t thresholdSplit, uint32_t thresholdMerge, uint32_t *__restrict segLabel, uint32_t segLabelStride, uint8_t *__restrict data) |
Segments an image (3 or 1 channel) into meaningful regions, depending on the color or gray scale uniformity of the neighborhood pixels. | |
FASTCV_API int | fcvPyramidCreatef32 (const float *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int numLevels, fcvPyramidLevel *pyramid) |
Builds an image pyramid of float32 arising from a single original image - that are successively downscaled w.r.t. the pre-set levels. NOTE: Memory should be deallocated using fcvPyramidDelete. | |
FASTCV_API int | fcvPyramidCreatef32_v2 (const float32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t numLevels, fcvPyramidLevel_v2 *pyramid) |
Builds an image pyramid (with stride). NOTE: Memory should be deallocated using fcvPyramidDelete_v2. | |
FASTCV_API int | fcvPyramidCreateu8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int numLevels, fcvPyramidLevel *pyramid) |
Builds an image pyramid of uint8_t arising from a single original image - that are successively downscaled w.r.t. the pre-set levels. NOTE: Memory should be deallocated using fcvPyramidDelete. | |
FASTCV_API int | fcvPyramidCreateu8_v2 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t numLevels, fcvPyramidLevel_v2 *pyramid) |
Builds an image pyramid (with stride). NOTE: Memory should be deallocated using fcvPyramidDelete. | |
FASTCV_API fcvStatus | fcvPyramidCreateu8_v3 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t numLevels, fcvPyramidScale scale, fcvPyramidLevel_v2 *__restrict pyramidGaussian) |
Builds a Gaussian image pyramid. DO NOT USE THIS API unless for testing purposes. This API can be removed without notice. | |
FASTCV_API int | fcvPyramidSobelGradientCreatei16 (const fcvPyramidLevel *imgPyr, fcvPyramidLevel *dxPyr, fcvPyramidLevel *dyPyr, unsigned int numLevels) |
Creates a gradient pyramid of int16_t from an image pyramid of uint8_t. | |
FASTCV_API int | fcvPyramidSobelGradientCreatef32 (const fcvPyramidLevel *imgPyr, fcvPyramidLevel *dxPyr, fcvPyramidLevel *dyPyr, unsigned int numLevels) |
Creates a gradient pyramid of float32 from an image pyramid of uint8_t. | |
FASTCV_API int | fcvPyramidSobelGradientCreatei8 (const fcvPyramidLevel *imgPyr, fcvPyramidLevel *dxPyr, fcvPyramidLevel *dyPyr, unsigned int numLevels) |
Creates a gradient pyramid of integer8 from an image pyramid of uint8_t. | |
FASTCV_API void | fcvImageGradientSobelPlanars16 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict dx, int16_t *__restrict dy) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel [ -1 0 +1 ] [ -1 -2 -1 ] dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src [ -1 0 +1 ] [ +1 +2 +1 ]. | |
FASTCV_API void | fcvImageGradientSobelPlanars16_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict dx, int16_t *__restrict dy, unsigned int dxyStride) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel [ -1 0 +1 ] [ -1 -2 -1 ] dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src [ -1 0 +1 ] [ +1 +2 +1 ]. | |
FASTCV_API void | fcvImageGradientSobelPlanars16_v3 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict dx, int16_t *__restrict dy, unsigned int dxyStride) |
Creates a 2D gradient image from source luminance data without normalization. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel [ -1 0 +1 ] [ -1 -2 -1 ] dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src [ -1 0 +1 ] [ +1 +2 +1 ]. | |
FASTCV_API void | fcvImageGradientSobelInterleaveds16 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict gradients) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy].... [ -1 0 +1 ] [ -1 -2 -1 ] dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src [ -1 0 +1 ] [ +1 +2 +1 ]. | |
FASTCV_API void | fcvImageGradientSobelInterleaveds16_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict gradients, unsigned int gradStride) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy].... [ -1 0 +1 ] [ -1 -2 -1 ] dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src [ -1 0 +1 ] [ +1 +2 +1 ]. | |
FASTCV_API void | fcvImageGradientSobelInterleaveds16_v3 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int16_t *__restrict gradients, unsigned int gradStride) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy].... [ -1 0 +1 ] [ -1 -2 -1 ] dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src [ -1 0 +1 ] [ +1 +2 +1 ] Compared to the original and v2 functions, this v3 functions does not normalize the gradients (divide by 8). It just returns the actual dx, dy values. | |
FASTCV_API void | fcvImageGradientSobelInterleavedf32 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, float *__restrict gradients) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy].... [ -1 0 +1 ] [ -1 -2 -1 ] dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src [ -1 0 +1 ] [ +1 +2 +1 ]. | |
FASTCV_API void | fcvImageGradientSobelInterleavedf32_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, float *__restrict gradients, unsigned int gradStride) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy].... [ -1 0 +1 ] [ -1 -2 -1 ] dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src [ -1 0 +1 ] [ +1 +2 +1 ]. | |
FASTCV_API void | fcvImageGradientSobelPlanars8 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int8_t *__restrict dx, int8_t *__restrict dy) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel [ -1 0 +1 ] [ -1 -2 -1 ] dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src [ -1 0 +1 ] [ +1 +2 +1 ]. | |
FASTCV_API void | fcvImageGradientSobelPlanars8_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, int8_t *__restrict dx, int8_t *__restrict dy, unsigned int dxyStride) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel [ -1 0 +1 ] [ -1 -2 -1 ] dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src [ -1 0 +1 ] [ +1 +2 +1 ]. | |
FASTCV_API void | fcvImageGradientSobelPlanarf32 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, float *dx, float *dy) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel [ -1 0 +1 ] [ -1 -2 -1 ] dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src [ -1 0 +1 ] [ +1 +2 +1 ]. | |
FASTCV_API void | fcvImageGradientSobelPlanarf32_v2 (const uint8_t *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, float *dx, float *dy, unsigned int dxyStride) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel [ -1 0 +1 ] [ -1 -2 -1 ] dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src [ -1 0 +1 ] [ +1 +2 +1 ]. | |
FASTCV_API void | fcvImageGradientSobelPlanarf32f32 (const float *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, float *dx, float *dy) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel [ -1 0 +1 ] [ -1 -2 -1 ] dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src [ -1 0 +1 ] [ +1 +2 +1 ]. | |
FASTCV_API void | fcvImageGradientSobelPlanarf32f32_v2 (const float *__restrict src, unsigned int srcWidth, unsigned int srcHeight, unsigned int srcStride, float *dx, float *dy, unsigned int dxyStride) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel [ -1 0 +1 ] [ -1 -2 -1 ] dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src [ -1 0 +1 ] [ +1 +2 +1 ]. | |
FASTCV_API void | fcvBitwiseOru8 (const uint8_t *__restrict src1, const uint8_t *__restrict src2, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride, uint8_t *__restrict mask, uint32_t maskStride) |
Performs per-element bitwise-OR operation on two 8-bit single channel images. Two images should have the same size. dst(I)=src1(I) V src2(I) if mask(I) is not zero. | |
FASTCV_API void | fcvBitwiseOrs32 (const int32_t *__restrict src1, const int32_t *__restrict src2, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int32_t *__restrict dst, uint32_t dstStride, uint8_t *__restrict mask, uint32_t maskStride) |
Performs per-element bitwise-OR operation on two 32-bit single channel images. Two images should have the same size. dst(I)=src1(I) V src2(I) if mask(I) is not zero. | |
FASTCV_API void | fcvTiltedIntegralu8s32 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int32_t *__restrict dst, uint32_t dstStride) |
Integral of the image tilted by 45 degrees. | |
FASTCV_API void | fcvConvValids16 (const int16_t *__restrict src1, uint32_t src1Width, uint32_t src1Height, uint32_t src1Stride, const int16_t *__restrict src2, uint32_t src2Width, uint32_t src2Height, uint32_t src2Stride, int32_t *__restrict dst, uint32_t dstStride) |
Performs a valid convolution of two images. | |
FASTCV_API void | fcvEdgeWeightings16 (int16_t *__restrict edgeMap, const uint32_t edgeMapWidth, const uint32_t edgeMapHeight, const uint32_t edgeMapStride, const uint32_t weight, const uint32_t edge_limit, const uint32_t hl_threshold, const uint32_t hh_threshold, const uint32_t edge_denoise_factor) |
Performs edge weighting on input image. | |
FASTCV_API void | fcvAdaptiveThresholdGaussian3x3u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t maxValue, fcvThreshType thresholdType, int32_t value, uint8_t *__restrict dst, uint32_t dstStride) |
Binarizes a grayscale image based on an adaptive threshold value calculated from 3x3 Gaussian kernel. | |
FASTCV_API void | fcvAdaptiveThresholdGaussian5x5u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t maxValue, fcvThreshType thresholdType, int32_t value, uint8_t *__restrict dst, uint32_t dstStride) |
Binarizes a grayscale image based on an adaptive threshold value calculated from 5x5 Gaussian kernel. | |
FASTCV_API void | fcvAdaptiveThresholdGaussian11x11u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t maxValue, fcvThreshType thresholdType, int32_t value, uint8_t *__restrict dst, uint32_t dstStride) |
Binarizes a grayscale image based on an adaptive threshold value calculated from 11x11 Gaussian kernel. | |
FASTCV_API void | fcvAdaptiveThresholdMean3x3u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t maxValue, fcvThreshType thresholdType, int32_t value, uint8_t *__restrict dst, uint32_t dstStride) |
Binarizes a grayscale image based on an adaptive threshold value calculated from 3x3 mean. | |
FASTCV_API void | fcvAdaptiveThresholdMean5x5u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t maxValue, fcvThreshType thresholdType, int32_t value, uint8_t *__restrict dst, uint32_t dstStride) |
Binarizes a grayscale image based on an adaptive threshold value calculated from 5x5 mean. | |
FASTCV_API void | fcvAdaptiveThresholdMean11x11u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t maxValue, fcvThreshType thresholdType, int32_t value, uint8_t *__restrict dst, uint32_t dstStride) |
Binarizes a grayscale image based on an adaptive threshold value calculated from 11x11 mean. | |
FASTCV_API void | fcvBoxFilter3x3u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride) |
Smooth a uint8_t image with a 3x3 box filter. | |
FASTCV_API void | fcvBoxFilter5x5u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride) |
Smooth a uint8_t image with a 5x5 box filter. | |
FASTCV_API void | fcvBoxFilter11x11u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride) |
Smooth a uint8_t image with a 11x11 box filter. | |
FASTCV_API void | fcvBoxFilterNxNf32 (const float32_t *src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t N, float32_t *dst, uint32_t dstStride) |
Smooth a float32_t image with a NxN box filter. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place. | |
FASTCV_API void | fcvBilateralFilter5x5u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride) |
bilateral smoothing with a 5x5 bilateral kernel | |
FASTCV_API fcvStatus | fcvBilateralFilter5x5u8_v2 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride, float32_t sigmaColor, float32_t sigmaSpace) |
bilateral smoothing with a 5x5 bilateral kernel | |
FASTCV_API void | fcvBilateralFilter7x7u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride) |
Bilateral smoothing with 7x7 bilateral kernel. | |
FASTCV_API fcvStatus | fcvBilateralFilter7x7u8_v2 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride, float32_t sigmaColor, float32_t sigmaSpace) |
Bilateral smoothing with 7x7 bilateral kernel. | |
FASTCV_API void | fcvBilateralFilter9x9u8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride) |
Bilateral smoothing with 9x9 bilateral kernel. | |
FASTCV_API fcvStatus | fcvBilateralFilter9x9u8_v2 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride, float32_t sigmaColor, float32_t sigmaSpace) |
Bilateral smoothing with 9x9 bilateral kernel. | |
FASTCV_API void | fcvSegmentFGMasku8 (uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t Polygonal, uint32_t perimScale) |
This function will remove small patches in the source image based on the input threshold. | |
FASTCV_API void | fcvFloodfillSimpleu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride, uint32_t xBegin, uint32_t yBegin, uint8_t newVal, fcvConnectedComponent *cc, uint8_t connectivity, void *lineBuffer) |
This function fills the image with a starting seed and neighborhood (4 or 8). It then returns the connected component (cc) that's filled. | |
FASTCV_API fcvStatus | fcvFloodfillMergedu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride, uint32_t xBegin, uint32_t yBegin, uint8_t newVal, fcvConnectedComponent *__restrict cc, uint8_t connectivity) |
This function fills the image with a starting seed and neighborhood (4 or 8). It then returns the connected component (cc) that's filled. | |
FASTCV_API void | fcvIntegrateImageYCbCr420PseudoPlanaru8 (const uint8_t *__restrict srcY, const uint8_t *__restrict srcC, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcYStride, uint32_t srcCStride, uint32_t *__restrict integralY, uint32_t *__restrict integralCb, uint32_t *__restrict integralCr, uint32_t integralYStride, uint32_t integralCbStride, uint32_t integralCrStride) |
This function calculates the integral image of a YCbCr image. | |
FASTCV_API void | fcvFindForegroundIntegrateImageYCbCr420u32 (const uint32_t *__restrict bgIntegralY, const uint32_t *__restrict bgIntegralCb, const uint32_t *__restrict bgIntegralCr, const uint32_t *__restrict fgIntegralY, const uint32_t *__restrict fgIntegralCb, const uint32_t *__restrict fgIntegralCr, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcYStride, uint32_t srcCbStride, uint32_t srcCrStride, uint8_t *__restrict outputMask, uint32_t outputWidth, uint32_t outputHeight, uint32_t outputMaskStride, float32_t threshold) |
This function finds the foreground. | |
FASTCV_API void | fcvAverages32 (const int32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t *__restrict avgValue) |
This function calculates the average value of an image. | |
FASTCV_API void | fcvAverageu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, float32_t *__restrict avgValue) |
This function calculates the average value of an image. | |
FASTCV_API void | fcvFilterThresholdOtsuu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride, fcvThreshType thresholdType) |
Binarizes a grayscale image using Otsu's method. | |
FASTCV_API void | fcvIntegrateImageu8u64 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t *__restrict dstIntgrl, uint64_t *__restrict dstIntgrlSqrd, uint32_t dstIntgrlStride, uint32_t dstIntgrlSqrdStride) |
Builds an integral image of the incoming 8-bit patch values and their squares. This function supports bigger size patch with u64 for squared integral output. NOTE: No extra border lines, the integral output buffer size is the same as input image buffer size. | |
FASTCV_API void | fcvImageHistogramEqualizeu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride) |
Normalize the image according to histogram value of the pixel intensity. | |
FASTCV_API void | fcvImageSpatialHistogramu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t numPatterns, uint32_t grid_x, uint32_t grid_y, float32_t *__restrict histogram) |
Calculate histogram at image patches. | |
FASTCV_API fcvStatus | fcvFilterSobel3x3u8s16 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict dx, int16_t *__restrict dy, uint32_t dxyStride, fcvBorderType borderType, uint8_t borderValue) |
Creates a 2D gradient image from source luminance data without normalization. This function computes the gradient of the input image by convolution with the 3x3 Sobel kernel. The Sobel kernel is not normalized in this function. | |
FASTCV_API fcvStatus | fcvFilterSobel5x5u8s16 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict dx, int16_t *__restrict dy, uint32_t dxyStride, fcvBorderType borderType, uint8_t borderValue) |
Creates a 2D gradient image from source luminance data without normalization. This function computes the gradient of the input image by convolution with the 5x5 Sobel kernel. The Sobel kernel is not normalized in this function. | |
FASTCV_API fcvStatus | fcvFilterSobel7x7u8s16 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict dx, int16_t *__restrict dy, uint32_t dxyStride, fcvBorderType borderType, uint8_t borderValue) |
Creates a 2D gradient image from source luminance data without normalization. This function computes the gradient of the input image by convolution with the 7x7 Sobel kernel. The Sobel kernel is not normalized in this function. | |
FASTCV_API fcvStatus | fcvFilterCannyu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t kernelSize, int32_t lowThresh, int32_t highThresh, fcvNormType normType, uint8_t *__restrict dst, uint32_t dstStride, int16_t *__restrict gx, int16_t *__restrict gy, uint32_t gradStride) |
Canny edge detection with more controls to configurate the algorithm. | |
FASTCV_API fcvStatus | fcvConvertDepthu8s16 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t shift, int16_t *__restrict dst, uint32_t dstStride) |
Converts the bit depth of a single-channel uint8 image to int16_t type. | |
FASTCV_API fcvStatus | fcvConvertDepths16u8 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t shift, fcvConvertPolicy policy, uint8_t *__restrict dst, uint32_t dstStride) |
Converts the bit depth of a single-channel int16_t image to uint8_t type. | |
FASTCV_API fcvStatus | fcvBilateralFilterRecursiveu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride, float32_t sigmaColor, float32_t sigmaSpace) |
Recursive Bilateral Filtering. | |
FASTCV_API fcvStatus | fcvImageSegmentationSeedRegionGrows16 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t numChannel, uint32_t threshGrow, const uint32_t *__restrict pointVector, uint32_t numSeed, uint8_t mode, uint32_t *__restrict segLabel, uint32_t segLabelStride) |
Grow the seeds within the image to meaningful regions, depending on the color or gray scale uniformity of the neighborhood pixels from the seeds. | |
FASTCV_API fcvStatus | fcvNormalizeLocalBoxu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t patchWidth, uint32_t patchHeight, uint32_t useStdDev, int8_t *__restrict dst, uint32_t dstStride) |
Calculate the local subtractive and contrastive normalization of the image. For each pixel of the image, the mean and optionally standard deviation is calculated for the patch centered around the pixel. Then the pixel is normalized by the local mean and optionally standard deviation. | |
FASTCV_API fcvStatus | fcvNormalizeLocalBoxf32 (const float32_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t patchWidth, uint32_t patchHeight, uint32_t useStdDev, float32_t *__restrict dst, uint32_t dstStride) |
Calculate the local subtractive and contrastive normalization of the image. For each pixel of the image, the mean and optionally standard deviation is calculated for the patch centered around the pixel. Then the pixel is normalized by the local mean and optionally standard deviation. | |
FASTCV_API fcvStatus | fcvChannelCombine2Planesu8 (const uint8_t *__restrict src1, uint32_t width, uint32_t height, uint32_t src1Stride, const uint8_t *__restrict src2, uint32_t src2Stride, uint8_t *__restrict dst, uint32_t dstStride) |
Combine two channels in an interleaved fashion. | |
FASTCV_API fcvStatus | fcvChannelCombine3Planesu8 (const uint8_t *__restrict src1, uint32_t width, uint32_t height, uint32_t src1Stride, const uint8_t *__restrict src2, uint32_t src2Stride, const uint8_t *__restrict src3, uint32_t src3Stride, uint8_t *__restrict dst, uint32_t dstStride) |
Combine three channels in an interleaved fashion. | |
FASTCV_API fcvStatus | fcvChannelCombine4Planesu8 (const uint8_t *__restrict src1, uint32_t width, uint32_t height, uint32_t src1Stride, const uint8_t *__restrict src2, uint32_t src2Stride, const uint8_t *__restrict src3, uint32_t src3Stride, const uint8_t *__restrict src4, uint32_t src4Stride, uint8_t *__restrict dst, uint32_t dstStride) |
Combine four channels in an interleaved fashion. | |
FASTCV_API fcvStatus | fcvChannelExtractu8 (const uint8_t *__restrict src1, uint32_t srcWidth, uint32_t srcHeight, uint32_t src1Stride, const uint8_t *__restrict src2, uint32_t src2Stride, const uint8_t *__restrict src3, uint32_t src3Stride, fcvChannelType srcChannel, fcvImageFormat srcFormat, uint8_t *__restrict dst, uint32_t dstStride) |
Extract channel as a single uint8_t type plane from an interleaved or multi-planar image format. | |
FASTCV_API fcvStatus | fcvFilterMedianMxNs16 (const int16_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t M, uint32_t N, int16_t *__restrict dst, uint32_t dstStride) |
Blurs an image with MxN median filter (M,N have to be odd numbers) | |
FASTCV_API fcvStatus | fcvFilterConvolveMxNu8s16 (const int16_t *__restrict kernel, uint32_t M, uint32_t N, int8_t shift, const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, int16_t *__restrict dst, uint32_t dstStride, fcvBorderType borderType, uint8_t borderValue) |
Computes the convolution of an image with an M x N Kernel. | |
FASTCV_API fcvStatus | fcvFilterConvolveMxNu8 (const int16_t *__restrict kernel, uint32_t M, uint32_t N, int8_t shift, const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride, fcvBorderType borderType, uint8_t borderValue) |
Computes the convolution of a image with an M x N Kernel. | |
FASTCV_API fcvStatus | fcvBoxFilter3x3u8_v2 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride, fcvBorderType borderType, uint8_t borderValue) |
Smooth a uint8_t image with a 3x3 box filter with border handling scheme specified by user. | |
FASTCV_API fcvStatus | fcvFilterErode3x3u8_v3 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride, fcvBorderType borderType, uint8_t borderValue) |
Erode a grayscale image by taking the local minima of 3x3 nbhd window with border handling scheme specified by user. | |
FASTCV_API fcvStatus | fcvFilterErodeNxNu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t N, uint8_t *__restrict dst, uint32_t dstStride) |
Erode a grayscale image by taking the local minima of NxN neighborhood window. | |
FASTCV_API fcvStatus | fcvFilterDilate3x3u8_v3 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride, fcvBorderType borderType, uint8_t borderValue) |
Dilate a grayscale image by taking the local maxima of 3x3 neighborhood window with border handling scheme specified by user. | |
FASTCV_API fcvStatus | fcvFilterDilateNxNu8 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t N, uint8_t *__restrict dst, uint32_t dstStride) |
Dilate a grayscale image by taking the local maxima of NxN neighborhood window. | |
FASTCV_API fcvStatus | fcvFilterGaussian3x3u8_v3 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride, fcvBorderType borderType, uint8_t borderValue) |
Blurs an image with 3x3 Gaussian filter with border handling scheme specified by user. | |
FASTCV_API fcvStatus | fcvFilterMedian3x3u8_v3 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint8_t *__restrict dst, uint32_t dstStride, fcvBorderType borderType, uint8_t borderValue) |
Blurs an image with 3x3 median filter with border handling scheme specified by user. | |
FASTCV_API fcvStatus | fcvImageSpatialHistogramu8_v2 (const uint8_t *__restrict src, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcStride, uint32_t numPatterns, uint32_t grid_x, uint32_t grid_y, float32_t *__restrict histogram, float32_t normalize_factor) |
Calculate histogram at image patches. |
Image filtering, convolution and scaling operations
FASTCV_API void fcvAdaptiveThresholdGaussian11x11u8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t | maxValue, | ||
fcvThreshType | thresholdType, | ||
int32_t | value, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Binarizes a grayscale image based on an adaptive threshold value calculated from 11x11 Gaussian kernel.
For each pixel, the threshold is computed adaptively based on cross-correlation with a 11x11 Gaussian kernel minus value (parameter). The standard deviation is used for Gaussian kernel. For FCV_THRESH_BINARY threshold type, the pixel is set as maxValue if it's value is greater than the threshold; else, it is set as zero. For FCV_THRESH_BINARY_INV threshold type, the pixel is set as zero if it's value is greater than the threshold; else, it is set as maxValue.
src | Pointer to the 8-bit input image. |
srcWidth | Width of source images pointed by src. |
srcHeight | Height of source images pointed by src. |
srcStride | Stride of source image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). |
maxValue | The maximum integer value to be used. 0<maxValue<256. |
thresholdType | Threshold type. It could be either FCV_THRESH_BINARY or FCV_THRESH_BINARY_INV. |
value | The constant value subtracted after the cross-correlation with Gaussian kernel. It is usually positive but could be 0 or negative too. |
dst | Pointer to the 8-bit destination image. Destination iamge has the same size as input image. |
dstStride | Stride of destination image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). |
FASTCV_API void fcvAdaptiveThresholdGaussian3x3u8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t | maxValue, | ||
fcvThreshType | thresholdType, | ||
int32_t | value, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Binarizes a grayscale image based on an adaptive threshold value calculated from 3x3 Gaussian kernel.
For each pixel, the threshold is computed adaptively based on cross-correlation with a 3x3 Gaussian kernel minus value (parameter). The standard deviation is used for Gaussian kernel. For FCV_THRESH_BINARY threshold type, the pixel is set as maxValue if it's value is greater than the threshold; else, it is set as zero. For FCV_THRESH_BINARY_INV threshold type, the pixel is set as zero if it's value is greater than the threshold; else, it is set as maxValue.
src | Pointer to the 8-bit input image. |
srcWidth | Width of source images pointed by src. |
srcHeight | Height of source images pointed by src. |
srcStride | Stride of source image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). |
maxValue | The maximum integer value to be used. 0<maxValue<256. |
thresholdType | Threshold type. It could be either FCV_THRESH_BINARY or FCV_THRESH_BINARY_INV. |
value | The constant value subtracted after the cross-correlation with Gaussian kernel. It is usually positive but could be 0 or negative too. |
dst | Pointer to the 8-bit destination image. Destination iamge has the same size as input image. |
dstStride | Stride of destination image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). |
FASTCV_API void fcvAdaptiveThresholdGaussian5x5u8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t | maxValue, | ||
fcvThreshType | thresholdType, | ||
int32_t | value, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Binarizes a grayscale image based on an adaptive threshold value calculated from 5x5 Gaussian kernel.
For each pixel, the threshold is computed adaptively based on cross-correlation with a 5x5 Gaussian kernel minus value (parameter). The standard deviation is used for Gaussian kernel. For FCV_THRESH_BINARY threshold type, the pixel is set as maxValue if it's value is greater than the threshold; else, it is set as zero. For FCV_THRESH_BINARY_INV threshold type, the pixel is set as zero if it's value is greater than the threshold; else, it is set as maxValue.
src | Pointer to the 8-bit input image. |
srcWidth | Width of source images pointed by src. |
srcHeight | Height of source images pointed by src. |
srcStride | Stride of source image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). |
maxValue | The maximum integer value to be used. 0<maxValue<256. |
thresholdType | Threshold type. It could be either FCV_THRESH_BINARY or FCV_THRESH_BINARY_INV. |
value | The constant value subtracted after the cross-correlation with Gaussian kernel. It is usually positive but could be 0 or negative too. |
dst | Pointer to the 8-bit destination image. Destination iamge has the same size as input image. |
dstStride | Stride of destination image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). |
FASTCV_API void fcvAdaptiveThresholdMean11x11u8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t | maxValue, | ||
fcvThreshType | thresholdType, | ||
int32_t | value, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Binarizes a grayscale image based on an adaptive threshold value calculated from 11x11 mean.
For each pixel, the threshold is computed adaptively based on the mean of 11x11 block centered on the pixel minus value (parameter). For FCV_THRESH_BINARY threshold type, the pixel is set as maxValue if it's value is greater than the threshold; else, it is set as zero. For FCV_THRESH_BINARY_INV threshold type, the pixel is set as zero if it's value is greater than the threshold; else, it is set as maxValue.
src | Pointer to the 8-bit input image. |
srcWidth | Width of source images pointed by src. |
srcHeight | Height of source images pointed by src. |
srcStride | Stride of source image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). |
maxValue | The maximum integer value to be used. 0<maxValue<256. |
thresholdType | Threshold type. It could be either FCV_THRESH_BINARY or FCV_THRESH_BINARY_INV. |
value | The constant value subtracted from the mean. It is usually positive but could be 0 or negative too. |
dst | Pointer to the 8-bit destination image. Destination iamge has the same size as input image. |
dstStride | Stride of destination image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). |
FASTCV_API void fcvAdaptiveThresholdMean3x3u8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t | maxValue, | ||
fcvThreshType | thresholdType, | ||
int32_t | value, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Binarizes a grayscale image based on an adaptive threshold value calculated from 3x3 mean.
For each pixel, the threshold is computed adaptively based on the mean of 3x3 block centered on the pixel minus value (parameter). For FCV_THRESH_BINARY threshold type, the pixel is set as maxValue if it's value is greater than the threshold; else, it is set as zero. For FCV_THRESH_BINARY_INV threshold type, the pixel is set as zero if it's value is greater than the threshold; else, it is set as maxValue.
src | Pointer to the 8-bit input image. |
srcWidth | Width of source images pointed by src. |
srcHeight | Height of source images pointed by src. |
srcStride | Stride of source image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). |
maxValue | The maximum integer value to be used. 0<maxValue<256. |
thresholdType | Threshold type. It could be either FCV_THRESH_BINARY or FCV_THRESH_BINARY_INV. |
value | The constant value subtracted from the mean. It is usually positive but could be 0 or negative too. |
dst | Pointer to the 8-bit destination image. Destination iamge has the same size as input image. |
dstStride | Stride of destination image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). |
FASTCV_API void fcvAdaptiveThresholdMean5x5u8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t | maxValue, | ||
fcvThreshType | thresholdType, | ||
int32_t | value, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Binarizes a grayscale image based on an adaptive threshold value calculated from 5x5 mean.
For each pixel, the threshold is computed adaptively based on the mean of 5x5 block centered on the pixel minus value (parameter). For FCV_THRESH_BINARY threshold type, the pixel is set as maxValue if it's value is greater than the threshold; else, it is set as zero. For FCV_THRESH_BINARY_INV threshold type, the pixel is set as zero if it's value is greater than the threshold; else, it is set as maxValue.
src | Pointer to the 8-bit input image. |
srcWidth | Width of source images pointed by src. |
srcHeight | Height of source images pointed by src. |
srcStride | Stride of source image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). |
maxValue | The maximum integer value to be used. 0<maxValue<256. |
thresholdType | Threshold type. It could be either FCV_THRESH_BINARY or FCV_THRESH_BINARY_INV. |
value | The constant value subtracted from the mean. It is usually positive but could be 0 or negative too. |
dst | Pointer to the 8-bit destination image. Destination iamge has the same size as input image. |
dstStride | Stride of destination image (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). |
FASTCV_API void fcvAverages32 | ( | const int32_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
float32_t *__restrict | avgValue | ||
) |
This function calculates the average value of an image.
This function sums all the pixel value in an image and divide the result by the number of pixels in the image.
src | The input image/patch. Must be 32 bit image. Size of buffer is srcStride*srcHeight bytes. NOTE: should be 128-bit aligned. |
srcWidth | Image width, the number of pixels in a row NOTE: should be a multiple of 8. |
srcHeight | Image height |
srcStride | Stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth. NOTE: should be a multiple of 8. |
avgValue | The output average value. |
FASTCV_API void fcvAverageu8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
float32_t *__restrict | avgValue | ||
) |
This function calculates the average value of an image.
This function sums all the pixel value in an image and divide the result by the number of pixels in the image.
src | 8-bit image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes. NOTE: should be 128-bit aligned. |
srcWidth | Image width, the number of pixels in a row NOTE: should be a multiple of 8. |
srcHeight | Image height |
srcStride | Stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth. NOTE: should be a multiple of 8. |
avgValue | The output average value. |
FASTCV_API void fcvBilateralFilter5x5u8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
bilateral smoothing with a 5x5 bilateral kernel
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvBilateralFilter5x5u8_v2(). In the 2.0.0 release, fcvBilateralFilter5x5u8_v2 will be renamed to fcvBilateralFilter5x5u8 and the signature of fcvBilateralFilter5x5u8 as it appears now, will be removed.
The bilateral filter applied here considered 5-pixel diameter of each pixel's neighborhood. The filter sigma in color space is set to 50 and the sigma in coordinate space is set to 1.
src | Input uint8_t image. |
srcWidth | Input image width. |
srcHeight | Input image height. |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
dst | Output image which has the same type, and size as the input image. |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
FASTCV_API fcvStatus fcvBilateralFilter5x5u8_v2 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
float32_t | sigmaColor, | ||
float32_t | sigmaSpace | ||
) |
bilateral smoothing with a 5x5 bilateral kernel
ATTENTION: This function is a duplication of fcvBilateralFilter5x5u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvBilateralFilter5x5u8, fcvBilateralFilter5x5u8_v2 will be removed, and the current signature for fcvBilateralFilter5x5u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvBilateralFilter5x5u8 when transitioning to 2.0.0.
The bilateral filter applied here considered 5-pixel diameter of each pixel's neighborhood. If sigmaColor is set to 50 and sigmaSpace is set to 1, then fcvBilateralFilter5x5u8 is called
src | Input uint8_t image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Input image width. |
srcHeight | Input image height. |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row WARNING: should be multiple of 8. |
dst | Output uint8_t image. Size of buffer is dstStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row WARNING: should be multiple of 8. |
sigmaColor | Filter sigma in the color space. Typical value is 50.0f. Increasing this value means increasing the influence of the neighboring pixels of more different Color to the smoothing result. |
sigmaSpace | Filter sigma in the coordinate space. Typical value is 1.0f. Increasing this value means increasing the influence of farther neighboring pixels within the kernel size distance to the smoothing result. |
FASTCV_API void fcvBilateralFilter7x7u8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Bilateral smoothing with 7x7 bilateral kernel.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvBilateralFilter7x7u8_v2(). In the 2.0.0 release, fcvBilateralFilter7x7u8_v2 will be renamed to fcvBilateralFilter7x7u8 and the signature of fcvBilateralFilter7x7u8 as it appears now, will be removed.
The bilateral filter applied here considered 7-pixel diameter of each pixel's neighborhood. The filter sigma in color space is set to 50 and the sigma in coordinate space is set to 1.5 .
src | Input uint8_t image. |
srcWidth | Input image width. |
srcHeight | Input image height. |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
dst | Output image which has the same type, and size as the input image. |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
FASTCV_API fcvStatus fcvBilateralFilter7x7u8_v2 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
float32_t | sigmaColor, | ||
float32_t | sigmaSpace | ||
) |
Bilateral smoothing with 7x7 bilateral kernel.
ATTENTION: This function is a duplication of fcvBilateralFilter7x7u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvBilateralFilter7x7u8, fcvBilateralFilter7x7u8_v2 will be removed, and the current signature for fcvBilateralFilter7x7u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvBilateralFilter7x7u8 when transitioning to 2.0.0.
The bilateral filter applied here considered 7-pixel diameter of each pixel's neighborhood. If sigmaColor is set to 50 and sigmaSpace is set to 1.5 then fcvBilateralFilter7x7u8 is called.
src | Input uint8_t image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Input image width. |
srcHeight | Input image height. |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row WARNING: should be multiple of 8. |
dst | Output uint8_t image. Size of buffer is dstStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row WARNING: should be multiple of 8. |
sigmaColor | Filter sigma in the color space. Typical value is 50.0f. Increasing this value means increasing the influence of the neighboring pixels of more different Color to the smoothing result. |
sigmaSpace | Filter sigma in the coordinate space. Typical value is 1.5f. Increasing this value means increasing the influence of farther neighboring pixels within the kernel size distance to the smoothing result. |
FASTCV_API void fcvBilateralFilter9x9u8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Bilateral smoothing with 9x9 bilateral kernel.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvBilateralFilter9x9u8_v2(). In the 2.0.0 release, fcvBilateralFilter9x9u8_v2 will be renamed to fcvBilateralFilter9x9u8 and the signature of fcvBilateralFilter9x9u8 as it appears now, will be removed.
The bilateral filter applied here considered 9-pixel diameter of each pixel's neighborhood. The filter sigma in color space is set to 50 and the sigma in coordinate space is set to 2.
src | Input uint8_t image. |
srcWidth | Input image width. |
srcHeight | Input image height. |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
dst | Output image which has the same type, and size as the input image. |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
FASTCV_API fcvStatus fcvBilateralFilter9x9u8_v2 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
float32_t | sigmaColor, | ||
float32_t | sigmaSpace | ||
) |
Bilateral smoothing with 9x9 bilateral kernel.
ATTENTION: This function is a duplication of fcvBilateralFilter9x9u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvBilateralFilter9x9u8, fcvBilateralFilter9x9u8_v2 will be removed, and the current signature for fcvBilateralFilter9x9u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvBilateralFilter9x9u8 when transitioning to 2.0.0.
The bilateral filter applied here considered 9-pixel diameter of each pixel's neighborhood. If sigmaColor is set to 50 and sigmaSpace is set to 2, then fcvBilateralFilter9x9u8 is called.
src | Input uint8_t image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Input image width. |
srcHeight | Input image height. |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row WARNING: should be multiple of 8. |
dst | Output uint8_t image. Size of buffer is dstStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row WARNING: should be multiple of 8. |
sigmaColor | Filter sigma in the color space. Typical value is 50.0f. Increasing this value means increasing the influence of the neighboring pixels of more different Color to the smoothing result. |
sigmaSpace | Filter sigma in the coordinate space. Typical value is 2.0f. Increasing this value means increasing the influence of farther neighboring pixels within the kernel size range to the smoothing result. |
FASTCV_API fcvStatus fcvBilateralFilterRecursiveu8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
float32_t | sigmaColor, | ||
float32_t | sigmaSpace | ||
) |
Recursive Bilateral Filtering.
The algorithm is described in paper Recursive Bilateral Filtering, ECCV2012 by Prof Yang Qingxiong Different from traditional bilateral filtering, the bilateral filtering in this algorithm is actually performed in gradient domain. The results are ususally better than tradition bilateral filters. Filtering is carried out in a recursive way, and it is efficient.
src | Input uint8_t image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Input image width. |
srcHeight | Input image height. |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row WARNING: should be multiple of 8. |
dst | Output uint8_t image. Size of buffer is dstStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row WARNING: should be multiple of 8. |
sigmaColor | Filter sigma in the color space. Typical value 0.03f. Increasing this value means increasing the influence of the neighboring pixels of more different Color to the smoothing result. |
sigmaSpace | Filter sigma in the coordinate space. Typical value 0.1f. Increasing this value means increasing the influence of farther pixels to the smoothing result. |
FASTCV_API void fcvBitwiseOrs32 | ( | const int32_t *__restrict | src1, |
const int32_t *__restrict | src2, | ||
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
int32_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
uint8_t *__restrict | mask, | ||
uint32_t | maskStride | ||
) |
Performs per-element bitwise-OR operation on two 32-bit single channel images. Two images should have the same size. dst(I)=src1(I) V src2(I) if mask(I) is not zero.
src1 | Pointer to the 32-bit source image 1. |
src2 | Pointer to the 32-bit source image 2. |
srcWidth | Width of source images pointed by src1 and src2. |
srcHeight | Height of source images pointed by src1 and src2. |
srcStride | Stride of source images (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). |
dst | Pointer to the 8-bit destination image. |
dstStride | Stride of destination image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). |
mask | Pointer to the 8-bit single channel mask. It specifies elements of the destination array to be changed. The mask is optional. If there is no mask, the value is NULL. |
maskStride | Stride of the mask (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If there is no mask, the value is 0. |
FASTCV_API void fcvBitwiseOru8 | ( | const uint8_t *__restrict | src1, |
const uint8_t *__restrict | src2, | ||
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
uint8_t *__restrict | mask, | ||
uint32_t | maskStride | ||
) |
Performs per-element bitwise-OR operation on two 8-bit single channel images. Two images should have the same size. dst(I)=src1(I) V src2(I) if mask(I) is not zero.
src1 | Pointer to the 8-bit source image 1. |
src2 | Pointer to the 8-bit source image 2. |
srcWidth | Width of source images pointed by src1 and src2. |
srcHeight | Height of source images pointed by src1 and src2. |
srcStride | Stride of source images (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). |
dst | Pointer to the 8-bit destination image. |
dstStride | Stride of destination image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). |
mask | Pointer to the 8-bit single channel mask. It specifies elements of the destination array to be changed. The mask is optional. If there is no mask, the value is NULL. |
maskStride | Stride of the mask (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If there is no mask, the value is 0. |
FASTCV_API void fcvBoxFilter11x11u8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Smooth a uint8_t image with a 11x11 box filter.
smooth with 11x11 box kernel and normalize:
src | Input uint8_t image. |
srcWidth | Input image width. |
srcHeight | Input image height. |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
dst | Output image which has the same type, and size as the input image. |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
FASTCV_API void fcvBoxFilter3x3u8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Smooth a uint8_t image with a 3x3 box filter.
smooth with 3x3 box kernel and normalize:
[ 1 1 1
1 1 1
1 1 1 ]/9
src | Input uint8_t image. |
srcWidth | Input image width. |
srcHeight | Input image height. |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
dst | Output image which has the same type, and size as the input image. |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
FASTCV_API fcvStatus fcvBoxFilter3x3u8_v2 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
fcvBorderType | borderType, | ||
uint8_t | borderValue | ||
) |
Smooth a uint8_t image with a 3x3 box filter with border handling scheme specified by user.
smooth with 3x3 box kernel and normalize:
[ 1 1 1
1 1 1
1 1 1 ]/9
src | Input uint8_t image. |
srcWidth | Input image width. |
srcHeight | Input image height. |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
dst | Output image which has the same type, and size as the input image. |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
borderType | This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT, FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED, border values will be set to 0. |
borderValue | Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes, set this value as 0. Can take values between 0 and 255. |
FASTCV_API void fcvBoxFilter5x5u8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Smooth a uint8_t image with a 5x5 box filter.
smooth with 5x5 box kernel and normalize:
[ 1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1 ]/25
src | Input uint8_t image. |
srcWidth | Input image width. |
srcHeight | Input image height. |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
dst | Output image which has the same type, and size as the input image. |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
FASTCV_API void fcvBoxFilterNxNf32 | ( | const float32_t * | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t | N, | ||
float32_t * | dst, | ||
uint32_t | dstStride | ||
) |
Smooth a float32_t image with a NxN box filter. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place.
smooth with NxN box kernel and normalize:
src | Input float32_t image. |
srcWidth | Input image width. |
srcHeight | Input image height. |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
N | Seperable kernel size. N must be greater than 1. |
dst | Output image which has the same type, and size as the input image. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place. |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row |
FASTCV_API fcvStatus fcvChannelCombine2Planesu8 | ( | const uint8_t *__restrict | src1, |
uint32_t | width, | ||
uint32_t | height, | ||
uint32_t | src1Stride, | ||
const uint8_t *__restrict | src2, | ||
uint32_t | src2Stride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Combine two channels in an interleaved fashion.
Interleave data from src1 and src2 to dst. Data in src1 [d0 d1 d2 d3...] Data in src2 [t0 t1 t2 t3...] Results in dst [d0 t0 d1 t1 d2 t2 d3 t3...]
NOTE: Perform the same functionality as fcvInterleaveu8.
src1 | One of the input images ( For example, Cb or Cr component) NOTE: array should be 128-bit aligned |
width | Width of the source image. |
height | Height of the source image. |
src1Stride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src1Stride is default to width. WARNING: should be multiple of 8 |
src2 | One of the input images ( For example, Cb or Cr component) NOTE: array should be 128-bit aligned |
src2Stride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src2Stride is default to width. WARNING: should be multiple of 8 |
dst | The result image (uint8_t type). NOTE: array should be 128-bit aligned |
dstStride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2. WARNING: should be multiple of 8 |
FASTCV_API fcvStatus fcvChannelCombine3Planesu8 | ( | const uint8_t *__restrict | src1, |
uint32_t | width, | ||
uint32_t | height, | ||
uint32_t | src1Stride, | ||
const uint8_t *__restrict | src2, | ||
uint32_t | src2Stride, | ||
const uint8_t *__restrict | src3, | ||
uint32_t | src3Stride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Combine three channels in an interleaved fashion.
Interleave data from src1, src2 and src3 to dst. Data in src1 [d0 d1 d2 d3...] Data in src2 [t0 t1 t2 t3...] Data in src3 [s0 s1 s2 s3...] Results in dst [d0 t0 s0 d1 t1 s1 d2 t2 s2 d3 t3 s3...]
src1 | One of the input images ( For example, R or G or B component) NOTE: array should be 128-bit aligned |
width | Width of the source image. |
height | Height of the source image. |
src1Stride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src1Stride is default to width. WARNING: should be multiple of 8 |
src2 | One of the input images ( For example, R or G or B component) NOTE: array should be 128-bit aligned |
src2Stride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src2Stride is default to width. WARNING: should be multiple of 8 |
src3 | One of the input images ( For example, R or G or B component) NOTE: array should be 128-bit aligned |
src3Stride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src3Stride is default to width. WARNING: should be multiple of 8 |
dst | The result image (uint8_t type). NOTE: array should be 128-bit aligned |
dstStride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 dstStride is default to width*3. WARNING: should be multiple of 8 |
FASTCV_API fcvStatus fcvChannelCombine4Planesu8 | ( | const uint8_t *__restrict | src1, |
uint32_t | width, | ||
uint32_t | height, | ||
uint32_t | src1Stride, | ||
const uint8_t *__restrict | src2, | ||
uint32_t | src2Stride, | ||
const uint8_t *__restrict | src3, | ||
uint32_t | src3Stride, | ||
const uint8_t *__restrict | src4, | ||
uint32_t | src4Stride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Combine four channels in an interleaved fashion.
Interleave data from src1, src2, src3 and src4 to dst. Data in src1 [d0 d1 d2 d3...] Data in src2 [t0 t1 t2 t3...] Data in src3 [s0 s1 s2 s3...] Data in src3 [r0 r1 r2 r3...] Results in dst [d0 t0 s0 r0 d1 t1 s1 r1 d2 t2 s2 r2 d3 t3 s3 r3...]
src1 | One of the input images ( For example, R or G or B or A component) NOTE: array should be 128-bit aligned |
width | Width of the source image. |
height | Height of the source image. |
src1Stride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src1Stride is default to width. WARNING: should be multiple of 8 |
src2 | One of the input images ( For example, R or G or B or A component) NOTE: array should be 128-bit aligned |
src2Stride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src2Stride is default to width. WARNING: should be multiple of 8 |
src3 | One of the input images ( For example, R or G or B or A component) NOTE: array should be 128-bit aligned |
src3Stride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src3Stride is default to width. WARNING: should be multiple of 8 |
src4 | One of the input images ( For example, R or G or B or A component) NOTE: array should be 128-bit aligned |
src4Stride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src4Stride is default to width. WARNING: should be multiple of 8 |
dst | The result image (uint8_t type). NOTE: array should be 128-bit aligned |
dstStride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 dstStride is default to width*4. WARNING: should be multiple of 8 |
FASTCV_API fcvStatus fcvChannelExtractu8 | ( | const uint8_t *__restrict | src1, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | src1Stride, | ||
const uint8_t *__restrict | src2, | ||
uint32_t | src2Stride, | ||
const uint8_t *__restrict | src3, | ||
uint32_t | src3Stride, | ||
fcvChannelType | srcChannel, | ||
fcvImageFormat | srcFormat, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Extract channel as a single uint8_t type plane from an interleaved or multi-planar image format.
src1 | The first plane in source image. For example, an intervealved RGB/RGBA plane or the Y plane. NOTE: array should be 128-bit aligned |
width | Width of the source image. |
height | Height of the source image. |
src1Stride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src1Stride is default to the size required by corresponding image format. WARNING: should be multiple of 8 |
src2 | The second plane in souce image if available; otherwise, left at 0. For example, the intervealved CbCr plane in FASTCV_NV12/FASTCV_NV21; or the Cb plane in FASTCV_IYUV/FASTCV_YUV4. NOTE: array should be 128-bit aligned |
src2Stride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0, src2Stride is default to width for FASTCV_NV12/FASTCV_NV21/FASTCV_YUV4 and width/2 for FASTCV_IYUV. WARNING: should be multiple of 8 |
src3 | The third plane in souce image if available; otherwise, left at 0. For example, the Cr plane in FASTCV_IYUV/FASTCV_YUV4. NOTE: array should be 128-bit aligned |
src3Stride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 src3Stride is default to width for FASTCV_YUV4, and width/2 for FASTCV_IYUV. WARNING: should be multiple of 8 |
srcChannel | The index of the image channel to be extracted. Refer to fcvChannelType for details. |
srcFormat | The format of the source image. Different image formats require different src and dst size. Refer to fcvImageFormat for details. |
dst | The result image (a uint8_t type plane). NOTE: array should be 128-bit aligned |
dstStride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0, dstStride is default to the size required by corresponding image format. WARNING: should be multiple of 8 |
FASTCV_API fcvStatus fcvConvertDepths16u8 | ( | const int16_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t | shift, | ||
fcvConvertPolicy | policy, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Converts the bit depth of a single-channel int16_t image to uint8_t type.
src | Input int16_t image. The size of buffer is srcStride*srcHeight bytes NOTE: should be 128-bit aligned |
srcWidth | Input image width |
srcHeight | Input image height |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row if srcStride is equal to 0, it will be set to srcWidth*2 NOTE: should be a multiple of 8 |
shift | The number of bits to be left-shifted to adjust the output NOTE: range from 0 to 15 |
policy | Conversion policy that decides how data overflow should be handled |
dst | Output image which has the same dimension as the input image in uint8_t type NOTE: should be 128-bit aligned |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row if dstStride is equal to 0, it will be set to srcWidth NOTE: should be a multiple of 8 |
FASTCV_API fcvStatus fcvConvertDepthu8s16 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t | shift, | ||
int16_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Converts the bit depth of a single-channel uint8 image to int16_t type.
src | Input uint8_t image. The size of buffer is srcStride*srcHeight bytes NOTE: should be 128-bit aligned |
srcWidth | Input image width |
srcHeight | Input image height |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row if srcStride is equal to 0, it will be set to srcWidth NOTE: should be a multiple of 8 |
shift | The number of bits to be right-shifted to adjust the output NOTE: range from 0 to 8 |
dst | Output image which has the same dimension as the input image in int16_t type NOTE: should be 128-bit aligned |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row if dstStride is equal to 0, it will be set to srcWidth*2 NOTE: should be a multiple of 8 |
FASTCV_API void fcvConvValids16 | ( | const int16_t *__restrict | src1, |
uint32_t | src1Width, | ||
uint32_t | src1Height, | ||
uint32_t | src1Stride, | ||
const int16_t *__restrict | src2, | ||
uint32_t | src2Width, | ||
uint32_t | src2Height, | ||
uint32_t | src2Stride, | ||
int32_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Performs a valid convolution of two images.
This function does convolution of two images. Values are computed for the region where one image is completely within the other image.
src1 | First source image of int16 type WARNING: should be 128-bit aligned. |
src1Width | Image width. |
src1Height | Image height. |
src1Stride | Stride of source image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If set to 0, srcStride is srcWidth in bytes as default |
src2 | Second source image of int16 type WARNING: should be 128-bit aligned. |
src2Width | Image width. Must meet this condition: src2Width <= src1Width |
src2Height | Image height. Must meet this condition: src2Height <= src1Height |
src2Stride | Stride of source images (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If set to 0, srcStride is src2Width in bytes as default |
dst | Destination image of int32 type. Size of destination is (src1Width-src2Width+1) x (src1Height-src2Height+1) WARNING: should be 128-bit aligned. |
dstStride | Stride of destination image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). |
FASTCV_API void fcvEdgeWeightings16 | ( | int16_t *__restrict | edgeMap, |
const uint32_t | edgeMapWidth, | ||
const uint32_t | edgeMapHeight, | ||
const uint32_t | edgeMapStride, | ||
const uint32_t | weight, | ||
const uint32_t | edge_limit, | ||
const uint32_t | hl_threshold, | ||
const uint32_t | hh_threshold, | ||
const uint32_t | edge_denoise_factor | ||
) |
Performs edge weighting on input image.
The following filtes are used for edge weighting.
[ 0 1 -1 ] Vertical edge filter: [ 0 2 -2 ] [ 0 1 -1 ]
[ 0 0 0 ] Horizontal edge filter: [ 1 2 1 ] [ -1 -2 -1 ]
edgeMap | Input edge map data NOTE: should be 128-bit aligned. |
edgeMapWidth | Input edge map width NOTE: should be a multiple of 8. |
edgeMapHeight | Input edge map height |
edgeMapStride | Stride of input edge map (i.e., number of bytes between column 0 of row 0 and column 0 of row 1). If left at 0, edgeMapStride is default to edgeMapWidth * 2. NOTE: should be a multiple of 8. |
weight | The given edge weighting weight. It is set to be 6554 (0.2 in Q15 format). |
edge_limit | The threshold to distinguish edges from noises. A pixel is from an edge if the filtered value is greater than the edge_limit. |
hl_threshold | The limit of a pixel value reduction in HL band. |
hh_threshold | The limit of a pixel value reduction in HH band. |
edge_denoise_factor | Edge denoising factor to make sure a pixel value is reduced only when the pixel is a noise pixel. |
FASTCV_API void fcvFilterCanny3x3u8 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
uint8_t *__restrict | dst, | ||
int | lowThresh, | ||
int | highThresh | ||
) |
Canny edge filter.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterCanny3x3u8_v2(). In the 2.0.0 release, fcvFilterCanny3x3u8_v2 will be renamed to fcvFilterCanny3x3u8 and the signature of fcvFilterCanny3x3u8 as it appears now, will be removed.
Canny edge detector applied to a 8 bit grayscale image. The min threshold is set to 0 and the max threshold is set to 15. The aperture size used is set to 3. This function will output the edge, since its working with a 3x3 window, it leaves one row/col of pixels at the corners map stored as a binarized image (0x0 - not an edge, 0xFF - edge). | a(1,1) , a12, ..., a(1,srcWidth-2) |
| ... , ..., ..., ... |
| a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |
src | Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes. WARNING: data should be 128-bit aligned. |
srcWidth | Image width. NOTE: should be multiple of 8 |
srcHeight | Image height. |
dst | Output 8-bit image containing the edge detection results. Size of buffer is srcWidth*srcHeight bytes. |
lowThresh | For all the intermediate pixels along the edge, the magnitude of the gradient at the pixel locations should be greater than 'low' (sqrt(gx^2 + gy^2) > low, where gx and gy are X and Y gradient) |
highThresh | For an edge starting point, i.e. either the first or last pixel of the edge, the magnitude of the gradient at the pixel should be greater than 'high' (sqrt(gx^2 + gy^2) > high, where gx and gy are X and Y gradient). |
FASTCV_API void fcvFilterCanny3x3u8_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
uint8_t *__restrict | dst, | ||
unsigned int | dstStride, | ||
int | lowThresh, | ||
int | highThresh | ||
) |
Canny edge filter.
ATTENTION: This function is a duplication of fcvFilterCanny3x3u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterCanny3x3u8, fcvFilterCanny3x3u8_v2 will be removed, and the current signature for fcvFilterCanny3x3u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterCanny3x3u8 when transitioning to 2.0.0.
Canny edge detector applied to a 8 bit grayscale image. The Canny edge detector uses min/max threshold to classify an edge. The min threshold is set to 0 and the max threshold is set to 15. The aperture size used in the Canny edge detector will be same as the filter footprint in the Sobel edge detector and is set to 3. This function will output the edge map stored as a binarized image (0x0 - not an edge, 0xFF - edge), since it works with 3x3 windows, it leaves 1 row/col of pixels at the corners. | a(1,1) , a12, ..., a(1,srcWidth-2) |
| ... , ..., ..., ... |
| a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: data should be 128-bit aligned. |
srcWidth | Image width. NOTE: should be multiple of 8 |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit image containing the edge detection results. Size of buffer is dstStride*srcHeight bytes. |
dstStride | Output stride. NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
lowThresh | For all the intermediate pixels along the edge, the magnitude of the gradient at the pixel locations should be greater than 'low' (sqrt(gx^2 + gy^2) > low, where gx and gy are X and Y gradient) |
highThresh | For an edge starting point, i.e. either the first or last pixel of the edge, the magnitude of the gradient at the pixel should be greater than 'high' (sqrt(gx^2 + gy^2) > high, where gx and gy are X and Y gradient). |
FASTCV_API void fcvFilterCanny3x3u8_v3 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
uint8_t *__restrict | dst, | ||
unsigned int | dstStride, | ||
int16_t *__restrict | gx, | ||
int16_t *__restrict | gy, | ||
unsigned int | gradStride, | ||
int | lowThresh, | ||
int | highThresh | ||
) |
Canny edge filter.
ATTENTION: This function is in the extension lib.
ATTENTION: This function is a duplication of fcvFilterCanny3x3u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterCanny3x3u8, fcvFilterCanny3x3u8_v3 will be removed, and the current signature for fcvFilterCanny3x3u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterCanny3x3u8 when transitioning to 2.0.0.
Canny edge detector applied to a 8 bit grayscale image. The Canny edge detector uses min/max threshold to classify an edge. The min threshold is set to 0 and the max threshold is set to 15. The aperture size used in the Canny edge detector will be same as the filter footprint in the Sobel edge detector and is set to 3. This function will output the edge map stored as a binarized image (0x0 - not an edge, 0xFF - edge), since it works with 3x3 windows, it leaves 1 row/col of pixels at the corners. | a(1,1) , a12, ..., a(1,srcWidth-2) |
| ... , ..., ..., ... |
| a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: data should be 128-bit aligned. |
srcWidth | Image width. NOTE: should be multiple of 8 |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit image containing the edge detection results. Size of buffer is dstStride*srcHeight bytes. |
dstStride | Output stride. NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
gx | gradient in X direction. NOTE: use NULL if do not need the gradient output. |
gy | gradient in Y direction. NOTE: use NULL if do not need the gradient output. |
gradStride | Output stride for gx and gy. NOTE: if 0, dstStride is set as srcWidth*2. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
lowThresh | For all the intermediate pixels along the edge, the magnitude of the gradient at the pixel locations should be greater than 'low' (sqrt(gx^2 + gy^2) > low, where gx and gy are X and Y gradient) |
highThresh | For an edge starting point, i.e. either the first or last pixel of the edge, the magnitude of the gradient at the pixel should be greater than 'high' (sqrt(gx^2 + gy^2) > high, where gx and gy are X and Y gradient). |
FASTCV_API fcvStatus fcvFilterCannyu8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t | kernelSize, | ||
int32_t | lowThresh, | ||
int32_t | highThresh, | ||
fcvNormType | normType, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
int16_t *__restrict | gx, | ||
int16_t *__restrict | gy, | ||
uint32_t | gradStride | ||
) |
Canny edge detection with more controls to configurate the algorithm.
Canny edge detector applied to a 8 bit grayscale image. The results are stored as a binarized image (0x0 - not an edge, 0xFF - edge).
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: data should be 128-bit aligned. |
srcWidth | Image width. NOTE: should be multiple of 8 |
srcHeight | Image height. |
srcStride | Stride of the input image in bytes. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
kernelSize | The Sobel kernel size for calculating gradient. Supported sizes are 3, 5 and 7. |
lowThresh | For all the intermediate pixels along the edge, the norm of the gradient at the pixel locations should be greater than 'lowThresh'. |
highThresh | For an edge starting point, i.e. either the first or last pixel of the edge, the norm of the gradient at the pixel should be greater than 'highThresh'. |
normType | The norm definition to calculate the gradient magnitude. See fcvNormType. |
dst | Output 8-bit binarized image containing the edge detection results. Size of buffer is dstStride*srcHeight bytes. Edges are marked with pixels of 0xFF. The rest pixels have values of 0. |
dstStride | Stride of the output image in bytes. NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
gx | Buffer to store horizontal gradient. Must be (gradStride)*(srcHeight) bytes in size. NOTE: should be 128-bit aligned. |
gy | Buffer to store vertical gradient. Must be (gradStride)*(srcHeight) bytes in size. NOTE: should be 128-bit aligned. |
gradStride | Stride (in bytes) of 'gx' and 'gy' gradient arrays, is the number of bytes between column 0 of row 1 and column 0 of row 2 in the gradient arrays dx or dy. If left at 0 gradStride is default to 2 * srcWidth. NOTE: should be multiple of 8. |
FASTCV_API fcvStatus fcvFilterConvolveMxNu8 | ( | const int16_t *__restrict | kernel, |
uint32_t | M, | ||
uint32_t | N, | ||
int8_t | shift, | ||
const uint8_t *__restrict | src, | ||
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
fcvBorderType | borderType, | ||
uint8_t | borderValue | ||
) |
Computes the convolution of a image with an M x N Kernel.
The function computes the convolution of an unsigned char input image with an M x N kernel of type short. The output is of type unsigned char and is of the same size as the input image. The convolution is computed based on the type of Border handling selected.
kernel | Input M x N short kernel matrix. The size of buffer is M*N*sizeof(int16_t) bytes The kernel can be normalized before passing in by making use of the shift parameter. |
M | Width of the kernel |
N | Height of the kernel |
shift | This parameter can be used to normalize the input kernel by converting the data into fixed point values. Shift can be considered as Q factor of kernel. |
src | Input uint8_t image. The size of buffer is srcStride*srcHeight bytes NOTE: should be 128-bit aligned |
srcWidth | Input image width |
srcHeight | Input image height |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row. If srcStride is equal to 0, it will be set to srcWidth. NOTE: should be a multiple of 8 |
dst | Output image which has the same dimensions as the input matrix. The output is of type unsigned char, and must be allocated as dstStride*srcHeight bytes. NOTE: should be 128-bit aligned |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row. If dstStride is equal to 0, it will be set to srcWidth. NOTE: should be a multiple of 8 |
borderType | This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT, FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED, border values will be set to 0. |
borderValue | Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes, set this value as 0. Can take values between 0 and 255. |
FASTCV_API fcvStatus fcvFilterConvolveMxNu8s16 | ( | const int16_t *__restrict | kernel, |
uint32_t | M, | ||
uint32_t | N, | ||
int8_t | shift, | ||
const uint8_t *__restrict | src, | ||
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
int16_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
fcvBorderType | borderType, | ||
uint8_t | borderValue | ||
) |
Computes the convolution of an image with an M x N Kernel.
The function computes the convolution of an unsigned char input image with an M x N kernel of type short. The output is of type short and is of the same size as the input image. The convolution is computed based on the type of Border handling selected.
kernel | Input M x N short kernel matrix. The size of buffer is M*N*sizeof(int16_t) bytes The kernel can be normalized before passing in by making use of the shift parameter. |
M | Width of the kernel |
N | Height of the kernel |
shift | This parameter can be used to normalize the input kernel by converting the data into fixed point values. Shift can be considered as Q factor of kernel. |
src | Input uint8_t image. The size of buffer is srcStride*srcHeight bytes NOTE: should be 128-bit aligned |
srcWidth | Input image width |
srcHeight | Input image height |
srcStride | Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row. If srcStride is equal to 0, it will be set to srcWidth. NOTE: should be a multiple of 8 |
dst | Output image which has the same dimensions as the input matrix. The output is of type short, and must be allocated as dstStride*srcHeight bytes. NOTE: should be 128-bit aligned |
dstStride | Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row. If dstStride is equal to 0, it will be set to srcWidth * sizeof(int16_t). NOTE: should be a multiple of 8 |
borderType | This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT, FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED, border values will be set to 0. |
borderValue | Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes, set this value as 0. Can take values between 0 to 255. |
FASTCV_API void fcvFilterCorr3x3s8 | ( | const int8_t *__restrict | kernel, |
const uint8_t *__restrict | src, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
uint8_t *__restrict | dst | ||
) |
3x3 correlation with non-separable kernel.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterCorr3x3s8_v2(). In the 2.0.0 release, fcvFilterCorr3x3s8_v2 will be renamed to fcvFilterCorr3x3s8 and the signature of fcvFilterCorr3x3s8 as it appears now, will be removed.
kernel | 2-D 3x3 kernel. NOTE: Normalized to Q4.4 |
src | Input image. Size of buffer is srcWidth*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. NOTE: must be an even number |
srcHeight | Image height. NOTE: must be an even number |
dst | Output convolution. Border values are ignored in this function. Size of buffer is srcWidth*srcHeight bytes. NOTE: Must be same size as src WARNING: should be 128-bit aligned. |
FASTCV_API void fcvFilterCorr3x3s8_v2 | ( | const int8_t *__restrict | kernel, |
const uint8_t *__restrict | src, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
uint8_t *__restrict | dst, | ||
unsigned int | dstStride | ||
) |
3x3 correlation with non-separable kernel.
ATTENTION: This function is a duplication of fcvFilterCorr3x3s8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterCorr3x3s8, fcvFilterCorr3x3s8_v2 will be removed, and the current signature for fcvFilterCorr3x3s8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterCorr3x3s8 when transitioning to 2.0.0.
kernel | 2-D 3x3 kernel. NOTE: Normalized to Q4.4 |
src | Input image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. NOTE: must be an even number |
srcHeight | Image height. NOTE: must be an even number |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output convolution. Size of buffer is dstStride*srcHeight bytes. NOTE: Must be same size as src WARNING: should be 128-bit aligned. |
dstStride | Output stride. Border values are ignored in this function. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
FASTCV_API fcvStatus fcvFilterCorrNxNu8 | ( | const int8_t *__restrict | kernel, |
uint32_t | N, | ||
int8_t | shift, | ||
const uint8_t *__restrict | src, | ||
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
NxN correlation with non-separable kernel. Border values are ignored in this function. The filling of dst starts at (N/2,N/2) and ends at (srcWidth-1-N/2,srcHeight-1-N/2).
NOTE: The border is N/2 wide pixel strips at top, bottom, left and right of image.
kernel | 2-D NxN kernel of int8_t. |
N | Dimension of kernel. |
shift | The right shift count used to normalize output. Shift can be considered as Q factor of kernel. |
src | Input image of unit8_t. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. |
srcHeight | Image height. |
srcStride | Src image stride, stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output correlation. Size of buffer is dstStride*srcHeight bytes. NOTE: Must be same size as src WARNING: should be 128-bit aligned. |
dstStride | Output stride, stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
FASTCV_API fcvStatus fcvFilterCorrNxNu8f32 | ( | const float32_t *__restrict | kernel, |
uint32_t | N, | ||
const uint8_t *__restrict | src, | ||
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
float32_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
NxN correlation with non-separable kernel. Border values are ignored in this function. The filling of dst starts at (N/2,N/2) and ends at (srcWidth-1-N/2,srcHeight-1-N/2).
NOTE: The border is N/2 wide pixel strips at top, bottom, left and right of image.
kernel | 2-D NxN kernel of float32_t. |
N | Dimension of kernel. |
src | Input image of unit8_t. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. |
srcHeight | Image height. |
srcStride | Src image stride, stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output correlation. Size of buffer is dstStride*srcHeight*sizeof(float32_t) bytes. NOTE: Must be same size as src WARNING: should be 128-bit aligned. |
dstStride | Output stride, stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. NOTE: if 0, dstStride is set as srcWidth*sizeof(float32_t). WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(float32_t) if not 0. |
FASTCV_API fcvStatus fcvFilterCorrNxNu8s16 | ( | const int8_t *__restrict | kernel, |
uint32_t | N, | ||
int8_t | shift, | ||
const uint8_t *__restrict | src, | ||
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
int16_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
NxN correlation with non-separable kernel. Border values are ignored in this function. The filling of dst starts at (N/2,N/2) and ends at (srcWidth-1-N/2,srcHeight-1-N/2).
NOTE: The border is N/2 wide pixel strips at top, bottom, left and right of image.
kernel | 2-D NxN kernel of int8_t. |
N | Dimension of kernel. |
shift | The right shift count used to normalize output. Shift can be considered as Q factor of kernel. |
src | Input image of unit8_t. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. |
srcHeight | Image height. |
srcStride | Src image stride, stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output correlation. Size of buffer is dstStride*srcHeight*sizeof(int16_t) bytes. NOTE: Must be same size as src WARNING: should be 128-bit aligned. |
dstStride | Output stride, stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. NOTE: if 0, dstStride is set as srcWidth*sizeof(int16_t). WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(int16_t) if not 0. |
FASTCV_API void fcvFilterCorrSep11x11s16 | ( | const int16_t *__restrict | kernel, |
const int16_t * | src, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
int16_t *__restrict | tmpImg, | ||
int16_t * | dst | ||
) |
11x11 correlation with separable kernel. If src and dst point to the same address, it will do in-place.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterCorrSep11x11s16_v2(). In the 2.0.0 release, fcvFilterCorrSep11x11s16_v2 will be renamed to fcvFilterCorrSep11x11s16 and the signature of fcvFilterCorrSep11x11s16 as it appears now, will be removed.
kernel | 1-D kernel. NOTE: array must be >=12 elements with kernel[11]=0 WARNING: should be 128-bit aligned. NOTE: Normalized to Q1.15 |
src | Input image. Size of buffer is srcWidth*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. WARNING: must be > 8. |
srcHeight | Image height. |
tmpImg | Temporary image scratch space used internally. NOTE: Must be same size as src WARNING: should be 128-bit aligned. |
dst | Output correlation. Border values are ignored in this function. Size of buffer is srcWidth*srcHeight bytes. NOTE: Must be same size as src WARNING: should be 128-bit aligned. |
FASTCV_API void fcvFilterCorrSep11x11s16_v2 | ( | const int16_t *__restrict | kernel, |
const int16_t * | srcImg, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | tmpImg, | ||
int16_t * | dstImg, | ||
unsigned int | dstStride | ||
) |
11x11 FIR filter (convolution) with seperable kernel. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place.
ATTENTION: This function is a duplication of fcvFilterCorrSep11x11s16() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterCorrSep11x11s16, fcvFilterCorrSep11x11s16_v2 will be removed, and the current signature for fcvFilterCorrSep11x11s16 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterCorrSep11x11s16 when transitioning to 2.0.0.
kernel | 1-D kernel. NOTE: data should be 128-bit aligned |
srcImg | Input image. Size of buffer is srStride*srcHeight bytes. NOTE: data should be 128-bit aligned |
srcWidth | Image tile width. WARNING: should be multiple of 8. WARNING: must be > 8. |
srcHeight | Image tile height. |
srcStride | source Image width |
tmpImg | Temporary image scratch space used internally. NOTE: Size = width * ( height + knlSize - 1 ) NOTE: data should be 128-bit aligned |
dstImg | Output correlation. Border values are ignored in this function. NOTE: Size = dstStride * srcHeigth NOTE: data should be 128-bit aligned |
dstStride | dst Image width |
FASTCV_API void fcvFilterCorrSep13x13s16 | ( | const int16_t *__restrict | kernel, |
const int16_t * | src, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
int16_t *__restrict | tmpImg, | ||
int16_t * | dst | ||
) |
13x13 correlation with separable kernel. If src and dst point to the same address, it will do in-place.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterCorrSep13x13s16_v2(). In the 2.0.0 release, fcvFilterCorrSep13x13s16_v2 will be renamed to fcvFilterCorrSep13x13s16 and the signature of fcvFilterCorrSep13x13s16 as it appears now, will be removed.
kernel | 1-D kernel. NOTE: Normalized to Q1.15 WARNING: should be 128-bit aligned. |
src | Input image. Size of buffer is srcWidth*srcHeight bytes. NOTE: data should be 128-bit aligned |
srcWidth | Image width. WARNING: should be multiple of 8. WARNING: must be > 8. |
srcHeight | Image height. |
tmpImg | Temporary image scratch space used internally. NOTE: Must be same size as src WARNING: should be 128-bit aligned. |
dst | Output correlation. Border values are ignored in this function. NOTE: Must be same size as src WARNING: should be 128-bit aligned. |
FASTCV_API void fcvFilterCorrSep13x13s16_v2 | ( | const int16_t *__restrict | kernel, |
const int16_t * | srcImg, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | tmpImg, | ||
int16_t * | dstImg, | ||
unsigned int | dstStride | ||
) |
13x13 FIR filter (convolution) with seperable kernel. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place.
ATTENTION: This function is a duplication of fcvFilterCorrSep13x13s16() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterCorrSep13x13s16, fcvFilterCorrSep13x13s16_v2 will be removed, and the current signature for fcvFilterCorrSep13x13s16 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterCorrSep13x13s16 when transitioning to 2.0.0.
kernel | 1-D kernel. WARNING: should be 128-bit aligned. |
srcImg | Input image. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned |
srcWidth | Image tile width. WARNING: should be multiple of 8. WARNING: must be > 8. |
srcHeight | Image tile height. |
srcStride | source Image width |
tmpImg | Temporary image scratch space used internally. NOTE: Size = width * ( height + knlSize - 1 ) NOTE: data should be 128-bit aligned |
dstImg | Output correlation. Border values are ignored in this function. NOTE: Size = dstStride * srcHeigth NOTE: data should be 128-bit aligned |
dstStride | dst Image width |
FASTCV_API void fcvFilterCorrSep15x15s16 | ( | const int16_t *__restrict | kernel, |
const int16_t * | src, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
int16_t *__restrict | tmpImg, | ||
int16_t * | dst | ||
) |
15x15 correlation with separable kernel. If src and dst point to the same address, it will do in-place.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterCorrSep15x15s16_v2(). In the 2.0.0 release, fcvFilterCorrSep15x15s16_v2 will be renamed to fcvFilterCorrSep15x15s16 and the signature of fcvFilterCorrSep15x15s16 as it appears now, will be removed.
kernel | 1-D kernel. NOTE: array must be 16 elements with kernel[15]=0 NOTE: Normalized to Q1.15 NOTE: data should be 128-bit aligned |
src | Input image. Size of buffer is srcWidth*srcHeight bytes. NOTE: data should be 128-bit aligned |
srcWidth | Image width. WARNING: should be multiple of 8. WARNING: must be > 8. |
srcHeight | Image height. |
tmpImg | Temporary image scratch space used internally. NOTE: Must be same size as src NOTE: data should be 128-bit aligned |
dst | Output correlation. Border values are ignored in this function. NOTE: Must be same size as src NOTE: data should be 128-bit aligned |
FASTCV_API void fcvFilterCorrSep15x15s16_v2 | ( | const int16_t *__restrict | kernel, |
const int16_t * | srcImg, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | tmpImg, | ||
int16_t * | dstImg, | ||
unsigned int | dstStride | ||
) |
15x15 FIR filter (convolution) with seperable kernel. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place.
ATTENTION: This function is a duplication of fcvFilterCorrSep15x15s16() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterCorrSep15x15s16, fcvFilterCorrSep15x15s16_v2 will be removed, and the current signature for fcvFilterCorrSep15x15s16 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterCorrSep15x15s16 when transitioning to 2.0.0.
kernel | 1-D kernel. NOTE: array must be 16 elements with kernel[15]=0 NOTE: Normalized to Q1.15 NOTE: data should be 128-bit aligned |
srcImg | Input image. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned |
srcWidth | Image tile width. WARNING: should be multiple of 8. WARNING: must be > 8. |
srcHeight | Image tile height. |
srcStride | source Image width |
tmpImg | Temporary image scratch space used internally. NOTE: Size = width * ( height + knlSize - 1 ) NOTE: data should be 128-bit aligned |
dstImg | Output correlation. Border values are ignored in this function. NOTE: Size = dstStride * srcHeigth NOTE: data should be 128-bit aligned |
dstStride | dst Image width |
FASTCV_API void fcvFilterCorrSep17x17s16 | ( | const int16_t *__restrict | kernel, |
const int16_t * | src, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
int16_t *__restrict | tmpImg, | ||
int16_t * | dst | ||
) |
17x17 correlation with separable kernel. If src and dst point to the same address, it will do in-place.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterCorrSep17x17s16_v2(). In the 2.0.0 release, fcvFilterCorrSep17x17s16_v2 will be renamed to fcvFilterCorrSep17x17s16 and the signature of fcvFilterCorrSep17x17s16 as it appears now, will be removed.
kernel | 1-D kernel. NOTE: Normalized to Q1.15 WARNING: should be 128-bit aligned. |
src | Input image. Size of buffer is srcWidth*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. WARNING: must be > 8. |
srcHeight | Image height. |
tmpImg | Temporary image scratch space used internally. NOTE: Must be same size as src WARNING: should be 128-bit aligned. |
dst | Output correlation.. Border values are ignored in this function. NOTE: Must be same size as src WARNING: should be 128-bit aligned. |
FASTCV_API void fcvFilterCorrSep17x17s16_v2 | ( | const int16_t *__restrict | kernel, |
const int16_t * | srcImg, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | tmpImg, | ||
int16_t * | dstImg, | ||
unsigned int | dstStride | ||
) |
17x17 FIR filter (convolution) with seperable kernel. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place.
ATTENTION: This function is a duplication of fcvFilterCorrSep17x17s16() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterCorrSep17x17s16, fcvFilterCorrSep17x17s16_v2 will be removed, and the current signature for fcvFilterCorrSep17x17s16 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterCorrSep17x17s16 when transitioning to 2.0.0.
kernel | 1-D kernel. NOTE: data should be 128-bit aligned |
srcImg | Input image. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned |
srcWidth | Image tile width. |
srcHeight | Image tile height. |
srcStride | source Image width |
tmpImg | Temporary image scratch space used internally. NOTE: Size = width * ( height + knlSize - 1 ) NOTE: data should be 128-bit aligned |
dstImg | Output correlation. Border values are ignored in this function. NOTE: Size = dstStride * srcHeigth NOTE: data should be 128-bit aligned |
dstStride | dst Image width |
FASTCV_API void fcvFilterCorrSep9x9s16 | ( | const int16_t *__restrict | kernel, |
const int16_t * | src, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
int16_t *__restrict | tmp, | ||
int16_t * | dst | ||
) |
9x9 correlation with separable kernel. If src and dst point to the same address, it will do in-place.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterCorrSep9x9s16_v2(). In the 2.0.0 release, fcvFilterCorrSep9x9s16_v2 will be renamed to fcvFilterCorrSep9x9s16 and the signature of fcvFilterCorrSep9x9s16 as it appears now, will be removed.
kernel | 1-D kernel in Q15. WARNING: should be 128-bit aligned. |
src | Input image. Size of buffer is srcWidth*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. WARNING: must be > 8. |
srcHeight | Image height. |
tmp | Temporary image buffer used internally. Size of buffer is srcWidth*srcHeight bytes. WARNING: Must be same size as src WARNING: should be 128-bit aligned. |
dst | Output correlation. Border values are ignored in this function. Size of buffer is srcWidth*srcHeight bytes. WARNING: Must be same size as src WARNING: should be 128-bit aligned. |
FASTCV_API void fcvFilterCorrSep9x9s16_v2 | ( | const int16_t *__restrict | kernel, |
const int16_t * | srcImg, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | tmpImg, | ||
int16_t * | dstImg, | ||
unsigned int | dstStride | ||
) |
9x9 FIR filter (convolution) with seperable kernel. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place.
ATTENTION: This function is a duplication of fcvFilterCorrSep9x9s16() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterCorrSep9x9s16, fcvFilterCorrSep9x9s16_v2 will be removed, and the current signature for fcvFilterCorrSep9x9s16 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterCorrSep9x9s16 when transitioning to 2.0.0.
kernel | 1-D kernel. |
srcImg | Input image. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned |
srcWidth | Image tile width. |
srcHeight | Image tile height. |
srcStride | source Image width |
tmpImg | Temporary image scratch space used internally. NOTE: Size = width * ( height + knlSize - 1 ) NOTE: data should be 128-bit aligned |
dstImg | Output correlation. Border values are ignored in this function. Size of buffer is dstStride*srcHeight bytes. NOTE: Size = width * heigth NOTE: data should be 128-bit aligned |
dstStride | dst Image width |
FASTCV_API fcvStatus fcvFilterCorrSepMxNu8 | ( | const int8_t * | kernelX, |
uint32_t | knlSizeX, | ||
const int8_t * | kernelY, | ||
uint32_t | knlSizeY, | ||
int8_t | shift, | ||
const uint8_t * | srcImg, | ||
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t * | dstImg, | ||
uint32_t | dstStride | ||
) |
MxN correlation with separable kernel.
kernelX | 1-D kernel of int8_t. The kernel is first applied to rows. kernelX has Q factor equal to shift. NOTE: data should be 128-bit aligned |
knlSizeX | Seperable kernel size of kernelX. NOTE: kenrelX must be <= 32. |
kernelY | 1-D kernel of int8_t. The kernel is applied to columns after kernelX is applied. It could be the same buffer as kernelX which makes it a NxN symetric kernel. kernelY has Q factor equal to shift. NOTE: data should be 128-bit aligned |
knlSizeY | Seperable kernel size of kernelY. |
shift | The Q factor of kernels. Output is right-shifted by 2*shift to compensate for two rounds of filtering |
srcImg | Input image. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned |
srcWidth | Image width. |
srcHeight | Image height. |
srcStride | Src image stride, stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dstImg | Output correlation. Can do in-place filtering (i.e. dstImg=srcImg). NOTE: Size = dstStride * srcHeigth NOTE: data should be 128-bit aligned |
dstStride | Output stride, stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
FASTCV_API void fcvFilterCorrSepNxNs16 | ( | const int16_t *__restrict | kernel, |
int | knlSize, | ||
const int16_t * | srcImg, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | tmpImg, | ||
int16_t * | dstImg, | ||
unsigned int | dstStride | ||
) |
NxN correlation with separable kernel. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place.
kernel | 1-D kernel. NOTE: data should be 128-bit aligned |
knlSize | Seperable kernel size. |
srcImg | Input image. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned |
srcWidth | Image tile width. |
srcHeight | Image tile height. |
srcStride | source Image width |
tmpImg | Temporary image scratch space used internally. NOTE: Size = width * ( height + knlSize - 1 ) NOTE: data should be 128-bit aligned |
dstImg | Output correlation. Border values are ignored in this function. NOTE: Size = dstStride * srcHeigth NOTE: data should be 128-bit aligned |
dstStride | dst Image width |
FASTCV_API void fcvFilterDilate3x3u8 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
uint8_t *__restrict | dst | ||
) |
Dilate a grayscale image by taking the local maxima of 3x3 neighborhood window.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterDilate3x3u8_v2(). In the 2.0.0 release, fcvFilterDilate3x3u8_v2 will be renamed to fcvFilterDilate3x3u8 and the signature of fcvFilterDilate3x3u8 as it appears now, will be removed.
src | Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
dst | Output 8-bit dilated image. Size of buffer is srcWidth*srcHeight bytes. WARNING: should be 128-bit aligned. |
FASTCV_API void fcvFilterDilate3x3u8_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
uint8_t *__restrict | dst, | ||
unsigned int | dstStride | ||
) |
Dilate a grayscale image by taking the local maxima of 3x3 neighborhood window.
ATTENTION: This function is a duplication of fcvFilterDilate3x3u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterDilate3x3u8, fcvFilterDilate3x3u8_v2 will be removed, and the current signature for fcvFilterDilate3x3u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterDilate3x3u8 when transitioning to 2.0.0.
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit dilated image. Size of buffer is dstStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
dstStride | Stride of output image. NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
FASTCV_API fcvStatus fcvFilterDilate3x3u8_v3 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
fcvBorderType | borderType, | ||
uint8_t | borderValue | ||
) |
Dilate a grayscale image by taking the local maxima of 3x3 neighborhood window with border handling scheme specified by user.
ATTENTION: This function is a duplication of fcvFilterDilate3x3u8_v2() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterDilate3x3u8, fcvFilterDilate3x3u8_v2 will be removed, and the current signature for fcvFilterDilate3x3u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterDilate3x3u8 when transitioning to 2.0.0.
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit dilated image. Size of buffer is dstStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
dstStride | Stride of output image. NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
borderType | This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT, FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED, border values will be set to 0. |
borderValue | Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes, set this value as 0. Can take values between 0 and 255. |
FASTCV_API fcvStatus fcvFilterDilateNxNu8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t | N, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Dilate a grayscale image by taking the local maxima of NxN neighborhood window.
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
N | Dimension of the neighborhood window. WARNING: must be an odd number |
dst | Output 8-bit dilated image. Size of buffer is dstStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
dstStride | Stride of output image. NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
tmp | Temporary image scratch space used internally. NOTE: Size = width * height NOTE: data should be 128-bit aligned |
FASTCV_API void fcvFilterErode3x3u8 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
uint8_t *__restrict | dst | ||
) |
Erode a grayscale image by taking the local minima of 3x3 neighborhood window.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterErode3x3u8_v2(). In the 2.0.0 release, fcvFilterErode3x3u8_v2 will be renamed to fcvFilterErode3x3u8 and the signature of fcvFilterErode3x3u8 as it appears now, will be removed.
src | Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
dst | Output 8-bit eroded image. Size of buffer is srcWidth*srcHeight bytes. WARNING: should be 128-bit aligned. |
FASTCV_API void fcvFilterErode3x3u8_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
uint8_t *__restrict | dst, | ||
unsigned int | dstStride | ||
) |
Erode a grayscale image by taking the local minima of 3x3 nbhd window.
ATTENTION: This function is a duplication of fcvFilterErode3x3u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterErode3x3u8, fcvFilterErode3x3u8_v2 will be removed, and the current signature for fcvFilterErode3x3u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterErode3x3u8 when transitioning to 2.0.0.
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit eroded image. Size of buffer is dstStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
dstStride | Stride of output image. NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
FASTCV_API fcvStatus fcvFilterErode3x3u8_v3 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
fcvBorderType | borderType, | ||
uint8_t | borderValue | ||
) |
Erode a grayscale image by taking the local minima of 3x3 nbhd window with border handling scheme specified by user.
ATTENTION: This function is a duplication of fcvFilterErode3x3u8_v2() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterErode3x3u8, fcvFilterErode3x3u8_v2 will be removed, and the current signature for fcvFilterErode3x3u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterErode3x3u8 when transitioning to 2.0.0.
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit eroded image. Size of buffer is dstStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
dstStride | Stride of output image. NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
borderType | This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT, FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED, border values will be set to 255. |
borderValue | Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes, set this value as 0. Can take values between 0 and 255. |
FASTCV_API fcvStatus fcvFilterErodeNxNu8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t | N, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Erode a grayscale image by taking the local minima of NxN neighborhood window.
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
N | Dimension of the neighborhood window. WARNING: must be an odd number |
dst | Output 8-bit eroded image. Size of buffer is dstStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
dstStride | Stride of output image. NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
FASTCV_API void fcvFilterGaussian11x11u8 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
uint8_t *__restrict | dst, | ||
int | blurBorder | ||
) |
Blurs an image with 11x11 Gaussian filter.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterGaussian11x11u8_v2(). In the 2.0.0 release, fcvFilterGaussian11x11u8_v2 will be renamed to fcvFilterGaussian11x11u8 and the signature of fcvFilterGaussian11x11u8 as it appears now, will be removed.
Convolution with 11x11 Gaussian kernel:
1 10 45 120 210 252 210 120 45 10 1
10 100 450 1200 2100 2520 2100 1200 450 100 10
45 450 2025 5400 9450 11340 9450 5400 2025 450 45
120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
252 2520 11340 30240 52920 63504 52920 30240 11340 2520 252
210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
45 450 2025 5400 9450 11340 9450 5400 2025 450 45
10 100 450 1200 2100 2520 2100 1200 450 100 10
1 10 45 120 210 252 210 120 45 10 , 1
src | Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
dst | Output 8-bit image. Size of buffer is srcWidth*srcHeight bytes. NOTE: data should be 128-bit aligned. |
blurBorder | If set to 1, border is blurred by 0-padding adjacent values. If set to 0, borders up to half-kernel width are ignored (e.g. 5 pixel in the 11x11 case). |
FASTCV_API void fcvFilterGaussian11x11u8_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
uint8_t *__restrict | dst, | ||
unsigned int | dstStride, | ||
int | blurBorder | ||
) |
Blurs an image with 11x11 Gaussian filter.
ATTENTION: This function is a duplication of fcvFilterGaussian11x11u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterGaussian11x11u8, fcvFilterGaussian11x11u8_v2 will be removed, and the current signature for fcvFilterGaussian11x11u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterGaussian11x11u8 when transitioning to 2.0.0.
Convolution with 11x11 Gaussian kernel:
1 10 45 120 210 252 210 120 45 10 1
10 100 450 1200 2100 2520 2100 1200 450 100 10
45 450 2025 5400 9450 11340 9450 5400 2025 450 45
120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
252 2520 11340 30240 52920 63504 52920 30240 11340 2520 252
210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
45 450 2025 5400 9450 11340 9450 5400 2025 450 45
10 100 450 1200 2100 2520 2100 1200 450 100 10
1 10 45 120 210 252 210 120 45 10 , 1
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, dstStride is set as dstWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit image. Size of buffer is dstStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
dstStride | Output stride. NOTE: if 0, dstStride is set as dstWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
blurBorder | If set to 1, border is blurred by 0-padding adjacent values. If set to 0, borders up to half-kernel width are ignored (e.g. 5 pixel in the 11x11 case). |
FASTCV_API void fcvFilterGaussian3x3u8 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
uint8_t *__restrict | dst, | ||
int | blurBorder | ||
) |
Blurs an image with 3x3 Gaussian filter.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterGaussian3x3u8_v2(). In the 2.0.0 release, fcvFilterGaussian3x3u8_v2 will be renamed to fcvFilterGaussian3x3u8 and the signature of fcvFilterGaussian3x3u8 as it appears now, will be removed.
Gaussian kernel:
1 2 1
2 4 2
1 2 1
src | Input 8-bit image. Size of buffer is srcWidth*srcHeight byte. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
dst | Output 8-bit image. Destination buffer size is srcWidth*srcHeight. NOTE: data should be 128-bit aligned. |
blurBorder | If set to 1, border is blurred by 0-padding adjacent values. If set to 0, borders up to half-kernel width are ignored (e.g. 1 pixel in the 3x3 case). |
FASTCV_API void fcvFilterGaussian3x3u8_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
uint8_t *__restrict | dst, | ||
unsigned int | dstStride, | ||
int | blurBorder | ||
) |
Blurs an image with 3x3 Gaussian filter.
ATTENTION: This function is a duplication of fcvFilterGaussian3x3u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterGaussian3x3u8, fcvFilterGaussian3x3u8_v2 will be removed, and the current signature for fcvFilterGaussian3x3u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterGaussian3x3u8 when transitioning to 2.0.0.
Convolution with 3x3 Gaussian kernel:
1 2 1
2 4 2
1 2 1
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit image. Size of buffer is dstStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
dstStride | Output stride. NOTE: if 0, dstStride is set as dstWidth. WARNING: should be multiple of 8, and at least as much as dstWidth if not 0. |
blurBorder | If set to 1, border is blurred by 0-padding adjacent values. If set to 0, borders up to half-kernel width are ignored (e.g. 1 pixel in the 3x3 case). |
FASTCV_API fcvStatus fcvFilterGaussian3x3u8_v3 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
fcvBorderType | borderType, | ||
uint8_t | borderValue | ||
) |
Blurs an image with 3x3 Gaussian filter with border handling scheme specified by user.
ATTENTION: This function is a duplication of fcvFilterGaussian3x3u8_v2() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterGaussian3x3u8, fcvFilterGaussian3x3u8_v2 will be removed, and the current signature for fcvFilterGaussian3x3u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterGaussian3x3u8 when transitioning to 2.0.0.
Convolution with 3x3 Gaussian kernel:
1 2 1
2 4 2
1 2 1
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit image. Size of buffer is dstStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
dstStride | Output stride. NOTE: if 0, dstStride is set as dstWidth. WARNING: should be multiple of 8, and at least as much as dstWidth if not 0. |
borderType | This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT, FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED, border is blurred by 0-padding adjacent values. |
borderValue | Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes, set this value as 0. Can take values between 0 and 255. |
FASTCV_API void fcvFilterGaussian5x5s16 | ( | const int16_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
int16_t *__restrict | dst, | ||
int | blurBorder | ||
) |
Blur with 5x5 Gaussian filter.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterGaussian5x5s16_v2(). In the 2.0.0 release, fcvFilterGaussian5x5s16_v2 will be renamed to fcvFilterGaussian5x5s16 and the signature of fcvFilterGaussian5x5s16 as it appears now, will be removed.
Convolution with 5x5 Gaussian kernel:
1 4 6 4 1
4 16 24 16 4
6 24 36 24 6
4 16 24 16 4
1 4 6 4 1
src | Input int data (can be sq. of gradient, etc). NOTE: Size of buffer is srcWidth*srcHeight*2 bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. |
srcHeight | Image height. |
dst | Output int data. Size of buffer is srcWidth*srcHeight*2 bytes. NOTE: data should be 128-bit aligned. |
blurBorder | If set to 0, border is ignored. If set to 1, border is blurred by 0-padding adjacent values. |
FASTCV_API void fcvFilterGaussian5x5s16_v2 | ( | const int16_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | dst, | ||
unsigned int | dstStride, | ||
int | blurBorder | ||
) |
Blur with 5x5 Gaussian filter.
ATTENTION: This function is a duplication of fcvFilterGaussian5x5s16() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterGaussian5x5s16, fcvFilterGaussian5x5s16_v2 will be removed, and the current signature for fcvFilterGaussian5x5s16 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterGaussian5x5s16 when transitioning to 2.0.0.
Convolution with 5x5 Gaussian kernel:
1 4 6 4 1
4 16 24 16 4
6 24 36 24 6
4 16 24 16 4
1 4 6 4 1
src | Input int data (can be sq. of gradient, etc). Size of buffer is srcStride*srcHeight*2 bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. |
srcHeight | Image height. |
srcStride | Image stride in bytes. NOTE: if 0, srcStride is set as srcWidth*2. WARNING: should be multiple of 8, and at least as much as srcWidth*2 if not 0. |
dst | Output int data. Size of buffer is dstStride*srcHeight*2 bytes. NOTE: data should be 128-bit aligned. |
dstStride | Output stride in bytes. NOTE: if 0, dstStride is set as srcWidth*2. WARNING: should be multiple of 8, and at least as much as srcWidth*2 if not 0. |
blurBorder | If set to 0, border is ignored. If set to 1, border is blurred by 0-padding adjacent values. |
FASTCV_API void fcvFilterGaussian5x5s32 | ( | const int32_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
int32_t *__restrict | dst, | ||
int | blurBorder | ||
) |
Blur with 5x5 Gaussian filter.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterGaussian5x5s32_v2(). In the 2.0.0 release, fcvFilterGaussian5x5s32_v2 will be renamed to fcvFilterGaussian5x5s32 and the signature of fcvFilterGaussian5x5s32 as it appears now, will be removed.
Convolution with 5x5 Gaussian kernel:
1 4 6 4 1
4 16 24 16 4
6 24 36 24 6
4 16 24 16 4
1 4 6 4 1
src | Input int data (can be sq. of gradient, etc). Size of buffer is srcWidth*srcHeight*4 bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. |
srcHeight | Image height. |
dst | Output int data. Size of buffer is srcWidth*srcHeight*4 bytes. NOTE: data should be 128-bit aligned. |
blurBorder | If set to 0, border is ignored. If set to 1, border is blurred by 0-padding adjacent values. |
FASTCV_API void fcvFilterGaussian5x5s32_v2 | ( | const int32_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int32_t *__restrict | dst, | ||
unsigned int | dstStride, | ||
int | blurBorder | ||
) |
Blur with 5x5 Gaussian filter.
ATTENTION: This function is a duplication of fcvFilterGaussian5x5s32() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterGaussian5x5s32, fcvFilterGaussian5x5s32_v2 will be removed, and the current signature for fcvFilterGaussian5x5s32 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterGaussian5x5s32 when transitioning to 2.0.0.
Convolution with 5x5 Gaussian kernel:
1 4 6 4 1
4 16 24 16 4
6 24 36 24 6
4 16 24 16 4
1 4 6 4 1
src | Input int data (can be sq. of gradient, etc). Size of buffer is srcStride*srcHeight*4 bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. |
srcHeight | Image height. |
srcStride | Input Image stride in bytes. NOTE: if 0, srcStride is set as srcWidth*sizeof(int32_t). WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output int data. Size of buffer is dstStride*srcHeight*4 bytes. NOTE: data should be 128-bit aligned. |
dstStride | Output Image stride in bytes. NOTE: if 0, dstStride is set as srcWidth*sizeof(int32_t). WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
blurBorder | If set to 0, border is ignored. If set to 1, border is blurred by 0-padding adjacent values. |
FASTCV_API void fcvFilterGaussian5x5u8 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
uint8_t *__restrict | dst, | ||
int | blurBorder | ||
) |
Blurs an image with 5x5 Gaussian filter.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterGaussian5x5u8_v2(). In the 2.0.0 release, fcvFilterGaussian5x5u8_v2 will be renamed to fcvFilterGaussian5x5u8 and the signature of fcvFilterGaussian5x5u8 as it appears now, will be removed.
Convolution with 5x5 Gaussian kernel:
1 4 6 4 1
4 16 24 16 4
6 24 36 24 6
4 16 24 16 4
1 4 6 4 1
src | Input int data (can be sq. of gradient, etc). Size of buffer is srcWidth*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
dst | Output 8-bit image. Size of buffer is srcWidth*srcHeight bytes. NOTE: data should be 128-bit aligned. |
blurBorder | If set to 1, border is blurred by 0-padding adjacent values. If set to 0, borders up to half-kernel width are ignored (e.g. 2 pixel in the 5x5 case). |
FASTCV_API void fcvFilterGaussian5x5u8_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
uint8_t *__restrict | dst, | ||
unsigned int | dstStride, | ||
int | blurBorder | ||
) |
Blurs an image with 5x5 Gaussian filter.
ATTENTION: This function is a duplication of fcvFilterGaussian5x5u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterGaussian5x5u8, fcvFilterGaussian5x5u8_v2 will be removed, and the current signature for fcvFilterGaussian5x5u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterGaussian5x5u8 when transitioning to 2.0.0.
Convolution with 5x5 Gaussian kernel:
1 4 6 4 1
4 16 24 16 4
6 24 36 24 6
4 16 24 16 4
1 4 6 4 1
src | Input int data (can be sq. of gradient, etc). Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, dstStride is set as dstWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit image. Size of buffer is dstStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
dstStride | Output stride. NOTE: if 0, dstStride is set as dstWidth. WARNING: should be multiple of 8, and at least as much as dstWidth if not 0. |
blurBorder | If set to 1, border is blurred by 0-padding adjacent values. If set to 0, borders up to half-kernel width are ignored (e.g. 2 pixel in the 5x5 case). |
FASTCV_API void fcvFilterMedian3x3u8 | ( | const uint8_t *__restrict | srcImg, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
uint8_t *__restrict | dstImg | ||
) |
Blurs an image with 3x3 median filter.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterMedian3x3u8_v2(). In the 2.0.0 release, fcvFilterMedian3x3u8_v2 will be renamed to fcvFilterMedian3x3u8 and the signature of fcvFilterMedian3x3u8 as it appears now, will be removed.
Border values are ignored. The 3x3 mask convolves with the image area | a(1,1) , a12, ..., a(1,srcWidth-2) |
| ... , ..., ..., ... |
| a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |
srcImg | Input 8-bit image. Size of buffer is srcWidth*srcHeight byte. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. NOTE: should be multiple of 8 |
srcHeight | Image height. |
dstImg | Output 8-bit image. Size of buffer is srcWidth*srcHeight byte. NOTE: data should be 128-bit aligned. |
FASTCV_API void fcvFilterMedian3x3u8_v2 | ( | const uint8_t *__restrict | srcImg, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
uint8_t *__restrict | dstImg, | ||
unsigned int | dstStride | ||
) |
Blurs an image with 3x3 median filter.
ATTENTION: This function is a duplication of fcvFilterMedian3x3u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterMedian3x3u8, fcvFilterMedian3x3u8_v2 will be removed, and the current signature for fcvFilterMedian3x3u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterMedian3x3u8 when transitioning to 2.0.0.
Border values are ignored. The 3x3 mask convolves with the image area | a(1,1) , a12, ..., a(1,srcWidth-2) |
| ... , ..., ..., ... |
| a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |
srcImg | Input 8-bit image. Size of buffer is srcStride*srcHeight byte. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. NOTE: should be multiple of 8 |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dstImg | Output 8-bit image. Size of buffer is dstStride*srcHeight byte. NOTE: data should be 128-bit aligned. |
dstStride | Output stride. NOTE: if 0, dstStride is set as dstWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
FASTCV_API fcvStatus fcvFilterMedian3x3u8_v3 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
fcvBorderType | borderType, | ||
uint8_t | borderValue | ||
) |
Blurs an image with 3x3 median filter with border handling scheme specified by user.
ATTENTION: This function is a duplication of fcvFilterMedian3x3u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterMedian3x3u8, fcvFilterMedian3x3u8_v2 will be removed, and the current signature for fcvFilterMedian3x3u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterMedian3x3u8 when transitioning to 2.0.0.
Border values are extrapolated according to borderType. The 3x3 mask convolves with the whole image area.
srcImg | Input 8-bit image. Size of buffer is srcStride*srcHeight byte. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. NOTE: should be multiple of 8 |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dstImg | Output 8-bit image. Size of buffer is dstStride*srcHeight byte. NOTE: data should be 128-bit aligned. |
dstStride | Output stride. NOTE: if 0, dstStride is set as dstWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
borderType | This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT, FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED, border values are ignored. The 3x3 mask convolves with the following image area | a(1,1) , a12, ..., a(1,srcWidth-2) | | ... , ..., ..., ... | | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) | |
borderValue | Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes, set this value as 0. Can take values between 0 and 255. |
FASTCV_API fcvStatus fcvFilterMedianMxNs16 | ( | const int16_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t | M, | ||
uint32_t | N, | ||
int16_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Blurs an image with MxN median filter (M,N have to be odd numbers)
Borders of m pixels in horizontal direction and n in vertical direction are replaced with the source pixels, where m = (M-1)/2, n = (N-1)/2 The NxN median filter applies on the image area | a(n,m) , a(n,m+1), ..., a(n,srcWidth-m-1) |
| ... , ..., ..., ... |
| a(srcHeight-n-1,m), ..., ..., a(srcHeight-n-1,srcWidth-m-1) |
src | Input 16-bit signed image. Size of buffer is srcStride*srcHeight byte. NOTE: data should be 128-bit aligned. |
srcWidth | Image width. |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth * 2. WARNING: should be multiple of 8, and at least as much as srcWidth*2 if not 0. |
M | Filter kernel width NOTE: kernel width should be an odd number |
N | Filter kernel height NOTE: kernel height should be an odd number |
dst | Output 16-bit image. Size of buffer is dstStride*srcHeight byte. NOTE: data should be 128-bit aligned. |
dstStride | Output stride. NOTE: if 0, dstStride is set as srcWidth * 2 WARNING: should be multiple of 8, and at least as much as srcWidth*2 if not 0. |
FASTCV_API void fcvFilterSobel3x3u8 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
uint8_t *__restrict | dst | ||
) |
3x3 Sobel edge filter
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterSobel3x3u8_v2(). In the 2.0.0 release, fcvFilterSobel3x3u8_v2 will be renamed to fcvFilterSobel3x3u8 and the signature of fcvFilterSobel3x3u8 as it appears now, will be removed.
This function calculates an image derivative by convolving the image with an appropriate 3x3 kernel. Border values are ignored. The 3x3 mask convolves with the image area | a(1,1) , a12, ..., a(1,srcWidth-2) |
| ... , ..., ..., ... |
| a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |
src | Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes. WARNING: data should be 128-bit aligned. |
srcWidth | Image width. NOTE: should be multiple of 8 |
srcHeight | Image height. |
dst | Output 8-bit image of |dx|+|dy|. Size of buffer is srcWidth*srcHeight bytes. NOTE: dst is saturated to 255 WARNING: data should be 128-bit aligned. |
FASTCV_API void fcvFilterSobel3x3u8_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
uint8_t *__restrict | dst, | ||
unsigned int | dstStride | ||
) |
3x3 Sobel edge filter
ATTENTION: This function is a duplication of fcvFilterSobel3x3u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterSobel3x3u8, fcvFilterSobel3x3u8_v2 will be removed, and the current signature for fcvFilterSobel3x3u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterSobel3x3u8 when transitioning to 2.0.0.
This function calculates an image derivative by convolving the image with an appropriate 3x3 kernel. Border values are ignored. The 3x3 mask convolves with the image area | a(1,1) , a12, ..., a(1,srcWidth-2) |
| ... , ..., ..., ... |
| a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: data should be 128-bit aligned. |
srcWidth | Image width. NOTE: should be multiple of 8 |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit image of |dx|+|dy|. Size of buffer is dstStride*srcHeight bytes. NOTE: dst is saturated to 255 WARNING: data should be 128-bit aligned. |
dstStride | Output stride. NOTE: if 0, dstStride is set as dstWidth. WARNING: should be multiple of 8, and at least as much as dstWidth if not 0. |
FASTCV_API fcvStatus fcvFilterSobel3x3u8s16 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
int16_t *__restrict | dx, | ||
int16_t *__restrict | dy, | ||
uint32_t | dxyStride, | ||
fcvBorderType | borderType, | ||
uint8_t | borderValue | ||
) |
Creates a 2D gradient image from source luminance data without normalization. This function computes the gradient of the input image by convolution with the 3x3 Sobel kernel. The Sobel kernel is not normalized in this function.
NOTE: it will replace the fcvFilterSobel3x3u8 in fastCV 2.0.0.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. The number of pixels in a row. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth. NOTE: should be multiple of 8. |
dx | Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size. If NULL, the horizontal gradient will not be calculated. NOTE: should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size. If NULL, the vertical gradient will not be calculated. NOTE: should be 128-bit aligned. |
dxyStride | Stride (in bytes) of 'dx' and 'dy' gradient arrays, is the number of bytes between column 0 of row 1 and column 0 of row 2 in the gradient arrays dx or dy. If left at 0 gradStride is default to 2 * srcWidth. NOTE: should be multiple of 8. |
borderType | Define the behavior at the border. See definition of fcvBorderType. |
borderValue | Specifies the constant value for the borderType FASTCV_BORDER_CONSTANT. Ignored otherwise. |
FASTCV_API fcvStatus fcvFilterSobel5x5u8s16 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
int16_t *__restrict | dx, | ||
int16_t *__restrict | dy, | ||
uint32_t | dxyStride, | ||
fcvBorderType | borderType, | ||
uint8_t | borderValue | ||
) |
Creates a 2D gradient image from source luminance data without normalization. This function computes the gradient of the input image by convolution with the 5x5 Sobel kernel. The Sobel kernel is not normalized in this function.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. The number of pixels in a row. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth. NOTE: should be multiple of 8. |
dx | Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size. If NULL, the horizontal gradient will not be calculated. NOTE: should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size. If NULL, the vertical gradient will not be calculated. NOTE: should be 128-bit aligned. |
dxyStride | Stride (in bytes) of 'dx' and 'dy' gradient arrays, is the number of bytes between column 0 of row 1 and column 0 of row 2 in the gradient arrays dx or dy. If left at 0 gradStride is default to 2 * srcWidth. NOTE: should be multiple of 8. |
borderType | Define the behavior at the border. See definition of fcvBorderType. |
borderValue | Specifies the constant value for the borderType FASTCV_BORDER_CONSTANT. Ignored otherwise. |
FASTCV_API fcvStatus fcvFilterSobel7x7u8s16 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
int16_t *__restrict | dx, | ||
int16_t *__restrict | dy, | ||
uint32_t | dxyStride, | ||
fcvBorderType | borderType, | ||
uint8_t | borderValue | ||
) |
Creates a 2D gradient image from source luminance data without normalization. This function computes the gradient of the input image by convolution with the 7x7 Sobel kernel. The Sobel kernel is not normalized in this function.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. The number of pixels in a row. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth. NOTE: should be multiple of 8. |
dx | Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size. If NULL, the horizontal gradient will not be calculated. NOTE: should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size. If NULL, the vertical gradient will not be calculated. NOTE: should be 128-bit aligned. |
dxyStride | Stride (in bytes) of 'dx' and 'dy' gradient arrays, is the number of bytes between column 0 of row 1 and column 0 of row 2 in the gradient arrays dx or dy. If left at 0 gradStride is default to 2 * srcWidth. NOTE: should be multiple of 8. |
borderType | Define the behavior at the border. See definition of fcvBorderType. |
borderValue | Specifies the constant value for the borderType FASTCV_BORDER_CONSTANT. Ignored otherwise. |
FASTCV_API void fcvFilterThresholdOtsuu8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
fcvThreshType | thresholdType | ||
) |
Binarizes a grayscale image using Otsu's method.
Sets the pixel to max(255) if it's value is greater than the threshold; else, set the pixel to min(0). The threshold is searched that minimizes the intra-class variance (the variance within the class)
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. |
srcHeight | Image height. |
srcStride | Stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. WARNING: should be multiple of 8 |
dst | Output 8-bit binarized image. Size of buffer is dstStride*srcHeight bytes. If src equals to dst and srcStride equals to dstStride, it will do in-place. WARNING: should be 128-bit aligned. |
dstStride | Stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. WARNING: should be multiple of 8 |
thresholdType | Threshold type that can be either FCV_THRESH_BINARY or FCV_THRESH_BINARY_INV. NOTE: /// For FCV_THRESH_BINARY threshold type, the pixel is set as maxValue if it's value is greater than the threshold; else, it is set as zero. For FCV_THRESH_BINARY_INV threshold type, the pixel is set as zero if it's value is greater than the threshold; else, it is set as maxValue. |
FASTCV_API fcvStatus fcvFilterThresholdRangeu8 | ( | const uint8_t * | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t * | dst, | ||
uint32_t | dstStride, | ||
uint8_t | lowThresh, | ||
uint8_t | highThresh | ||
) |
Binarizes a grayscale image based on a pair of threshold values.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterThresholdRangeu8_v2(). In the 2.0.0 release, fcvFilterThresholdRangeu8_v2 will be renamed to fcvFilterThresholdRangeu8 and the signature of fcvFilterThresholdRangeu8 as it appears now, will be removed.
Sets the pixel to min(0) if it's value is greater than the higher threshold or smaller than the lower threshold; else, set the pixel to max(255).
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8 |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit binarized image. Size of buffer is dstStride*srcHeight bytes. If src equals to dst and srcStride equals to dstStride, it will do in-place. WARNING: should be 128-bit aligned. |
dstStride | Output stride (in bytes). NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
lowThresh | The lower threshold value for binarization. |
highThresh | The higher threshold value for binarization. |
FASTCV_API fcvStatus fcvFilterThresholdRangeu8_v2 | ( | const uint8_t * | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t * | dst, | ||
uint32_t | dstStride, | ||
uint8_t | lowThresh, | ||
uint8_t | highThresh, | ||
uint8_t | trueValue, | ||
uint8_t | falseValue | ||
) |
Binarizes a grayscale image based on a pair of threshold values. The binarized image will be in the two values selected by user.
ATTENTION: This function is a duplication of fcvFilterThresholdRangeu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterThresholdRangeu8, fcvFilterThresholdRangeu8_v2 will be removed, and the current signature for fcvFilterThresholdRangeu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterThresholdRangeu8 when transitioning to 2.0.0.
Sets the pixel to min(0) if it's value is greater than the higher threshold or smaller than the lower threshold; else, set the pixel to max(255).
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8 |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit binarized image. Size of buffer is dstStride*srcHeight bytes. If src equals to dst and srcStride equals to dstStride, it will do in-place. WARNING: should be 128-bit aligned. |
dstStride | Output stride (in bytes). NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
lowThresh | The lower threshold value for binarization. |
highThresh | The higher threshold value for binarization. |
trueValue | The value in type of uint8_t assigned to the destination pixel if the source is within the range inclusively defined by the pair of threshold values |
falseValue | The value in type of uint8_t assigned to the destination pixel if the source is out of the range defined by the pair of threshold values |
FASTCV_API void fcvFilterThresholdu8 | ( | const uint8_t * | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
uint8_t * | dst, | ||
unsigned int | threshold | ||
) |
Binarizes a grayscale image based on a threshold value.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterThresholdu8_v2(). In the 2.0.0 release, fcvFilterThresholdu8_v2 will be renamed to fcvFilterThresholdu8 and the signature of fcvFilterThresholdu8 as it appears now, will be removed.
Sets the pixel to max(255) if it's value is greater than the threshold; else, set the pixel to min(0).
src | Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8 |
srcHeight | Image height. |
dst | Output 8-bit binarized image. Size of buffer is srcWidth*srcHeight bytes. If src equals to dst, it will do in-place. WARNING: should be 128-bit aligned. |
threshold | Threshold value for binarization. WARNING: must be larger than 0. |
FASTCV_API void fcvFilterThresholdu8_v2 | ( | const uint8_t * | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
uint8_t * | dst, | ||
unsigned int | dstStride, | ||
unsigned int | threshold | ||
) |
Binarizes a grayscale image based on a threshold value.
ATTENTION: This function is a duplication of fcvFilterThresholdu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterThresholdu8, fcvFilterThresholdu8_v2 will be removed, and the current signature for fcvFilterThresholdu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterThresholdu8 when transitioning to 2.0.0.
Sets the pixel to max(255) if it's value is greater than the threshold; else, set the pixel to min(0).
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8 |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit binarized image. Size of buffer is dstStride*srcHeight bytes. If src equals to dst and srcStride equals to dstStride, it will do in-place. WARNING: should be 128-bit aligned. |
dstStride | Output stride (in bytes). NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0. |
threshold | Threshold value for binarization. WARNING: must be larger than 0. |
FASTCV_API fcvStatus fcvFilterThresholdu8_v3 | ( | const uint8_t * | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
uint8_t * | dst, | ||
unsigned int | dstStride, | ||
unsigned int | threshold, | ||
uint8_t | trueValue, | ||
uint8_t | falseValue | ||
) |
Binarizes a grayscale image based on a threshold value. The binarized image will be in the two values selected by user.
ATTENTION: This function is a duplication of fcvFilterThresholdu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvFilterThresholdu8, fcvFilterThresholdu8_v3 will be removed, and the current signature for fcvFilterThresholdu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvFilterThresholdu8 when transitioning to 2.0.0.
Sets the pixel to max(255) if it's value is greater than the threshold; else, set the pixel to min(0).
src | Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8 |
srcHeight | Image height. |
srcStride | Image stride. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output 8-bit binarized image. Size of buffer is dstStride*srcHeight bytes. If src equals to dst and srcStride equals to dstStride, it will do in-place. WARNING: should be 128-bit aligned. |
dstStride | Output stride (in bytes). NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0. |
threshold | Threshold value for binarization. WARNING: must be larger than 0. |
trueValue | The value in type of uint8_t assigned to the destination pixel if the source is larger than threshold |
falseValue | The value in type of uint8_t assigned to the destination pixel if the source is smaller than or equal to threshold |
FASTCV_API void fcvFindForegroundIntegrateImageYCbCr420u32 | ( | const uint32_t *__restrict | bgIntegralY, |
const uint32_t *__restrict | bgIntegralCb, | ||
const uint32_t *__restrict | bgIntegralCr, | ||
const uint32_t *__restrict | fgIntegralY, | ||
const uint32_t *__restrict | fgIntegralCb, | ||
const uint32_t *__restrict | fgIntegralCr, | ||
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcYStride, | ||
uint32_t | srcCbStride, | ||
uint32_t | srcCrStride, | ||
uint8_t *__restrict | outputMask, | ||
uint32_t | outputWidth, | ||
uint32_t | outputHeight, | ||
uint32_t | outputMaskStride, | ||
float32_t | threshold | ||
) |
This function finds the foreground.
This function tries to find a forgound in the current image (represented by: fgIntegralY, fgIntegralCb, fgIntegralCr) based on the current background model (represented by: bgIntegralY, bgIntegralCb, bgIntegralCr). For example, the tuple (bgIntegralY, bgIntegralCb, bgIntegralCr) may be from a picture shooting a wall. Then the tuple (fgIntegralY, fgIntegralCb, fgIntegralCr) may be the wall with a paint on it. Note that all the first six parameters are indicating integral images that's computed from a YUV420 image, which maybe computed from the function: fcvIntegrateImageYCbCr420PseudoPlanaru8. Generally the size of fgIntegralY and bgIntegralY are (srcWidth+1)*(srcHeight+1). And the size of fgIntegralU, fgIntegralV, bgIntegralU and bgIntegralV are (srcWidth/2+1)*(srcHeight/2+1). The value of the outputWidth and outputHeight are usually indicating the desired block size. For example, if the user wants a 20x15 blocks on a 800x480 image. Then outputWidth=800/20 and outputHeight=480/15. After return, if the value in the outputMask image is 255, then a moving block is indicated, otherwise a non-moving block is indicated.
bgIntegralY | The input image/patch that's indicating the Y channel of the integral image of the background image. Size of buffer is srcYStride*srcHeight bytes NOTE: should be 128-bit aligned. |
bgIntegralCb | The input image/patch that's indicating the Cb channel of the integral image of the background image. Size of buffer is srcCbStride*srcHeight/2 bytes NOTE: should be 128-bit aligned. |
bgIntegralCr | The input image/patch that's indicating the Cr channel of the integral image of the background image. Size of buffer is srcCrStride*srcHeight/2 bytes NOTE: should be 128-bit aligned. |
fgIntegralY | The input image/patch that's indicating the Y channel of the integral image of the image on which we want to find the foreground. Size of buffer is srcYStride*srcHeight bytes NOTE: should be 128-bit aligned. |
fgIntegralCb | The input image/patch that's indicating the Cb channel of the integral image of the image on which we want to find the foreground. Size of buffer is srcCbStride*srcHeight/2 bytes NOTE: should be 128-bit aligned. |
fgIntegralCr | The input image/patch that's indicating the Cr channel of the integral image of the image on which we want to find the foreground. Size of buffer is srcCrStride*srcHeight/2 bytes NOTE: should be 128-bit aligned. |
srcWidth | Image width, the number of pixels in a row. See the details. NOTE: must be a multiple of 16. |
srcHeight | The height of the source image. See the details. NOTE: must be a multiple of 2. |
srcYStride | The stride of the input source image's Y channel. (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If left at 0 srcStride is default to (srcWidth+8)*sizeof(uint32_t). NOTE: should be a multiple of 8. |
srcCbStride | The stride of the input source image's Cb channel. (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If left at 0 srcStride is default to (srcWidth>>1+8)*sizeof(uint32_t). NOTE: should be a multiple of 8. |
srcCrStride | The stride of the input source image's Cr channel. (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If left at 0 srcStride is default to (srcWidth>>1+8)*sizeof(uint32_t). NOTE: should be a multiple of 8. |
outputMask | The output mask image. Each pixel represent the motion condition for a block in the original image. Size of buffer is outputMaskStride*outputHeight bytes NOTE: should be 128-bit aligned. |
outputWidth | The width of the output mask image. NOTE: should be a multiple of 8. |
outputHeight | The height of the output mask image. |
outputMaskStride | The stride of the output mask image. (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If left at 0 outputMaskStride is default to outputWidth. NOTE: should be a multiple of 8. |
threshold | The threshold that's used to decide if a block is moving or not. (recommend the value of 20). |
FASTCV_API fcvStatus fcvFloodfillMergedu8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
uint32_t | xBegin, | ||
uint32_t | yBegin, | ||
uint8_t | newVal, | ||
fcvConnectedComponent *__restrict | cc, | ||
uint8_t | connectivity | ||
) |
This function fills the image with a starting seed and neighborhood (4 or 8). It then returns the connected component (cc) that's filled.
This function first obtains the grayscale value at the (xBegin,yBegin) position of the src image. Then it finds all the neighbor pixels that has the same value based on 4 or 8 connectivity. The corresponding positions of all of these pixels in the image dst then will be set to the newVal. The dst image will have the same value as src at all other positions.
src | The input image/patch. Must be 8 bit grayscale image. Size of buffer is srcStride*srcHeight bytes. NOTE:should be 128-bit aligned. |
srcWidth | Image width, the number of pixels in a row NOTE: should be a multiple of 8. |
srcHeight | Image height. |
srcStride | Stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. NOTE: should be a multiple of 8. If left at 0 srcStride is default to srcWidth. |
dst | The output image/patch. Must be 8 bit grayscale image. NOTE:should be 128-bit aligned. |
dstStride | The stride of the output image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: should be a multiple of 8. If left at 0 dstStride is default to srcWidth. |
xBegin | The x coordinate of the pixel where we start the floodfill. |
yBegin | The y coordinate of the pixel where we start the floodfill. |
newVal | The new value that will be set on the dst image, correspoinding to the area that's floodfilled starting from the (xBegin,yBegin) position. |
cc | The pointer that's pointing to the connected component that's representing the floodfilled area. |
connectivity | It can be either 4 or 8, indicating whether we use a 4-neighborhood or 8-neighborhood to do the floodfill. |
FASTCV_API void fcvFloodfillSimpleu8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride, | ||
uint32_t | xBegin, | ||
uint32_t | yBegin, | ||
uint8_t | newVal, | ||
fcvConnectedComponent * | cc, | ||
uint8_t | connectivity, | ||
void * | lineBuffer | ||
) |
This function fills the image with a starting seed and neighborhood (4 or 8). It then returns the connected component (cc) that's filled.
This function first obtains the grayscale value at the (xBegin,yBegin) position of the src image. Then it finds all the neighbor pixels that has the same value based on 4 or 8 connectivity. The corresponding positions of all of these pixels in the image dst then will be set to the new value. Note that the new value cannot be zero since zero is indicating a mask background here. The dst image will have the new value at the corresponding positions and 0 at all other positions.
src | The input image/patch. Must be 8 bit grayscale image. Size of buffer is srcStride*srcHeight bytes. NOTE:should be 128-bit aligned. |
srcWidth | Image width, the number of pixels in a row NOTE: should be a multiple of 8. |
srcHeight | Image height. |
srcStride | Stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. NOTE: should be a multiple of 8. If left at 0 srcStride is default to srcWidth. |
dst | The output image/patch. Must be 8 bit grayscale image. NOTE:should be 128-bit aligned. |
dstStride | The stride of the output image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: should be a multiple of 8. If left at 0 dstStride is default to srcWidth. |
xBegin | The x coordinate of the pixel where we start the floodfill. |
yBegin | The y coordinate of the pixel where we start the floodfill. |
newVal | The new value that will be set on the dst image, correspoinding to the area that's floodfilled starting from the (xBegin,yBegin) position. |
cc | The pointer that's pointing to the connected component that's representing the floodfilled area. |
connectivity | It can be either 4 or 8, indicating whether we use a 4-neighborhood or 8-neighborhood to do the floodfill. |
lineBuffer | The input scratch buffer that needs to be allocated by the user and passed in. The size of the buffer must be: Max(srcWidth,srcHeight)*48 bytes. NOTE:should be 128-bit aligned. |
FASTCV_API void fcvImageDifff32 | ( | const float *__restrict | src1, |
const float *__restrict | src2, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
float *__restrict | dst, | ||
unsigned int | dstStride | ||
) |
Performs image difference by subracting src2 from src1. dst=src1-src2.
src1 | First source image. Size of buffer is srcStride*srcHeight*4 bytes. WARNING: should be 128-bit aligned. |
src2 | Second source image, must be same size as src1. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8 |
srcHeight | Image height. |
srcStride | Stride of input image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Destination. Size of buffer is dstStride*srcHeight*4 bytes. NOTE: Must be same size as src1 and src2. WARNING: should be 128-bit aligned. |
dstStride | Stride of output image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
FASTCV_API void fcvImageDiffs16 | ( | const int16_t *__restrict | src1, |
const int16_t *__restrict | src2, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | dst, | ||
unsigned int | dstStride | ||
) |
Compute image difference src1-src2.
src1 | Input image1 of int16 type. Size of buffer is srcStride*srcHeight*2 bytes. WARNING: should be 128-bit aligned. |
src2 | Input image2, must have same size as src1 WARNING: should be 128-bit aligned. |
srcWidth | Input image width WARNING: should be multiple of 8 |
srcHeight | Input image height |
srcStride | Stride of input image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Output image, saturated for int16 type. Size of buffer is dstStride*srcHeight*2 bytes. WARNING: should be 128-bit aligned. |
dstStride | Stride of output image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, dstStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
FASTCV_API void fcvImageDiffu8 | ( | const uint8_t *__restrict | src1, |
const uint8_t *__restrict | src2, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
uint8_t *__restrict | dst | ||
) |
Performs image difference by subracting src2 from src1. dst=src1-src2.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvImageDiffu8_v2(). In the 2.0.0 release, fcvImageDiffu8_v2 will be renamed to fcvImageDiffu8 and the signature of fcvImageDiffu8 as it appears now, will be removed.
dst[i,j] = (uint8_t) max( min((short)(src1[i,j]-src2[i,j]), 255), 0 );
src1 | First source image. Size of buffer is srcWidth*srcHeight bytes. WARNING: should be 128-bit aligned. |
src2 | Second source image, must be same size as src1. WARNING: should be 128-bit aligned. |
srcWidth | Image width. NOTE: should be a multiple of 8. |
srcHeight | Image height. |
dst | Destination. Size of buffer is srcWidth*srcHeight bytes. NOTE: Must be same size as src1 and src2. WARNING: should be 128-bit aligned. |
FASTCV_API void fcvImageDiffu8_v2 | ( | const uint8_t *__restrict | src1, |
const uint8_t *__restrict | src2, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
uint8_t *__restrict | dst, | ||
unsigned int | dstStride | ||
) |
Performs image difference by subracting src2 from src1. dst=src1-src2.
ATTENTION: This function is a duplication of fcvImageDiffu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvImageDiffu8, fcvImageDiffu8_v2 will be removed, and the current signature for fcvImageDiffu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvImageDiffu8 when transitioning to 2.0.0.
dst[i,j] = (uint8_t) max( min((short)(src1[i,j]-src2[i,j]), 255), 0 );
src1 | First source image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
src2 | Second source image, must be same size as src1. WARNING: should be 128-bit aligned. |
srcWidth | Image width. NOTE: should be a multiple of 8. |
srcHeight | Image height. |
srcStride | Stride of input image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dst | Destination. Size of buffer is dstStride*srcHeight bytes. NOTE: Must be same size as src1 and src2. WARNING: should be 128-bit aligned. |
dstStride | Stride of output image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as dstWidth. WARNING: should be multiple of 8, and at least as much as dstWidth if not 0. |
FASTCV_API void fcvImageDiffu8f32 | ( | const uint8_t *__restrict | src1, |
const uint8_t *__restrict | src2, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
float *__restrict | dst, | ||
unsigned int | dstStride | ||
) |
Performs image difference by promoting both src1 and src 2 to floating point values and then subracting src2 from src1. dst=src1-src2.
src1 | First source image |
src2 | Second source image, must be same size as src1. |
srcWidth | Image width. |
srcHeight | Image height. |
srcStride | Stride of input image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). WARNING: should be multiple of 8. |
dst | Destination image in float type NOTE: Must be same size as src1 and src2. WARNING: should be 128-bit aligned. |
dstStride | Stride of output image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). WARNING: should be multiple of 8. |
FASTCV_API void fcvImageDiffu8s8 | ( | const uint8_t *__restrict | src1, |
const uint8_t *__restrict | src2, | ||
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int8_t *__restrict | dst, | ||
unsigned int | dstStride | ||
) |
Performs image difference by subracting src2 from src1. dst = ( src1 >> 1) - ( src2 >> 1).
src1 | First source image |
src2 | Second source image, must be same size as src1. |
srcWidth | Image width. |
srcHeight | Image height. |
srcStride | Stride of input image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). WARNING: should be multiple of 8. |
dst | Destination image in int8 type NOTE: Must be same size as src1 and src2. WARNING: should be 128-bit aligned. |
dstStride | Stride of output image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). WARNING: should be multiple of 8. |
FASTCV_API void fcvImageGradientInterleavedf32 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
float *__restrict | gradients | ||
) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvImageGradientInterleavedf32_v2(). In the 2.0.0 release, fcvImageGradientInterleavedf32_v2 will be renamed to fcvImageGradientInterleavedf32 and the signature of fcvImageGradientInterleavedf32 as it appears now, will be removed.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). |
gradients | Buffer to store gradient. Must be 2*(width-1)*(height-1) in size. NOTE: data should be 128-bit aligned. |
FASTCV_API void fcvImageGradientInterleavedf32_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
float *__restrict | gradients, | ||
unsigned int | gradStride | ||
) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients.
ATTENTION: This function is a duplication of fcvImageGradientInterleavedf32() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvImageGradientInterleavedf32, fcvImageGradientInterleavedf32_v2 will be removed, and the current signature for fcvImageGradientInterleavedf32 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvImageGradientInterleavedf32 when transitioning to 2.0.0.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
gradients | Buffer to store gradient. Must be 2*(width-1)*(height-1) in size. NOTE: data should be 128-bit aligned. |
gradStride | Stride (in bytes) of the interleaved gradients array. NOTE: if 0, srcStride is set as (srcWidth-2)*2*sizeof(float). WARNING: should be multiple of 32 ( 8 * 4-byte values ), and at least as much as 8 * srcWidth if not 0. |
FASTCV_API void fcvImageGradientInterleaveds16 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | gradients | ||
) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvImageGradientInterleaveds16_v2(). In the 2.0.0 release, fcvImageGradientInterleaveds16_v2 will be renamed to fcvImageGradientInterleaveds16 and the signature of fcvImageGradientInterleaveds16 as it appears now, will be removed.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
gradients | Buffer to store gradient. Must be 2*(width-1)*(height-1) in size. |
FASTCV_API void fcvImageGradientInterleaveds16_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | gradients, | ||
unsigned int | gradStride | ||
) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients.
ATTENTION: This function is a duplication of fcvImageGradientInterleaveds16() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvImageGradientInterleaveds16, fcvImageGradientInterleaveds16_v2 will be removed, and the current signature for fcvImageGradientInterleaveds16 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvImageGradientInterleaveds16 when transitioning to 2.0.0.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
gradients | Buffer to store gradient. Must be 2*(width-1)*(height-1) in size. |
gradStride | Stride in bytes of the interleaved gradients array. NOTE: if 0, srcStride is set as 4*(srcWidth-2). WARNING: should be multiple of 16 ( 8 * 2-byte values ), and at least as much as 4*(srcWidth-2) if not 0. |
FASTCV_API void fcvImageGradientPlanarf32 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
float *__restrict | dx, | ||
float *__restrict | dy | ||
) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvImageGradientPlanarf32_v2(). In the 2.0.0 release, fcvImageGradientPlanarf32_v2 will be renamed to fcvImageGradientPlanarf32 and the signature of fcvImageGradientPlanarf32 as it appears now, will be removed.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. |
dx | Buffer to store horizontal gradient. Must be (width)*(height) in size. NOTE: data should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (width)*(height) in size. NOTE: data should be 128-bit aligned. |
FASTCV_API void fcvImageGradientPlanarf32_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
float *__restrict | dx, | ||
float *__restrict | dy, | ||
unsigned int | dxyStride | ||
) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients.
ATTENTION: This function is a duplication of fcvImageGradientPlanarf32() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvImageGradientPlanarf32, fcvImageGradientPlanarf32_v2 will be removed, and the current signature for fcvImageGradientPlanarf32 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvImageGradientPlanarf32 when transitioning to 2.0.0.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dx | Buffer to store horizontal gradient. Must be (srcWidth)*(srcHeight) in size. NOTE: data should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (srcWidth)*(srcHeight) in size. NOTE: data should be 128-bit aligned. |
dxyStride | Stride of Gradient values ('dx' and 'dy' arrays) measured in bytes. NOTE: if 0, srcStride is set as 4*srcWidth. WARNING: should be multiple of 32 (8 * 4-bytes per gradient value), and at least as much as 4*srcWidth if not 0. |
FASTCV_API void fcvImageGradientPlanars16 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | dx, | ||
int16_t *__restrict | dy | ||
) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvImageGradientPlanars16_v2(). In the 2.0.0 release, fcvImageGradientPlanars16_v2 will be renamed to fcvImageGradientPlanars16 and the signature of fcvImageGradientPlanars16 as it appears now, will be removed.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). |
dx | Buffer to store horizontal gradient. Must be (srcWidth)*(srcHeight) in size. NOTE: data should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (srcWidth)*(srcHeight) in size. NOTE: data should be 128-bit aligned. |
FASTCV_API void fcvImageGradientPlanars16_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | dx, | ||
int16_t *__restrict | dy, | ||
unsigned int | dxyStride | ||
) |
Creates 2D gradient from source illuminance data. This function considers only the left/right neighbors for x-gradients and top/bottom neighbors for y-gradients.
ATTENTION: This function is a duplication of fcvImageGradientPlanars16() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvImageGradientPlanars16, fcvImageGradientPlanars16_v2 will be removed, and the current signature for fcvImageGradientPlanars16 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvImageGradientPlanars16 when transitioning to 2.0.0.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dx | Buffer to store horizontal gradient. Must be (srcWidth)*(srcHeight) in size. NOTE: data should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (srcWidth)*(srcHeight) in size. NOTE: data should be 128-bit aligned. |
dxyStride | Stride (in bytes) of 'dx' and 'dy' arrays. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 16 (8 * 2-bytes per gradient value), and at least as much as srcWidth if not 0. |
FASTCV_API void fcvImageGradientSobelInterleavedf32 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
float *__restrict | gradients | ||
) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
[ -1 0 +1 ] [ -1 -2 -1 ]
dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
[ -1 0 +1 ] [ +1 +2 +1 ].
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvImageGradientSobelInterleavedf32_v2(). In the 2.0.0 release, fcvImageGradientSobelInterleavedf32_v2 will be renamed to fcvImageGradientSobelInterleavedf32 and the signature of fcvImageGradientSobelInterleavedf32 as it appears now, will be removed.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8 |
gradients | Buffer to store horizontal and vertical gradient. Must be (width-2)*(height-2) *2 floats in size. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
FASTCV_API void fcvImageGradientSobelInterleavedf32_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
float *__restrict | gradients, | ||
unsigned int | gradStride | ||
) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
[ -1 0 +1 ] [ -1 -2 -1 ]
dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
[ -1 0 +1 ] [ +1 +2 +1 ].
ATTENTION: This function is a duplication of fcvImageGradientSobelInterleavedf32() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvImageGradientSobelInterleavedf32, fcvImageGradientSobelInterleavedf32_v2 will be removed, and the current signature for fcvImageGradientSobelInterleavedf32 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvImageGradientSobelInterleavedf32 when transitioning to 2.0.0.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
gradients | Buffer to store horizontal and vertical gradient. Must be gradStride*(height-2) *2 bytes in size. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
gradStride | Stride (in bytes) of the interleaved gradients array. NOTE: if 0, gradStride is set as (srcWidth-2)*2*sizeof(float). WARNING: should be multiple of 8, and at least as much as (srcWidth-2)*2*sizeof(float) if not 0. |
FASTCV_API void fcvImageGradientSobelInterleaveds16 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | gradients | ||
) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
[ -1 0 +1 ] [ -1 -2 -1 ]
dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
[ -1 0 +1 ] [ +1 +2 +1 ].
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvImageGradientSobelInterleaveds16_v3(). In the 2.0.0 release, fcvImageGradientSobelInterleaveds16_v3 will be renamed to fcvImageGradientSobelInterleaveds16 and the signature of fcvImageGradientSobelInterleaveds16 as it appears now, will be removed.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8 |
gradients | Buffer to store horizontal and vertical gradient. Must be (width-2)*(height-2) *2 in size. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
FASTCV_API void fcvImageGradientSobelInterleaveds16_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | gradients, | ||
unsigned int | gradStride | ||
) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
[ -1 0 +1 ] [ -1 -2 -1 ]
dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
[ -1 0 +1 ] [ +1 +2 +1 ].
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvImageGradientSobelInterleaveds16_v3(). In the 2.0.0 release, fcvImageGradientSobelInterleaveds16_v3 will be renamed to fcvImageGradientSobelInterleaveds16 and the signature of fcvImageGradientSobelInterleaveds16 and fcvImageGradientSobelInterleaveds16_v2 as it appears now, will be removed.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
gradients | Buffer to store horizontal and vertical gradient. Must be gradStride*(height-2) *2 bytes in size. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
gradStride | Stride (in bytes) of the interleaved gradients array. NOTE: if 0, gradStride is set as (srcWidth-2)*2*sizeof(int16_t). WARNING: should be multiple of 8, and at least as much as 4*srcWidth if not 0. |
FASTCV_API void fcvImageGradientSobelInterleaveds16_v3 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | gradients, | ||
unsigned int | gradStride | ||
) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
[ -1 0 +1 ] [ -1 -2 -1 ]
dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
[ -1 0 +1 ] [ +1 +2 +1 ]
Compared to the original and v2 functions, this v3 functions does not normalize
the gradients (divide by 8). It just returns the actual dx, dy values.
ATTENTION: This function is a duplication of fcvImageGradientSobelInterleaveds16_v2() with a change in behavior: no normalization at the end of the calculation. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvImageGradientSobelInterleaveds16, fcvImageGradientSobelInterleaveds16_v2 and fcvImageGradientSobelInterleaveds16_v3 will be removed, and the current signature for fcvImageGradientSobelInterleaveds16 and fcvImageGradientSobelInterleaveds16_v3 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvImageGradientSobelInterleaveds16 when transitioning to 2.0.0.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. The number of pixels in a row. NOTE: should be a multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth. NOTE: should be a multiple of 8. |
gradients | Buffer to store horizontal and vertical gradient. Must be gradStride*(height-2) *2 bytes in size. NOTE: should be 128-bit aligned. |
gradStride | Stride (in bytes) is the number of bytes between column 0 of row 1 and column 0 of row 2 in the interleaved gradients array. If left at 0 gradStride is default to 4 * (srcWidth-2). WARNING: should be multiple of 8. |
FASTCV_API void fcvImageGradientSobelPlanarf32 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
float * | dx, | ||
float * | dy | ||
) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel
[ -1 0 +1 ] [ -1 -2 -1 ]
dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
[ -1 0 +1 ] [ +1 +2 +1 ].
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvImageGradientSobelPlanarf32_v2(). In the 2.0.0 release, fcvImageGradientSobelPlanarf32_v2 will be renamed to fcvImageGradientSobelPlanarf32 and the signature of fcvImageGradientSobelPlanarf32 as it appears now, will be removed.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8 |
dx | Buffer to store horizontal gradient. Must be (width)*(height) in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (width)*(height) in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
FASTCV_API void fcvImageGradientSobelPlanarf32_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
float * | dx, | ||
float * | dy, | ||
unsigned int | dxyStride | ||
) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel
[ -1 0 +1 ] [ -1 -2 -1 ]
dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
[ -1 0 +1 ] [ +1 +2 +1 ].
ATTENTION: This function is a duplication of fcvImageGradientSobelPlanarf32() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvImageGradientSobelPlanarf32, fcvImageGradientSobelPlanarf32_v2 will be removed, and the current signature for fcvImageGradientSobelPlanarf32 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvImageGradientSobelPlanarf32 when transitioning to 2.0.0.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dx | Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
dxyStride | Stride (in bytes) of 'dx' and 'dy' gradient arrays. NOTE: if 0, dxyStride is set as 4*srcWidth. WARNING: should be multiple of 32 (8 * 4-bytes per gradient value),and at least as much as srcWidth*sizeof(float) if not 0. |
FASTCV_API void fcvImageGradientSobelPlanarf32f32 | ( | const float *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
float * | dx, | ||
float * | dy | ||
) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel
[ -1 0 +1 ] [ -1 -2 -1 ]
dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
[ -1 0 +1 ] [ +1 +2 +1 ].
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvImageGradientSobelPlanarf32f32_v2(). In the 2.0.0 release, fcvImageGradientSobelPlanarf32f32_v2 will be renamed to fcvImageGradientSobelPlanarf32f32 and the signature of fcvImageGradientSobelPlanarf32f32 as it appears now, will be removed.
src | Input image/patch. Size of buffer is srcStride*srcHeight floats. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many pixels (not bytes) between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. |
dx | Buffer to store horizontal gradient. Must be (width)*(height) floats in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (width)*(height) floats in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
FASTCV_API void fcvImageGradientSobelPlanarf32f32_v2 | ( | const float *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
float * | dx, | ||
float * | dy, | ||
unsigned int | dxyStride | ||
) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel
[ -1 0 +1 ] [ -1 -2 -1 ]
dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
[ -1 0 +1 ] [ +1 +2 +1 ].
ATTENTION: This function is a duplication of fcvImageGradientSobelPlanarf32f32()() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvImageGradientSobelPlanarf32f32(), fcvImageGradientSobelPlanarf32f32_v2 will be removed, and the current signature for fcvImageGradientSobelPlanarf32f32 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvImageGradientSobelPlanarf32f32 when transitioning to 2.0.0.
src | Input image/patch. Size of buffer is srcStride*srcHeight floats. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride (in bytes) of image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). WARNING: should be multiple of 32 (8 * 4-bytes), and at least as much as srcWidth*sizeof(float) if not 0. NOTE: if 0, srcStride is set as srcWidth*4. |
dx | Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
dxyStride | Stride (in bytes) of 'dx' and 'dy' gradient arrays. WARNING: should be multiple of 32 (8 * 4-bytes per gradient value). WARNING: should be multiple of 32 (8 * 4-bytes), and at least as much as srcWidth*sizeof(float) if not 0. NOTE: if 0, dxyStride is set as srcWidth*4. |
FASTCV_API void fcvImageGradientSobelPlanars16 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | dx, | ||
int16_t *__restrict | dy | ||
) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel
[ -1 0 +1 ] [ -1 -2 -1 ]
dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
[ -1 0 +1 ] [ +1 +2 +1 ].
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvImageGradientSobelPlanars16_v3(). In the 2.0.0 release, fcvImageGradientSobelPlanars16_v3 will be renamed to fcvImageGradientSobelPlanars16 and the signature of fcvImageGradientSobelPlanars16 as it appears now, will be removed.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8 |
dx | Buffer to store horizontal gradient. Must be (width)*(height) in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (width)*(height) in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
FASTCV_API void fcvImageGradientSobelPlanars16_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | dx, | ||
int16_t *__restrict | dy, | ||
unsigned int | dxyStride | ||
) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel
[ -1 0 +1 ] [ -1 -2 -1 ]
dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
[ -1 0 +1 ] [ +1 +2 +1 ].
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvImageGradientSobelPlanars16_v3(). In the 2.0.0 release, fcvImageGradientSobelPlanars16_v3 will be renamed to fcvImageGradientSobelPlanars16 and the signature of fcvImageGradientSobelPlanars16_v2 and fcvImageGradientSobelPlanars16_v3 as it appears now, will be removed.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dx | Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
dxyStride | Stride (in bytes) of 'dx' and 'dy' gradient arrays. NOTE: if 0, dxyStride is set as (srcWidth*sizeof(int16_t)). WARNING: should be multiple of 16 (8 * 2-bytes per gradient value), and at least as much as srcWidth if not 0. |
FASTCV_API void fcvImageGradientSobelPlanars16_v3 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int16_t *__restrict | dx, | ||
int16_t *__restrict | dy, | ||
unsigned int | dxyStride | ||
) |
Creates a 2D gradient image from source luminance data without normalization. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel
[ -1 0 +1 ] [ -1 -2 -1 ]
dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
[ -1 0 +1 ] [ +1 +2 +1 ].
ATTENTION: This function is a duplication of fcvImageGradientSobelPlanars16_v2() with a change in behavior: no normalization at the end of the calculation. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvImageGradientSobelPlanars16, fcvImageGradientSobelPlanars16_v2 and fcvImageGradientSobelPlanars16_v3 will be removed, and the current signature for fcvImageGradientSobelPlanars16 and fcvImageGradientSobelPlanars16_v3 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvImageGradientSobelPlanars16 when transitioning to 2.0.0.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. The number of pixels in a row. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth. NOTE: should be multiple of 8. |
dx | Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values NOTE: should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values NOTE: should be 128-bit aligned. |
dxyStride | Stride (in bytes) of 'dx' and 'dy' gradient arrays, is the number of bytes between column 0 of row 1 and column 0 of row 2 in the gradient arrays dx or dy. If left at 0 gradStride is default to 2 * srcWidth. NOTE: should be multiple of 8. |
FASTCV_API void fcvImageGradientSobelPlanars8 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int8_t *__restrict | dx, | ||
int8_t *__restrict | dy | ||
) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel
[ -1 0 +1 ] [ -1 -2 -1 ]
dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
[ -1 0 +1 ] [ +1 +2 +1 ].
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvFilterGaussian3x3u8_v2(). In the 2.0.0 release, fcvImageGradientSobelPlanars8_v2 will be renamed to fcvImageGradientSobelPlanars8 and the signature of fcvImageGradientSobelPlanars8 as it appears now, will be removed.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8 |
dx | Buffer to store horizontal gradient. Must be (width)*(height) in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (width)*(height) in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
FASTCV_API void fcvImageGradientSobelPlanars8_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int8_t *__restrict | dx, | ||
int8_t *__restrict | dy, | ||
unsigned int | dxyStride | ||
) |
Creates a 2D gradient image from source luminance data. This function computes central differences on 3x3 neighborhood and then convolves the result with Sobel kernel
[ -1 0 +1 ] [ -1 -2 -1 ]
dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
[ -1 0 +1 ] [ +1 +2 +1 ].
ATTENTION: This function is a duplication of fcvImageGradientSobelPlanars8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvImageGradientSobelPlanars8, fcvImageGradientSobelPlanars8_v2 will be removed, and the current signature for fcvImageGradientSobelPlanars8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvImageGradientSobelPlanars8 when transitioning to 2.0.0.
src | Input image/patch. Size of buffer is srcStride*srcHeight bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of src data to create gradient. WARNING: should be multiple of 8. |
srcHeight | Height of src data to create gradient. |
srcStride | Stride of image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
dx | Buffer to store horizontal gradient. Must be (dxyStride)*(height) in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
dy | Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size. NOTE: a border of 1 pixel in size on top, bottom, left, and right contains undefined values. Gradient output is scaled by 1/8. NOTE: data should be 128-bit aligned. |
dxyStride | Stride (in bytes) of 'dx' and 'dy' gradient arrays. NOTE: if 0, srcStride is set as srcWidth. WARNING: should be multiple of 8, and at least as much as srcWidth if not 0. |
FASTCV_API void fcvImageHistogramEqualizeu8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Normalize the image according to histogram value of the pixel intensity.
src | Pointer to grayscale image with one byte per pixel WARNING: should be 128-bit aligned. |
srcWidth | Image width |
srcHeight | Image height |
srcStride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth. NOTE: should be a multiple of 8. |
dst | Pointer to output image with one byte per pixel WARNING: should be 128-bit aligned. |
dstStride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth. NOTE: should be a multiple of 8. |
FASTCV_API void fcvImageIntensityHistogram | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
int | xBegin, | ||
int | yBegin, | ||
unsigned int | recWidth, | ||
unsigned int | recHeight, | ||
int32_t * | histogram | ||
) |
Creates a histogram of intensities for a rectangular region of a grayscale image. Bins each pixel into a histogram of size 256, depending on the intensity of the pixel (in the range 0 to 255).
src | pointer to 8-bit grayscale image WARNING: should be 128-bit aligned. |
srcWidth | Width of source image WARNING: should be multiple of 8. |
xBegin | x coordinate of top left of rectangle |
yBegin | y coordinate of top left of rectangle |
recWidth | Width of rectangular region |
recHeight | Height of rectangular region |
histogram | Array of size 256 for storing the histogram WARNING: should be 128-bit aligned. |
FASTCV_API void fcvImageIntensityStats | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
int | xBegin, | ||
int | yBegin, | ||
unsigned int | recWidth, | ||
unsigned int | recHeight, | ||
float * | mean, | ||
float * | variance | ||
) |
Calculates the mean and variance of intensities of a rectangle in a grayscale image.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvImageIntensityStats_v2(). In the 2.0.0 release, fcvImageIntensityStats_v2 will be renamed to fcvImageIntensityStats and the signature of fcvImageIntensityStats as it appears now, will be removed. This API is the same as fcvImageIntensityStats_v2 with FASTCV_UNBIASED_VARIANCE_ESTIMATOR
src | pointer to 8-bit grayscale image WARNING: should be 128-bit aligned. |
srcWidth | Width of source image WARNING: should be multiple of 8. |
xBegin | x coordinate of top left of rectangle |
yBegin | y coordinate of top left of rectangle |
recWidth | width of rectangular region |
recHeight | height of rectangular region |
mean | output of mean of region |
variance | output of variance of region |
FASTCV_API fcvStatus fcvImageIntensityStats_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
int | xBegin, | ||
int | yBegin, | ||
uint32_t | recWidth, | ||
uint32_t | recHeight, | ||
float32_t * | mean, | ||
float32_t * | variance, | ||
fcvVarianceEstimator | varianceEstimator | ||
) |
Calculates the mean and variance of intensities of a rectangle in a grayscale image.
src | pointer to 8-bit grayscale image WARNING: should be 128-bit aligned. |
srcWidth | Width of source image WARNING: should be multiple of 8. |
xBegin | x coordinate of top left of rectangle |
yBegin | y coordinate of top left of rectangle |
recWidth | width of rectangular region |
recHeight | height of rectangular region |
mean | output of mean of region |
variance | output of variance of region |
varianceEstimator | variance estimator |
FASTCV_API uint32_t fcvImageSegmentationRegionGrow | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t | numChannel, | ||
uint32_t | thresholdSplit, | ||
uint32_t | thresholdMerge, | ||
uint32_t *__restrict | segLabel, | ||
uint32_t | segLabelStride, | ||
uint8_t *__restrict | data | ||
) |
Segments an image (3 or 1 channel) into meaningful regions, depending on the color or gray scale uniformity of the neighborhood pixels.
src | Pointer to 8-bit color (3-channel) or grayscale (1-channel) image. |
srcWidth | Width of src image, measured by pixels. |
srcHeight | Height of src image, measured by pixels. |
srcStride | Stride of src image, measured by bytes. WARNING: should be multiple of 8, and at least as much as srcWidth*numChannel if not 0. |
numChannel | Number of channels of src image. 1 for gray scale and 3 for color image. |
thresholdSplit | Threshold for region split. Higher value: larger uniform region segmented. Range of 3-channel image segmentation 20~500: 20~50 for heavy over-segmentation, 50~100 for median over-segmentation, 100~150 for light over-segmentation, 150~250 for normal segmentation, 250~400 for light under-segmentation, 400~500 for heavy under-segmentation. Range of 1-channel image segmentation 3~150: 3~10 for heavy over-segmentation, 10~15 for median over-segmentation, 15~25 for light over-segmentation, 25~50 for normal segmentation, 50~75 for light under-segmentation, 75~150 for heavy under-segmentation. |
thresholdMerge | Threshold for region merge, measured by the region area (pixels). Higher value: larger uniform region segmented. Range 10~1000 for VGA size image. Range of 3-channel image segmentation 10~1000: 10~30 for heavy over-segmentation, 30~60 for median over-segmentation, 60~150 for light over-segmentation, 150~400 for normal segmentation, 400~600 for light under-segmentation, 600~1000 for heavy under-segmentation. Same for the 1-channel image. For other image size, please tune the thresholdMerge value proportional to the VGA size. |
segLabel | Segmented labels. 1 channel with same size of src. Pixel belonging to the same region is uniformly labeled by a non-zero number. |
segLabelStride | Stride of segmented labels, measured by bytes. WARNING: should be multiple of 8, and at least as much as srcWidth*4 if not 0. |
data | data buffer for inner function buffer allocation. The buffer size is recommended below, for 3-channel image: *data = (uint8_t *) malloc ( srcWidth*srcHeight*18*sizeof(uint8_t) ); for 1-channel image: *data = (uint8_t *) malloc ( srcWidth*srcHeight*16*sizeof(uint8_t) ); |
FASTCV_API fcvStatus fcvImageSegmentationSeedRegionGrows16 | ( | const int16_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t | numChannel, | ||
uint32_t | threshGrow, | ||
const uint32_t *__restrict | pointVector, | ||
uint32_t | numSeed, | ||
uint8_t | mode, | ||
uint32_t *__restrict | segLabel, | ||
uint32_t | segLabelStride | ||
) |
Grow the seeds within the image to meaningful regions, depending on the color or gray scale uniformity of the neighborhood pixels from the seeds.
src | Pointer to 16-bit color (3-channel) or grayscale (1-channel) image. |
srcWidth | Width of src image, measured by pixels. |
srcHeight | Height of src image, measured by pixels. |
srcStride | Stride of src image, measured by bytes. WARNING: should be multiple of 8, and at least as much as srcWidth*numChannel if not 0. |
numChannel | Number of channels of src image. 1 for gray scale and 3 for color image. |
threshGrow | Threshold to grow the seed into a region. Higher value: larger uniform region grown. Range of 3-channel image segmentation: 10~150. Range of 1-channel image segmentation: 3~25. |
pointVector | A 2D point vector of seeds (provided by user) within the image. For N seeds, it is saved as [x0,y0,x1,y1,...,xN-1,yN-1]. |
numSeed | Number of seed points, equal to N used in pointVector. |
mode | Mode of seed grow. 0: distance measured with neighborhood pixel. 1: distance measured with seed pixel only. |
segLabel | Segmented labels. 1 channel with same size of src. Pixel belonging to the same region is uniformly labeled by a non-zero number. Pixels not grown from any seeds are labeled 0. |
segLabelStride | Stride of segmented labels, measured by bytes. WARNING: should be multiple of 8, and at least as much as srcWidth*4 if not 0. |
FASTCV_API void fcvImageSpatialHistogramu8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t | numPatterns, | ||
uint32_t | grid_x, | ||
uint32_t | grid_y, | ||
float32_t *__restrict | histogram | ||
) |
Calculate histogram at image patches.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvImageSpatialHistogramu8_v2(). In the 2.0.0 release, fcvImageSpatialHistogramu8_v2 will be renamed to fcvImageSpatialHistogramu8 and the signature of fcvImageSpatialHistogramu8 as it appears now, will be removed.
src | Pointer to grayscale image with one byte per pixel WARNING: should be 128-bit aligned. |
srcWidth | Image width |
srcHeight | Image height |
srcStride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth. NOTE: should be a multiple of 8. |
numPatterns | Number of patterns to be computed in the histogram |
grid_x | The number of grids along x dimension |
grid_y | The number of grids along y dimension |
histogram | Output histogram NOTE: Memory must be at least numPatterns*grid_x*grid_y*sizeof(float32_t) |
FASTCV_API fcvStatus fcvImageSpatialHistogramu8_v2 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t | numPatterns, | ||
uint32_t | grid_x, | ||
uint32_t | grid_y, | ||
float32_t *__restrict | histogram, | ||
float32_t | normalize_factor | ||
) |
Calculate histogram at image patches.
ATTENTION: This function is a duplication of fcvImageSpatialHistogramu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvImageSpatialHistogramu8, fcvImageSpatialHistogramu8_v2 will be removed, and the current signature for fcvImageSpatialHistogramu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvImageSpatialHistogramu8 when transitioning to 2.0.0.
src | Pointer to grayscale image with one byte per pixel WARNING: should be 128-bit aligned. |
srcWidth | Image width |
srcHeight | Image height |
srcStride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth. NOTE: should be a multiple of 8. |
numPatterns | Number of patterns to be computed in the histogram |
grid_x | The number of grids along x dimension |
grid_y | The number of grids along y dimension |
histogram | Output histogram NOTE: Memory must be at least numPatterns*grid_x*grid_y*sizeof(float32_t) |
normalize_factor | Scale factor with float32_t type to normalize result. When set to 0, the result is normalized by (srcWidth/grid_x) * (srcHeight/grid_y) |
FASTCV_API void fcvIntegrateImageLine64u8 | ( | const uint8_t *__restrict | src, |
uint16_t * | intgrl, | ||
uint32_t * | intgrlSqrd | ||
) |
Integrates 64 contiguous pixels of an image.
src | Input image. WARNING: should be 128-bit aligned. |
intgrl | Sum of values from specified pixels. |
intgrlSqrd | Sum of squared values from specified pixels. |
FASTCV_API void fcvIntegrateImageLineu8 | ( | const uint8_t *__restrict | src, |
uint16_t | srcWidth, | ||
uint32_t * | intgrl, | ||
uint32_t * | intgrlSqrd | ||
) |
Integrates one line of an image or any portion of an image that is contiguous in memory.
src | Input image. Size of buffer is srcWidth bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Number of pixels. NOTE: bit width enforces numPxls < 2^16 |
intgrl | Sum of values from specified pixels. |
intgrlSqrd | Sum of squared values from specified pixels. |
FASTCV_API void fcvIntegrateImageu8 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
uint32_t *__restrict | dst | ||
) |
Builds an integral image of the incoming 8-bit image and adds an unfilled border on top and to the left.
NOTE: border usually zero filled elsewhere.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvIntegratePatchu8_v2(). In the 2.0.0 release, fcvIntegratePatchu8_v2 will be renamed to fcvIntegratePatchu8 and the signature of fcvIntegratePatchu8 as it appears now, will be removed.
sum (X,Y) = sum_{x<X,y<Y} I(x,y)
src | Input image. Size of buffer is srcWidth*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. NOTE: height must be <= 2048 |
dst | Output integral-image. Should point to a memory of size (width+1)*(height+1). Zero borders for 1st column. WARNING: should be 128-bit aligned. |
FASTCV_API void fcvIntegrateImageu8_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
uint32_t *__restrict | dst, | ||
unsigned int | dstStride | ||
) |
Builds an integral image of the incoming 8-bit image and adds an unfilled border on top and to the left.
NOTE: border usually zero filled elsewhere.
ATTENTION: This function is a duplication of fcvIntegrateImageu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvIntegrateImageu8, fcvIntegrateImageu8_v2 will be removed, and the current signature for fcvIntegrateImageu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvIntegrateImageu8 when transitioning to 2.0.0.
sum (X,Y) = sum_{x<X,y<Y} I(x,y)
src | Input image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. NOTE: height must be <= 2048 |
srcStride | Stride (in bytes) of the image (i.e., how many pixels between column 0 of row 1 and column 0 of row 2). WARNING: should be multiple of 8. |
dst | Output integral-image. Should point to a memory of size at least (width+1)*(height+1). Zero borders for 1st column. WARNING: should be 128-bit aligned. |
dstStride | Stride (in bytes) of integral image. WARNING: should be multiple of 32 (8 * 4-byte values). |
FASTCV_API void fcvIntegrateImageu8u64 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t *__restrict | dstIntgrl, | ||
uint64_t *__restrict | dstIntgrlSqrd, | ||
uint32_t | dstIntgrlStride, | ||
uint32_t | dstIntgrlSqrdStride | ||
) |
Builds an integral image of the incoming 8-bit patch values and their squares. This function supports bigger size patch with u64 for squared integral output.
NOTE: No extra border lines, the integral output buffer size is the same as input image buffer size.
sum (X,Y) = sum_{x<=X,y<=Y} I(x,y)
src | Input image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. |
srcHeight | Image height. |
srcStride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth. WARNING: should be multiple of 8 (8 * 1-byte values). |
dstIntgrl | Integral image. NOTE: Memory must be >= srcWidth*srcHeight*4 bytes |
dstIntgrlSqrd | Integral image of squared values. NOTE: Memory must be >= srcWidth*srcHeight*8 bytes |
dstIntgrlStride | dstIntgrl Image stride (in bytes). Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth*4. WARNING: should be multiple of 8 (8 * 1-byte values). |
dstIntgrlSqrdStride | dstIntgrlSqrd Image stride (in bytes). Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth*8. WARNING: should be multiple of 8 (8 * 1-byte values). |
FASTCV_API void fcvIntegrateImageYCbCr420PseudoPlanaru8 | ( | const uint8_t *__restrict | srcY, |
const uint8_t *__restrict | srcC, | ||
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcYStride, | ||
uint32_t | srcCStride, | ||
uint32_t *__restrict | integralY, | ||
uint32_t *__restrict | integralCb, | ||
uint32_t *__restrict | integralCr, | ||
uint32_t | integralYStride, | ||
uint32_t | integralCbStride, | ||
uint32_t | integralCrStride | ||
) |
This function calculates the integral image of a YCbCr image.
This function calculates the integral images of a YCbCr420 image, where the input YCbCr420 has UV interleaved. The output is 3 seperate channels. The output integralY will be (srcWidth+1)x(srcHeight+1). IntegralU and IntegralV are (srcWidth/2+1)x(srcHeight/2+1).
srcY | The input image/patch Y in planar format. Size of buffer is srcYStride*srcHeight bytes NOTE: should be 128-bit aligned. |
srcC | The input image/patch. Pointer to CbCr are interleaved. Size of buffer is srcCStride*srcHeight/2 bytes NOTE: should be 128-bit aligned. |
srcWidth | Image width, the number of pixels in a row NOTE: must be a multiple of 16. |
srcHeight | Image height. NOTE: must be a multiple of 2. |
srcYStride | The stride of the input source image's Y channel. (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If left at 0 srcYStride is default to srcWidth. NOTE: must be a multiple of 16. |
srcCStride | The stride of the input source image's CbCr channel. (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If left at 0 srcCStride is default to srcWidth. NOTE: must be a multiple of 16. |
integralY | The output integral image/patch for Y channel. Must be 32 bit image. The size will be (srcWidth+1)x(srcHeight+1). Size of buffer is integralYStride*(srcHeight+1) bytes NOTE: should be 128-bit aligned. |
integralCb | The output integral image/patch for Cb channel. Must be 32 bit image. The size will be (srcWidth/2+1)x(srcHeight/2+1). Size of buffer is integralCbStride*(srcHeight/2+1) bytes NOTE: should be 128-bit aligned. |
integralCr | The output integral image/patch for Cr channel. Must be 32 bit image. The size will be (srcWidth/2+1)x(srcHeight/2+1). Size of buffer is integralCrStride*(srcHeight/2+1) bytes NOTE: should be 128-bit aligned. |
integralYStride | The stride of integralY. (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If left at 0 integralYStride is default to (srcWidth+8)*sizeof(uint32_t) NOTE: should be a multiple of 8. |
integralCbStride | The stride of integralCb. (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If left at 0 integralCbStride is default to (srcWidth>>1+8) *sizeof(uint32_t) NOTE: should be a multiple of 8. |
integralCrStride | The stride of integralCr. (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If left at 0 integralCrStride is default to (srcWidth>>1+8) *sizeof(uint32_t) NOTE: should be a multiple of 8. |
FASTCV_API void fcvIntegratePatch12x12u8 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
int | patchX, | ||
int | patchY, | ||
uint32_t *__restrict | intgrlImgOut, | ||
uint32_t *__restrict | intgrlSqrdImgOut | ||
) |
Builds an integral image of the incoming 12x12 8-bit patch values and their squares. It also adds an unfilled border on top and to the left.
NOTE: border usually zero filled elsewhere.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvIntegratePatch12x12u8_v2(). In the 2.0.0 release, fcvIntegratePatch12x12u8_v2 will be renamed to fcvIntegratePatch12x12u8 and the signature of fcvIntegratePatch12x12u8 as it appears now, will be removed.
sum (X,Y) = sum_{x<X,y<Y} I(x,y)
src | Input image. Size of buffer is srcWidth*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
patchX | Patch location on image of upper-left patch corner. |
patchY | Patch location on image of upper-left patch corner. |
intgrlImgOut | Integral image. Zero borders for 1st column. NOTE: Memory must be > (12+1)(12+1) |
intgrlSqrdImgOut | Integral image of squared values. NOTE: Memory must be > (12+1)(12+1) |
FASTCV_API void fcvIntegratePatch12x12u8_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int | patchX, | ||
int | patchY, | ||
uint32_t *__restrict | intgrlImgOut, | ||
uint32_t *__restrict | intgrlSqrdImgOut | ||
) |
Builds an integral image of the incoming 12x12 8-bit patch values and their squares. It also adds an unfilled border on top and to the left.
NOTE: border usually zero filled elsewhere.
ATTENTION: This function is a duplication of fcvIntegratePatch12x12u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvIntegratePatch12x12u8, fcvIntegratePatch12x12u8_v2 will be removed, and the current signature for fcvIntegratePatch12x12u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvIntegratePatch12x12u8 when transitioning to 2.0.0.
sum (X,Y) = sum_{x<X,y<Y} I(x,y)
WARNING: do not use - under construction.
src | Input image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. |
srcStride | Image stride (in bytes). WARNING: should be multiple of 8 (8 * 1-byte values). |
patchX | Patch location on image of upper-left patch corner. |
patchY | Patch location on image of upper-left patch corner. |
intgrlImgOut | Integral image. Zero borders for 1st column. NOTE: Memory must be > (12+1)(12+1) |
intgrlSqrdImgOut | Integral image of squared values. NOTE: Memory must be > (12+1)(12+1) |
FASTCV_API void fcvIntegratePatch18x18u8 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
int | patchX, | ||
int | patchY, | ||
uint32_t *__restrict | intgrlImgOut, | ||
uint32_t *__restrict | intgrlSqrdImgOut | ||
) |
Builds an integral image of the incoming 18x18 8-bit patch values and their squares. It also adds an unfilled border on top and to the left.
NOTE: border usually zero filled elsewhere.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvIntegratePatch18x18u8_v2(). In the 2.0.0 release, fcvIntegratePatch18x18u8_v2 will be renamed to fcvIntegratePatch18x18u8 and the signature of fcvIntegratePatch18x18u8 as it appears now, will be removed.
sum (X,Y) = sum_{x<X,y<Y} I(x,y)
src | Input image. Size of buffer is srcWidth*srcHeight bytes. |
srcWidth | Image srcWidth. WARNING: should be multiple of 8. |
srcHeight | Image height. |
patchX | Patch location on image of upper-left patch corner. |
patchY | Patch location on image of upper-left patch corner. |
intgrlImgOut | Integral image. Zero borders for 1st column. NOTE: Memory must be > (18+1)(18+1) |
intgrlSqrdImgOut | Integral image of squared values. NOTE: Memory must be > (18+1)(18+1) |
FASTCV_API void fcvIntegratePatch18x18u8_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int | patchX, | ||
int | patchY, | ||
uint32_t *__restrict | intgrlImgOut, | ||
uint32_t *__restrict | intgrlSqrdImgOut | ||
) |
Builds an integral image of the incoming 18x18 8-bit patch values and their squares. It also adds an unfilled border on top and to the left.
NOTE: border usually zero filled elsewhere.
ATTENTION: This function is a duplication of fcvIntegratePatch18x18u8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvIntegratePatch18x18u8, fcvIntegratePatch18x18u8_v2 will be removed, and the current signature for fcvIntegratePatch18x18u8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvIntegratePatch18x18u8 when transitioning to 2.0.0.
sum (X,Y) = sum_{x<X,y<Y} I(x,y)
src | Input image. Size of buffer is srStride*srcHeight bytes. |
srcWidth | Image srcWidth. WARNING: should be multiple of 8. |
srcHeight | Image height. |
srcStride | Image stride (in bytes). WARNING: should be multiple of 8 (8 * 1-byte values). |
patchX | Patch location on image of upper-left patch corner. |
patchY | Patch location on image of upper-left patch corner. |
intgrlImgOut | Integral image. Zero borders for 1st column. NOTE: Memory must be > (18+1)(18+1) |
intgrlSqrdImgOut | Integral image of squared values. NOTE: Memory must be > (18+1)(18+1) |
FASTCV_API void fcvIntegratePatchu8 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
int | patchX, | ||
int | patchY, | ||
unsigned int | patchW, | ||
unsigned int | patchH, | ||
uint32_t *__restrict | intgrlImgOut, | ||
uint32_t *__restrict | intgrlSqrdImgOut | ||
) |
Builds an integral image of the incoming 8-bit patch values and their squares and adds an unfilled border on top and to the left.
NOTE: border usually zero filled elsewhere.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvIntegratePatchu8_v2(). In the 2.0.0 release, fcvIntegratePatchu8_v2 will be renamed to fcvIntegratePatchu8 and the signature of fcvIntegratePatchu8 as it appears now, will be removed.
sum (X,Y) = sum_{x<X,y<Y} I(x,y)
src | Input image. Size of buffer is srcWidth*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. WARNING: height must be <= 2048 |
patchX | Patch location on image of upper-left patch corner. |
patchY | Patch location on image of upper-left patch corner. |
patchW | Patch width. |
patchH | Patch height. |
intgrlImgOut | Integral image. Zero borders for 1st column. NOTE: Memory must be > (patchW+1)(patchH+1) |
intgrlSqrdImgOut | Integral image of squared values. NOTE: Memory must be > (patchW+1)(patchH+1) |
FASTCV_API void fcvIntegratePatchu8_v2 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | srcStride, | ||
int | patchX, | ||
int | patchY, | ||
unsigned int | patchW, | ||
unsigned int | patchH, | ||
uint32_t *__restrict | intgrlImgOut, | ||
uint32_t *__restrict | intgrlSqrdImgOut | ||
) |
Builds an integral image of the incoming 8-bit patch values and their squares and adds an unfilled border on top and to the left.
NOTE: border usually zero filled elsewhere.
ATTENTION: This function is a duplication of fcvIntegratePatchu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvIntegratePatchu8, fcvIntegratePatchu8_v2 will be removed, and the current signature for fcvIntegratePatchu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvIntegratePatchu8 when transitioning to 2.0.0.
sum (X,Y) = sum_{x<X,y<Y} I(x,y)
src | Input image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. WARNING: height must be <= 2048 |
srcStride | Image stride (in bytes). WARNING: should be multiple of 8 (8 * 1-byte values). |
patchX | Patch location on image of upper-left patch corner. |
patchY | Patch location on image of upper-left patch corner. |
patchW | Patch width. WARNING: (patchW * patchH) should be less than 66051, to avoid overflow. |
patchH | Patch height. WARNING: (patchW * patchH) should be less than 66051, to avoid overflow. |
intgrlImgOut | Integral image. Zero borders for 1st column. NOTE: Memory must be > (patchW+1)(patchH+1) |
intgrlSqrdImgOut | Integral image of squared values. NOTE: Memory must be > (patchW+1)(patchH+1) |
FASTCV_API fcvStatus fcvIntegratePatchu8_v3 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t | patchX, | ||
uint32_t | patchY, | ||
uint32_t | patchW, | ||
uint32_t | patchH, | ||
uint32_t *__restrict | intgrlImgOut, | ||
uint32_t | intgrlStride, | ||
uint32_t *__restrict | intgrlSqrdImgOut, | ||
uint32_t | intgrlSqrdStride | ||
) |
Builds an integral image of the incoming 8-bit patch values and their squares and adds an unfilled border on top and to the left.
NOTE: border usually zero filled elsewhere.
ATTENTION: This function is a duplication of fcvIntegratePatchu8() and fcvIntegratePatchu8_v2() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvIntegratePatchu8, fcvIntegratePatchu8_v2 and fcvIntegratePatchu8_v3 will be removed, and the current signature for fcvIntegratePatchu8 and fcvIntegratePatchu8_v2 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvIntegratePatchu8 when transitioning to 2.0.0.
sum (X,Y) = sum_{x<X,y<Y} I(x,y)
src | Input image. Size of buffer is srcStride*srcHeight bytes. WARNING: should be 128-bit aligned. |
srcWidth | Image width. WARNING: should be multiple of 8. |
srcHeight | Image height. WARNING: height must be <= 2048 |
srcStride | Image stride (in bytes). WARNING: should be multiple of 8 . |
patchX | X coordinate of upper-left patch corner. |
patchY | Y coordinate of upper-left patch corner. |
patchW | Patch width. WARNING: (patchW * patchH) should be less than 66051, to avoid overflow. |
patchH | Patch height. WARNING: (patchW * patchH) should be less than 66051, to avoid overflow. |
intgrlImgOut | Integral image. Zero borders for 1st column. NOTE: Memory must be > (patchW+1)(patchH+1) |
intgrlStride | Stride in bytes of the Integral Image WARNING: should be multiple of 8. |
intgrlSqrdImgOut | Integral image of squared values. NOTE: Memory must be > (patchW+1)(patchH+1) |
intgrlSqrdStride | Stride in bytes of the Squared Integral Image WARNING: should be multiple of 8. |
FASTCV_API fcvStatus fcvNormalizeLocalBoxf32 | ( | const float32_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t | patchWidth, | ||
uint32_t | patchHeight, | ||
uint32_t | useStdDev, | ||
float32_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Calculate the local subtractive and contrastive normalization of the image. For each pixel of the image, the mean and optionally standard deviation is calculated for the patch centered around the pixel. Then the pixel is normalized by the local mean and optionally standard deviation.
src | The input image. Must be 32-bit float image. Size of buffer is srcStride*srcHeight*sizeof(float32_t) bytes. NOTE:should be 128-bit aligned. |
srcWidth | Image width, the number of pixels in a row |
srcHeight | Image height. |
srcStride | Stride of src image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. NOTE: should be a multiple of 8. If left at 0 srcStride is default to srcWidth*sizeof(float32_t). |
patchWidth | Width in pixels of the patch to calculate local mean and standard deviation. |
patchHeight | Height in pixels of the patch to calculate local mean and standard deviation. |
useStdDev | (0 or 1) if 1, the dst will be normalized with standard deviation. |
dst | The output image. Size of buffer is dstStride*srcHeight*sizeof(float32_t) bytes. NOTE:should be 128-bit aligned. |
dstStride | The stride of the output image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: should be a multiple of 8. If left at 0 dstStride is default to srcWidth*sizeof(float32_t). |
FASTCV_API fcvStatus fcvNormalizeLocalBoxu8 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t | patchWidth, | ||
uint32_t | patchHeight, | ||
uint32_t | useStdDev, | ||
int8_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Calculate the local subtractive and contrastive normalization of the image. For each pixel of the image, the mean and optionally standard deviation is calculated for the patch centered around the pixel. Then the pixel is normalized by the local mean and optionally standard deviation.
src | The input image. Must be 8 bit grayscale image. Size of buffer is srcStride*srcHeight bytes. NOTE:should be 128-bit aligned. |
srcWidth | Image width, the number of pixels in a row |
srcHeight | Image height. |
srcStride | Stride of src image is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory. NOTE: should be a multiple of 8. If left at 0 srcStride is default to srcWidth. |
patchWidth | Width in pixels of the patch to calculate local mean and standard deviation. |
patchHeight | Height in pixels of the patch to calculate local mean and standard deviation. |
useStdDev | (0 or 1) if 1, the dst will be normalized with standard deviation. |
dst | The output image. Size of buffer is dstStride*srcHeight bytes. NOTE:should be 128-bit aligned. |
dstStride | The stride of the output image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). NOTE: should be a multiple of 8. If left at 0 dstStride is default to srcWidth. |
FASTCV_API int fcvPyramidCreatef32 | ( | const float *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | numLevels, | ||
fcvPyramidLevel * | pyramid | ||
) |
Builds an image pyramid of float32 arising from a single original image - that are successively downscaled w.r.t. the pre-set levels.
NOTE: Memory should be deallocated using fcvPyramidDelete.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvPyramidCreatef32_v2(). In the 2.0.0 release, fcvPyramidCreatef32_v2 will be renamed to fcvPyramidCreatef32 and the signature of fcvPyramidCreatef32 as it appears now, will be removed.
src | Base image. Size of buffer is srcWidth*srcHeight*4 bytes. NOTE: data should be 128-bit aligned. |
srcWidth | Width of base image WARNING: must be a multiple of 2^numLevels |
srcHeight | Height of base image WARNING: must be a multiple of 2^numLevels |
numLevels | Number of levels of the pyramid |
pyramid | Output pyramid of numLevels+1 images of the same type as src . pyramid[0] will be the same as src . pyramid[1] is the next pyramid layer, a smoothed and down-sized src , and so on. |
FASTCV_API int fcvPyramidCreatef32_v2 | ( | const float32_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t | numLevels, | ||
fcvPyramidLevel_v2 * | pyramid | ||
) |
Builds an image pyramid (with stride).
NOTE: Memory should be deallocated using fcvPyramidDelete_v2.
ATTENTION: This function is a duplication of fcvPyramidCreatef32() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvPyramidCreatef32, fcvPyramidCreatef32_v2 will be removed, and the current signature for fcvPyramidCreatef32 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvPyramidCreatef32 when transitioning to 2.0.0.
src | base image |
srcWidth | width of base image NOTE: Needs to be a multiple of 2^numLevels |
srcHeight | height of base image NOTE: Needs to be a multiple of 2^numLevel |
srcStride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory (base image). NOTE: Needs to be a multiple of 2^numLevels NOTE: If left at 0, pyramid (non-base) image stride is the same as its srcWidth*sizeof(float32_t) |
numLevels | Number of levels of the pyramid |
fcvPyramidLevel_v2 | output pyramid (with stride) of numLevels+1 images of the same type as src . pyramid[0] will be the same as src . pyramid[1] is the next pyramid layer, a smoothed and down-sized src , and so on. |
FASTCV_API int fcvPyramidCreateu8 | ( | const uint8_t *__restrict | src, |
unsigned int | srcWidth, | ||
unsigned int | srcHeight, | ||
unsigned int | numLevels, | ||
fcvPyramidLevel * | pyramid | ||
) |
Builds an image pyramid of uint8_t arising from a single original image - that are successively downscaled w.r.t. the pre-set levels.
NOTE: Memory should be deallocated using fcvPyramidDelete.
ATTENTION: This function's signature will become OBSOLETE in a future release of this library (2.0.0). The new interface is specified in the function: fcvPyramidCreateu8_v2(). In the 2.0.0 release, fcvPyramidCreateu8_v2 will be renamed to fcvPyramidCreateu8 and the signature of fcvPyramidCreateu8 as it appears now, will be removed.
src | Base image. Size of buffer is srcWidth*srcHeight bytes. |
srcWidth | Width of base image WARNING: must be a multiple of 2^(numLevels-1) |
srcHeight | height of base image NOTE: must be a multiple of 2^(numLevels-1) |
numLevels | Number of levels of the pyramid |
pyramid | Output pyramid of numLevels+1 images of the same type as src . pyramid[0] will be the same as src . pyramid[1] is the next pyramid layer, a smoothed and down-sized src , and so on. |
FASTCV_API int fcvPyramidCreateu8_v2 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t | numLevels, | ||
fcvPyramidLevel_v2 * | pyramid | ||
) |
Builds an image pyramid (with stride).
NOTE: Memory should be deallocated using fcvPyramidDelete.
ATTENTION: This function is a duplication of fcvPyramidCreateu8() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvPyramidCreateu8, fcvPyramidCreateu8_v2 will be removed, and the current signature for fcvPyramidCreateu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvPyramidCreateu8 when transitioning to 2.0.0.
src | base image |
srcWidth | width of base image NOTE: Needs to be a multiple of 2^numLevels |
srcHeight | height of base image NOTE: Needs to be a multiple of 2^numLevel |
srcStride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory (base image). NOTE: Needs to be a multiple of 2^numLevels NOTE: Pyramid (non-base) image stride is the same as its width |
numLevels | Number of levels of the pyramid |
fcvPyramidLevel_v2 | output pyramid (with stride) of numLevels+1 images of the same type as src . pyramid[0] will be the same as src . pyramid[1] is the next pyramid layer, a smoothed and down-sized src , and so on. |
FASTCV_API fcvStatus fcvPyramidCreateu8_v3 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint32_t | numLevels, | ||
fcvPyramidScale | scale, | ||
fcvPyramidLevel_v2 *__restrict | pyramidGaussian | ||
) |
Builds a Gaussian image pyramid. DO NOT USE THIS API unless for testing purposes. This API can be removed without notice.
This function builds a Gaussian image Pyramid given an input image. Each level of the pyramid is computed by first applying a gaussian filter on the previous level, and then scaling the image based on the type of scale factor selected. The memory for the pyramid must be allocated using fcvPyramidAllocate_v3(), and should be deallocated using fcvPyramidDelete_v2()
ATTENTION: This function is a duplication of fcvPyramidCreateu8_v2() with the addition of extra parameters. This function has been added to allow for backward compatibility with the original function. When the 2.0.0 release of this library is made, this function will be renamed to: fcvPyramidCreateu8, fcvPyramidCreateu8_v3 will be removed, and the current signature for fcvPyramidCreateu8 will be removed. Until 2.0.0, the developer should use this implementation with the expectation of renaming it to fcvPyramidCreateu8 when transitioning to 2.0.0.
src | base image |
srcWidth | Width of base image |
srcHeight | Height of base image |
srcStride | Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory (base image). NOTE: The stride of pyramid levels other than the base are set to be the same as their width |
numLevels | Number of levels of the pyramid |
scale | Defines the type of scaling used for each pyramid level. FASTCV_PYRAMID_SCALE_HALF downscales each level of the pyramid by a factor of 2. FASTCV_PYRAMID_SCALE_ORB downscales each level of the pyramid by a factor of 1/(2)^(1/4), which is approximated as 0.8408964f |
pyramidGaussian | output pyramid of "numLevels" images of the same type as src . pyramidGaussian[0] will be the same as src . pyramidGaussian[1] is the next pyramid layer, a smoothed and scaled src, and so on. |
FASTCV_API int fcvPyramidSobelGradientCreatef32 | ( | const fcvPyramidLevel * | imgPyr, |
fcvPyramidLevel * | dxPyr, | ||
fcvPyramidLevel * | dyPyr, | ||
unsigned int | numLevels | ||
) |
Creates a gradient pyramid of float32 from an image pyramid of uint8_t.
imgPyr | input Image Pyramid |
dxPyr | Horizontal Sobel gradient pyramid |
dyPyr | Verical Sobel gradient pyramid |
numLevels | Number of levels in the pyramids |
FASTCV_API int fcvPyramidSobelGradientCreatei16 | ( | const fcvPyramidLevel * | imgPyr, |
fcvPyramidLevel * | dxPyr, | ||
fcvPyramidLevel * | dyPyr, | ||
unsigned int | numLevels | ||
) |
Creates a gradient pyramid of int16_t from an image pyramid of uint8_t.
imgPyr | Input Image Pyramid |
dxPyr | Horizontal Sobel gradient pyramid |
dyPyr | Verical Sobel gradient pyramid |
numLevels | Number of levels in the pyramids |
FASTCV_API int fcvPyramidSobelGradientCreatei8 | ( | const fcvPyramidLevel * | imgPyr, |
fcvPyramidLevel * | dxPyr, | ||
fcvPyramidLevel * | dyPyr, | ||
unsigned int | numLevels | ||
) |
Creates a gradient pyramid of integer8 from an image pyramid of uint8_t.
imgPyr | input Image Pyramid |
dxPyr | Horizontal Sobel gradient pyramid |
dyPyr | Verical Sobel gradient pyramid |
numLevels | Number of levels in the pyramids |
FASTCV_API void fcvSegmentFGMasku8 | ( | uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
uint8_t | Polygonal, | ||
uint32_t | perimScale | ||
) |
This function will remove small patches in the source image based on the input threshold.
The function will remove the small contoured area of the source image. The input is a 8 bit grayscale image, where zero value denotes the background.
src | The input image/patch. Must be 8 bit grayscale and zero value indicates the background. |
srcWidth | The width of the input source image. |
srcHeight | The height of the input source image. |
srcStride | The stride of the input source image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). |
Polygonal | If it is 0 then we use convex hull to do approximation on the original contour, otherwise we do polygonal approximation. Currently it simple use the original contour, the parameter will be valid after the convex hull or polygonal approximation function is ready. |
perimScale | The minimum perimscale of the contours; If a contour's perimeter is smaller than this value, It will be removed from the original source image. |
FASTCV_API void fcvTiltedIntegralu8s32 | ( | const uint8_t *__restrict | src, |
uint32_t | srcWidth, | ||
uint32_t | srcHeight, | ||
uint32_t | srcStride, | ||
int32_t *__restrict | dst, | ||
uint32_t | dstStride | ||
) |
Integral of the image tilted by 45 degrees.
Calculates the tilted integral image of an input image and adds an zero-filled border on top. Left border not zero. dst[i,j]=sum (src[m,n]), where n<j, abs(m-i+1) <= j-n-1
src | Source image, single channel, unsigned char type WARNING: should be 128-bit aligned. |
srcWidth | Image width. |
srcHeight | Image height. |
srcStride | Stride of source image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). If set to 0, srcStride is srcWidth in bytes as default |
dst | Destination image of size (srcWidth+1)*(srcHeight+1) WARNING: should be 128-bit aligned. |
dstStride | Stride of destination image (i.e., how many bytes between column 0 of row 1 and column 0 of row 2). |