OpenCV 4.12.0-dev
Open Source Computer Vision
Loading...
Searching...
No Matches
Module-wrapper for FastCV hardware accelerated functions

Detailed Description

Classes

class  cv::fastcv::FCVMSER
 MSER blob detector for grayscale images. More...
 

Functions

void cv::fastcv::bilateralFilter (InputArray _src, OutputArray _dst, int d, float sigmaColor, float sigmaSpace, int borderType=BORDER_DEFAULT)
 Applies Bilateral filter to an image considering d-pixel diameter of each pixel's neighborhood. This filter does not work inplace.
 
void cv::fastcv::bilateralRecursive (cv::InputArray src, cv::OutputArray dst, float sigmaColor=0.03f, float sigmaSpace=0.1f)
 Recursive Bilateral Filtering.
 
void cv::fastcv::buildPyramid (InputArray src, OutputArrayOfArrays pyr, int nLevels, bool scaleBy2=true, int borderType=cv::BORDER_REFLECT, uint8_t borderValue=0)
 Builds an image pyramid of float32 arising from a single original image - that are successively downscaled w.r.t. the pre-set levels. This API supports both ORB scaling and scale down by half.
 
void cv::fastcv::calcHist (InputArray _src, OutputArray _hist)
 Calculates histogram of input image. This function implements specific use case of 256-bin histogram calculation for 8u single channel images in an optimized way.
 
void cv::fastcv::clusterEuclidean (InputArray points, InputArray clusterCenters, OutputArray newClusterCenters, OutputArray clusterSizes, OutputArray clusterBindings, OutputArray clusterSumDists, int numPointsUsed=-1)
 Clusterizes N input points in D-dimensional space into K clusters Accepts 8-bit unsigned integer points Provides faster execution time than cv::kmeans on Qualcomm's processors.
 
void cv::fastcv::DCT (InputArray src, OutputArray dst)
 This function performs 8x8 forward discrete Cosine transform on input image accepts input of type 8-bit unsigned integer and produces output of type 16-bit signed integer provides faster execution time than cv::dct on Qualcomm's processor.
 
void cv::fastcv::FAST10 (InputArray src, InputArray mask, OutputArray coords, OutputArray scores, int barrier, int border, bool nmsEnabled)
 Extracts FAST10 corners and scores from the image based on the mask. The mask specifies pixels to be ignored by the detector designed for corner detection on Qualcomm's processors, provides enhanced speed.
 
void cv::fastcv::FFT (InputArray src, OutputArray dst)
 Computes the 1D or 2D Fast Fourier Transform of a real valued matrix. For the 2D case, the width and height of the input and output matrix must be powers of 2. For the 1D case, the height of the matrices must be 1, while the width must be a power of 2. Accepts 8-bit unsigned integer array, whereas cv::dft accepts floating-point or complex array.
 
void cv::fastcv::fillConvexPoly (InputOutputArray img, InputArray pts, Scalar color)
 Draw convex polygon This function fills the interior of a convex polygon with the specified color. Requires the width and stride to be multple of 8.
 
void cv::fastcv::filter2D (InputArray _src, OutputArray _dst, int ddepth, InputArray _kernel)
 NxN correlation with non-separable kernel. Borders up to half-kernel width are ignored.
 
void cv::fastcv::gaussianBlur (InputArray _src, OutputArray _dst, int kernel_size=3, bool blur_border=true)
 Gaussian blur with sigma = 0 and square kernel size. The way of handling borders is different with cv::GaussianBlur, leading to slight variations in the output.
 
void cv::fastcv::houghLines (InputArray src, OutputArray lines, double threshold=0.25)
 Performs Hough Line detection.
 
void cv::fastcv::IDCT (InputArray src, OutputArray dst)
 This function performs 8x8 inverse discrete Cosine transform on input image provides faster execution time than cv::dct in inverse case on Qualcomm's processor.
 
void cv::fastcv::IFFT (InputArray src, OutputArray dst)
 Computes the 1D or 2D Inverse Fast Fourier Transform of a complex valued matrix. For the 2D case, The width and height of the input and output matrix must be powers of 2. For the 1D case, the height of the matrices must be 1, while the width must be a power of 2.
 
void cv::fastcv::matmuls8s32 (InputArray src1, InputArray src2, OutputArray dst)
 Matrix multiplication of two int8_t type matrices uses signed integer input/output whereas cv::gemm uses floating point input/output matmuls8s32 provides enhanced speed on Qualcomm's processors.
 
int cv::fastcv::meanShift (InputArray src, Rect &rect, TermCriteria termCrit)
 Applies the meanshift procedure and obtains the final converged position. This function applies the meanshift procedure to an original image (usually a probability image) and obtains the final converged position. The converged position search will stop either it has reached the required accuracy or the maximum number of iterations. Moments used in the algorithm are calculated in floating point. This function isn't bit-exact with cv::meanShift but provides improved latency on Snapdragon processors.
 
cv::Moments cv::fastcv::moments (InputArray _src, bool binary)
 Calculates all of the moments up to the third order of the image pixels' intensities The results are returned in the structure cv::Moments. This function cv::fastcv::moments() calculate the moments using floating point calculations whereas cv::moments() calculate moments using double.
 
void cv::fastcv::remap (InputArray src, OutputArray dst, InputArray map1, InputArray map2, int interpolation, int borderValue=0)
 Applies a generic geometrical transformation to a greyscale CV_8UC1 image.
 
void cv::fastcv::remapRGBA (InputArray src, OutputArray dst, InputArray map1, InputArray map2, int interpolation)
 Applies a generic geometrical transformation to a 4-channel CV_8UC4 image with bilinear or nearest neighbor interpolation.
 
void cv::fastcv::resizeDownBy2 (cv::InputArray _src, cv::OutputArray _dst)
 Down-scale the image by averaging each 2x2 pixel block. This function is not bit-exact with cv::resize but provides faster execution time on Qualcomm's processor.
 
void cv::fastcv::resizeDownBy4 (cv::InputArray _src, cv::OutputArray _dst)
 Down-scale the image by averaging each 4x4 pixel block. This function is not bit-exact with cv::resize but provides faster execution time on Qualcomm's processor.
 
void cv::fastcv::sepFilter2D (InputArray _src, OutputArray _dst, int ddepth, InputArray _kernelX, InputArray _kernelY)
 NxN correlation with separable kernel. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place. Borders up to half-kernel width are ignored. The way of handling overflow is different with OpenCV, this function will do right shift for the intermediate results and final result.
 
void cv::fastcv::sobel (InputArray _src, OutputArray _dx, OutputArray _dy, int kernel_size, int borderType, int borderValue)
 Creates a 2D gradient image from source luminance data without normalization. Calculate X direction 1 order derivative or Y direction 1 order derivative or both at the same time, .
 
void cv::fastcv::sobel3x3u8 (InputArray _src, OutputArray _dst, OutputArray _dsty=noArray(), int ddepth=CV_8U, bool normalization=false)
 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, borders up to half-kernel width are ignored.
 
void cv::fastcv::sobelPyramid (InputArrayOfArrays pyr, OutputArrayOfArrays dx, OutputArrayOfArrays dy, int outType=CV_8S)
 Creates a gradient pyramid from an image pyramid.
 
void cv::fastcv::thresholdRange (InputArray src, OutputArray dst, int lowThresh, int highThresh, int trueValue, int falseValue)
 Binarizes a grayscale image based on a pair of threshold values. The binarized image will be in the two values selected by user this function provides improved latency on Snapdragon processor.
 
void cv::fastcv::trackOpticalFlowLK (InputArray src, InputArray dst, InputArrayOfArrays srcPyr, InputArrayOfArrays dstPyr, InputArray ptsIn, OutputArray ptsOut, InputArray ptsEst, OutputArray statusVec, cv::Size winSize={7, 7}, cv::TermCriteria termCriteria={cv::TermCriteria::MAX_ITER|cv::TermCriteria::EPS, 7, 0.03f *0.03f})
 Calculates sparse optical flow using Lucas-Kanade algorithm accepts 8-bit unsigned integer image Provides faster execution time on Qualcomm's processor.
 
void cv::fastcv::trackOpticalFlowLK (InputArray src, InputArray dst, InputArrayOfArrays srcPyr, InputArrayOfArrays dstPyr, InputArrayOfArrays srcDxPyr, InputArrayOfArrays srcDyPyr, InputArray ptsIn, OutputArray ptsOut, OutputArray statusVec, cv::Size winSize={7, 7}, int maxIterations=7)
 Overload for v1 of the LK tracking function.
 
void cv::fastcv::warpPerspective2Plane (InputArray _src1, InputArray _src2, OutputArray _dst1, OutputArray _dst2, InputArray _M0, Size dsize)
 Perspective warp two images using the same transformation. Bi-linear interpolation is used where applicable. For example, to warp a grayscale image and an alpha image at the same time, or warp two color channels.
 

Function Documentation

◆ bilateralFilter()

void cv::fastcv::bilateralFilter ( InputArray _src,
OutputArray _dst,
int d,
float sigmaColor,
float sigmaSpace,
int borderType = BORDER_DEFAULT )

#include <opencv2/fastcv/bilateralFilter.hpp>

Applies Bilateral filter to an image considering d-pixel diameter of each pixel's neighborhood. This filter does not work inplace.

Parameters
_srcIntput image with type CV_8UC1
_dstDestination image with same type as _src
dkernel size (can be 5, 7 or 9)
sigmaColorFilter 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.
sigmaSpaceFilter 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.
borderTypeborder mode used to extrapolate pixels outside of the image

◆ bilateralRecursive()

void cv::fastcv::bilateralRecursive ( cv::InputArray src,
cv::OutputArray dst,
float sigmaColor = 0.03f,
float sigmaSpace = 0.1f )

#include <opencv2/fastcv/smooth.hpp>

Recursive Bilateral Filtering.

Different from traditional bilateral filtering, here the smoothing is actually performed in gradient domain. The algorithm claims that it's more efficient than the original bilateral filtering in both image quality and computation. See algorithm description in the paper Recursive Bilateral Filtering, ECCV2012 by Prof Yang Qingxiong This function isn't bit-exact with cv::bilateralFilter but provides improved latency on Snapdragon processors.

Parameters
srcInput image, should have one CV_8U channel
dstOutput array having one CV_8U channel
sigmaColorSigma in the color space, the bigger the value the more color difference is smoothed by the algorithm
sigmaSpaceSigma in the coordinate space, the bigger the value the more distant pixels are smoothed

◆ buildPyramid()

void cv::fastcv::buildPyramid ( InputArray src,
OutputArrayOfArrays pyr,
int nLevels,
bool scaleBy2 = true,
int borderType = cv::BORDER_REFLECT,
uint8_t borderValue = 0 )

#include <opencv2/fastcv/pyramid.hpp>

Builds an image pyramid of float32 arising from a single original image - that are successively downscaled w.r.t. the pre-set levels. This API supports both ORB scaling and scale down by half.

Parameters
srcInput single-channel image of type 8U or 32F
pyrOutput array containing nLevels downscaled image copies
nLevelsNumber of pyramid levels to produce
scaleBy2to scale images 2x down or by a factor of 1/(2)^(1/4) which is approximated as 0.8408964 (ORB downscaling), ORB scaling is not supported for float point images
borderTypehow to process border, the options are BORDER_REFLECT (maps to FASTCV_BORDER_REFLECT), BORDER_REFLECT_101 (maps to FASTCV_BORDER_REFLECT_V2) and BORDER_REPLICATE (maps to FASTCV_BORDER_REPLICATE). Other border types are mapped to FASTCV_BORDER_UNDEFINED(border pixels are ignored). Currently, borders only supported for downscaling by half, ignored for ORB scaling. Also ignored for float point images
borderValuewhat value should be used to fill border, ignored for float point images

◆ calcHist()

void cv::fastcv::calcHist ( InputArray _src,
OutputArray _hist )

#include <opencv2/fastcv/histogram.hpp>

Calculates histogram of input image. This function implements specific use case of 256-bin histogram calculation for 8u single channel images in an optimized way.

Parameters
_srcIntput image with type CV_8UC1
_histOutput histogram of type int of 256 bins

◆ clusterEuclidean()

void cv::fastcv::clusterEuclidean ( InputArray points,
InputArray clusterCenters,
OutputArray newClusterCenters,
OutputArray clusterSizes,
OutputArray clusterBindings,
OutputArray clusterSumDists,
int numPointsUsed = -1 )

#include <opencv2/fastcv/cluster.hpp>

Clusterizes N input points in D-dimensional space into K clusters Accepts 8-bit unsigned integer points Provides faster execution time than cv::kmeans on Qualcomm's processors.

Parameters
pointsPoints array of type 8u, each row represets a point. Size is N rows by D columns, can be non-continuous.
clusterCentersInitial cluster centers array of type 32f, each row represents a center. Size is K rows by D columns, can be non-continuous.
newClusterCentersResulting cluster centers array of type 32f, each row represents found center. Size is set to be K rows by D columns.
clusterSizesResulting cluster member counts array of type uint32, size is set to be 1 row by K columns.
clusterBindingsResulting points indices array of type uint32, each index tells to which cluster the corresponding point belongs to. Size is set to be 1 row by numPointsUsed columns.
clusterSumDistsResulting distance sums array of type 32f, each number is a sum of distances between each cluster center to its belonging points. Size is set to be 1 row by K columns
numPointsUsedNumber of points to clusterize starting from 0 to numPointsUsed-1 inclusively. Sets to N if negative.

◆ DCT()

void cv::fastcv::DCT ( InputArray src,
OutputArray dst )

#include <opencv2/fastcv/ipptransform.hpp>

This function performs 8x8 forward discrete Cosine transform on input image accepts input of type 8-bit unsigned integer and produces output of type 16-bit signed integer provides faster execution time than cv::dct on Qualcomm's processor.

Parameters
srcInput image of type CV_8UC1
dstOutput image of type CV_16SC1

◆ FAST10()

void cv::fastcv::FAST10 ( InputArray src,
InputArray mask,
OutputArray coords,
OutputArray scores,
int barrier,
int border,
bool nmsEnabled )

#include <opencv2/fastcv/fast10.hpp>

Extracts FAST10 corners and scores from the image based on the mask. The mask specifies pixels to be ignored by the detector designed for corner detection on Qualcomm's processors, provides enhanced speed.

Parameters
src8-bit grayscale image
maskOptional mask indicating which pixels should be omited from corner dection. Its size should be k times image width and height, where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8 For more details see documentation to fcvCornerFast9InMaskScoreu8 function in FastCV
coordsOutput array of CV_32S containing interleave x, y positions of detected corners
scoresOptional output array containing the scores of the detected corners. The score is the highest threshold that can still validate the detected corner. A higher score value indicates a stronger corner feature. For example, a corner of score 108 is stronger than a corner of score 50
barrierFAST threshold. The threshold is used to compare difference between intensity value of the central pixel and pixels on a circle surrounding this pixel
borderNumber for pixels to ignore from top,bottom,right,left of the image. Defaults to 4 if it's below 4
nmsEnabledEnable non-maximum suppresion to prune weak key points

◆ FFT()

void cv::fastcv::FFT ( InputArray src,
OutputArray dst )

#include <opencv2/fastcv/fft.hpp>

Computes the 1D or 2D Fast Fourier Transform of a real valued matrix. For the 2D case, the width and height of the input and output matrix must be powers of 2. For the 1D case, the height of the matrices must be 1, while the width must be a power of 2. Accepts 8-bit unsigned integer array, whereas cv::dft accepts floating-point or complex array.

Parameters
srcInput array of CV_8UC1. The dimensions of the matrix must be powers of 2 for the 2D case, and in the 1D case, the height must be 1, while the width must be a power of 2.
dstThe computed FFT matrix of type CV_32FC2. The FFT Re and Im coefficients are stored in different channels. Hence the dimensions of the dst are (srcWidth, srcHeight)

◆ fillConvexPoly()

void cv::fastcv::fillConvexPoly ( InputOutputArray img,
InputArray pts,
Scalar color )

#include <opencv2/fastcv/draw.hpp>

Draw convex polygon This function fills the interior of a convex polygon with the specified color. Requires the width and stride to be multple of 8.

Parameters
imgImage to draw on. Should have up to 4 8-bit channels
ptsArray of polygon points coordinates. Should contain N two-channel or 2*N one-channel 32-bit integer elements
colorColor of drawn polygon stored as B,G,R and A(if supported)

◆ filter2D()

void cv::fastcv::filter2D ( InputArray _src,
OutputArray _dst,
int ddepth,
InputArray _kernel )

#include <opencv2/fastcv/blur.hpp>

NxN correlation with non-separable kernel. Borders up to half-kernel width are ignored.

Parameters
_srcIntput image with type CV_8UC1
_dstOutput image with type CV_8UC1, CV_16SC1 or CV_32FC1
ddepthThe depth of output image
_kernelFiler kernel data
See also
Filter2D

◆ gaussianBlur()

void cv::fastcv::gaussianBlur ( InputArray _src,
OutputArray _dst,
int kernel_size = 3,
bool blur_border = true )

#include <opencv2/fastcv/blur.hpp>

Gaussian blur with sigma = 0 and square kernel size. The way of handling borders is different with cv::GaussianBlur, leading to slight variations in the output.

Parameters
_srcIntput image with type CV_8UC1
_dstOutput image with type CV_8UC1
kernel_sizeFiler kernel size. One of 3, 5, 11
blur_borderIf set to true, border is blurred by 0-padding adjacent values.(A variant of the constant border) If set to false, borders up to half-kernel width are ignored (e.g. 1 pixel in the 3x3 case).
See also
GaussianBlur

◆ houghLines()

void cv::fastcv::houghLines ( InputArray src,
OutputArray lines,
double threshold = 0.25 )

#include <opencv2/fastcv/hough.hpp>

Performs Hough Line detection.

Parameters
srcInput 8-bit image containing binary contour. Width and step should be divisible by 8
linesOutput array containing detected lines in a form of (x1, y1, x2, y2) where all numbers are 32-bit floats
thresholdControls the minimal length of a detected line. Value must be between 0.0 and 1.0 Values close to 1.0 reduces the number of detected lines. Values close to 0.0 detect more lines, but may be noisy. Recommended value is 0.25.

◆ IDCT()

void cv::fastcv::IDCT ( InputArray src,
OutputArray dst )

#include <opencv2/fastcv/ipptransform.hpp>

This function performs 8x8 inverse discrete Cosine transform on input image provides faster execution time than cv::dct in inverse case on Qualcomm's processor.

Parameters
srcInput image of type CV_16SC1
dstOutput image of type CV_8UC1

◆ IFFT()

void cv::fastcv::IFFT ( InputArray src,
OutputArray dst )

#include <opencv2/fastcv/fft.hpp>

Computes the 1D or 2D Inverse Fast Fourier Transform of a complex valued matrix. For the 2D case, The width and height of the input and output matrix must be powers of 2. For the 1D case, the height of the matrices must be 1, while the width must be a power of 2.

Parameters
srcInput array of type CV_32FC2 containing FFT Re and Im coefficients stored in separate channels. The dimensions of the matrix must be powers of 2 for the 2D case, and in the 1D case, the height must be 1, while the width must be a power of 2.
dstThe computed IFFT matrix of type CV_8U. The matrix is real valued and has no imaginary components. Hence the dimensions of the dst are (srcWidth , srcHeight)

◆ matmuls8s32()

void cv::fastcv::matmuls8s32 ( InputArray src1,
InputArray src2,
OutputArray dst )

#include <opencv2/fastcv/arithm.hpp>

Matrix multiplication of two int8_t type matrices uses signed integer input/output whereas cv::gemm uses floating point input/output matmuls8s32 provides enhanced speed on Qualcomm's processors.

Parameters
src1First source matrix of type CV_8S
src2Second source matrix of type CV_8S
dstResulting matrix of type CV_32S

◆ meanShift()

int cv::fastcv::meanShift ( InputArray src,
Rect & rect,
TermCriteria termCrit )

#include <opencv2/fastcv/shift.hpp>

Applies the meanshift procedure and obtains the final converged position. This function applies the meanshift procedure to an original image (usually a probability image) and obtains the final converged position. The converged position search will stop either it has reached the required accuracy or the maximum number of iterations. Moments used in the algorithm are calculated in floating point. This function isn't bit-exact with cv::meanShift but provides improved latency on Snapdragon processors.

Parameters
src8-bit, 32-bit int or 32-bit float grayscale image which is usually a probability image computed based on object histogram
rectInitial search window position which also returns the final converged window position
termCritThe criteria used to finish the MeanShift which consists of two termination criteria: 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
Returns
Iteration number at which the loop stopped

◆ moments()

cv::Moments cv::fastcv::moments ( InputArray _src,
bool binary )

#include <opencv2/fastcv/moments.hpp>

Calculates all of the moments up to the third order of the image pixels' intensities The results are returned in the structure cv::Moments. This function cv::fastcv::moments() calculate the moments using floating point calculations whereas cv::moments() calculate moments using double.

Parameters
_srcInput image with type CV_8UC1, CV_32SC1, CV_32FC1
binaryIf true, assumes the image to be binary (0x00 for black, 0xff for white), otherwise assumes the image to be grayscale.

◆ remap()

void cv::fastcv::remap ( InputArray src,
OutputArray dst,
InputArray map1,
InputArray map2,
int interpolation,
int borderValue = 0 )

#include <opencv2/fastcv/remap.hpp>

Applies a generic geometrical transformation to a greyscale CV_8UC1 image.

Parameters
srcThe first input image data, type CV_8UC1
dstThe output image data, type CV_8UC1
map1Floating-point CV_32FC1 matrix with each element as the column coordinate of the mapped location in the source image
map2Floating-point CV_32FC1 matrix with each element as the row coordinate of the mapped location in the source image.
interpolationOnly INTER_NEAREST and INTER_LINEAR interpolation is supported
borderValueconstant pixel value

◆ remapRGBA()

void cv::fastcv::remapRGBA ( InputArray src,
OutputArray dst,
InputArray map1,
InputArray map2,
int interpolation )

#include <opencv2/fastcv/remap.hpp>

Applies a generic geometrical transformation to a 4-channel CV_8UC4 image with bilinear or nearest neighbor interpolation.

Parameters
srcThe first input image data, type CV_8UC4
dstThe output image data, type CV_8UC4
map1Floating-point CV_32FC1 matrix with each element as the column coordinate of the mapped location in the source image
map2Floating-point CV_32FC1 matrix with each element as the row coordinate of the mapped location in the source image.
interpolationOnly INTER_NEAREST and INTER_LINEAR interpolation is supported

◆ resizeDownBy2()

void cv::fastcv::resizeDownBy2 ( cv::InputArray _src,
cv::OutputArray _dst )

#include <opencv2/fastcv/scale.hpp>

Down-scale the image by averaging each 2x2 pixel block. This function is not bit-exact with cv::resize but provides faster execution time on Qualcomm's processor.

Parameters
_srcThe first input image data, type CV_8UC1, src height must be a multiple of 2
_dstThe output image data, type CV_8UC1

◆ resizeDownBy4()

void cv::fastcv::resizeDownBy4 ( cv::InputArray _src,
cv::OutputArray _dst )

#include <opencv2/fastcv/scale.hpp>

Down-scale the image by averaging each 4x4 pixel block. This function is not bit-exact with cv::resize but provides faster execution time on Qualcomm's processor.

Parameters
_srcThe first input image data, type CV_8UC1, src height must be a multiple of 4
_dstThe output image data, type CV_8UC1

◆ sepFilter2D()

void cv::fastcv::sepFilter2D ( InputArray _src,
OutputArray _dst,
int ddepth,
InputArray _kernelX,
InputArray _kernelY )

#include <opencv2/fastcv/blur.hpp>

NxN correlation with separable kernel. If srcImg and dstImg point to the same address and srcStride equals to dstStride, it will do in-place. Borders up to half-kernel width are ignored. The way of handling overflow is different with OpenCV, this function will do right shift for the intermediate results and final result.

Parameters
_srcIntput image with type CV_8UC1
_dstOutput image with type CV_8UC1, CV_16SC1
ddepthThe depth of output image
_kernelXFiler kernel data in x direction
_kernelYFiler kernel data in Y direction (For CV_16SC1, the kernelX and kernelY should be same)
See also
sepFilter2D

◆ sobel()

void cv::fastcv::sobel ( InputArray _src,
OutputArray _dx,
OutputArray _dy,
int kernel_size,
int borderType,
int borderValue )

#include <opencv2/fastcv/edges.hpp>

Creates a 2D gradient image from source luminance data without normalization. Calculate X direction 1 order derivative or Y direction 1 order derivative or both at the same time, .

Parameters
_srcInput image with type CV_8UC1
_dxBuffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size. If NULL, the horizontal gradient will not be calculated.
_dyBuffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size. If NULL, the vertical gradient will not be calculated
kernel_sizeSobel kernel size, support 3x3, 5x5, 7x7
borderTypeBorder type, support BORDER_CONSTANT, BORDER_REPLICATE
borderValueBorder value for constant border

◆ sobel3x3u8()

void cv::fastcv::sobel3x3u8 ( InputArray _src,
OutputArray _dst,
OutputArray _dsty = noArray(),
int ddepth = CV_8U,
bool normalization = false )

#include <opencv2/fastcv/edges.hpp>

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, borders up to half-kernel width are ignored.

Parameters
_srcInput image with type CV_8UC1
_dstIf _dsty is given, buffer to store horizontal gradient, otherwise, output 8-bit image of |dx|+|dy|. Size of buffer is (srcwidth)*(srcheight) bytes
_dsty(Optional)Buffer to store vertical gradient. Must be (srcwidth)*(srcheight) in size.
ddepthThe depth of output image CV_8SC1,CV_16SC1,CV_32FC1,
normalizationIf do normalization for the result

◆ sobelPyramid()

void cv::fastcv::sobelPyramid ( InputArrayOfArrays pyr,
OutputArrayOfArrays dx,
OutputArrayOfArrays dy,
int outType = CV_8S )

#include <opencv2/fastcv/pyramid.hpp>

Creates a gradient pyramid from an image pyramid.

Parameters
pyrInput pyramid of 1-channel 8-bit images. Only continuous images are supported.
dxHorizontal Sobel gradient pyramid of the same size as pyr
dyVerical Sobel gradient pyramid of the same size as pyr
outTypeType of output data, can be CV_8S, CV_16S or CV_32F

◆ thresholdRange()

void cv::fastcv::thresholdRange ( InputArray src,
OutputArray dst,
int lowThresh,
int highThresh,
int trueValue,
int falseValue )

#include <opencv2/fastcv/thresh.hpp>

Binarizes a grayscale image based on a pair of threshold values. The binarized image will be in the two values selected by user this function provides improved latency on Snapdragon processor.

Parameters
src8-bit grayscale image
dstOutput image of the same size and type as input image, can be the same as input image
lowThreshThe lower threshold value for binarization
highThreshThe higher threshold value for binarization
trueValueThe value assigned to the destination pixel if the source is within the range inclusively defined by the pair of threshold values
falseValueThe value assigned to the destination pixel if the source is out of the range inclusively defined by the pair of threshold values

◆ trackOpticalFlowLK() [1/2]

void cv::fastcv::trackOpticalFlowLK ( InputArray src,
InputArray dst,
InputArrayOfArrays srcPyr,
InputArrayOfArrays dstPyr,
InputArray ptsIn,
OutputArray ptsOut,
InputArray ptsEst,
OutputArray statusVec,
cv::Size winSize = {7, 7},
cv::TermCriteria termCriteria = {cv::TermCriteria::MAX_ITER|cv::TermCriteria::EPS, 7, 0.03f *0.03f} )

#include <opencv2/fastcv/tracking.hpp>

Calculates sparse optical flow using Lucas-Kanade algorithm accepts 8-bit unsigned integer image Provides faster execution time on Qualcomm's processor.

Parameters
srcInput single-channel image of type 8U, initial motion frame
dstInput single-channel image of type 8U, final motion frame, should have the same size and stride as initial frame
srcPyrPyramid built from intial motion frame
dstPyrPyramid built from final motion frame
ptsInArray of initial subpixel coordinates of starting points, should contain 32F 2D elements
ptsOutOutput array of calculated final points, should contain 32F 2D elements
ptsEstInput array of estimations for final points, should contain 32F 2D elements, can be empty
statusVecOutput array of int32 values indicating status of each feature, can be empty
winSizeSize of window for optical flow searching. Width and height ust be odd numbers. Suggested values are 5, 7 or 9
termCriteriaTermination criteria containing max number of iterations, max epsilon and stop condition

◆ trackOpticalFlowLK() [2/2]

void cv::fastcv::trackOpticalFlowLK ( InputArray src,
InputArray dst,
InputArrayOfArrays srcPyr,
InputArrayOfArrays dstPyr,
InputArrayOfArrays srcDxPyr,
InputArrayOfArrays srcDyPyr,
InputArray ptsIn,
OutputArray ptsOut,
OutputArray statusVec,
cv::Size winSize = {7, 7},
int maxIterations = 7 )

#include <opencv2/fastcv/tracking.hpp>

Overload for v1 of the LK tracking function.

Parameters
srcInput single-channel image of type 8U, initial motion frame
dstInput single-channel image of type 8U, final motion frame, should have the same size and stride as initial frame
srcPyrPyramid built from intial motion frame
dstPyrPyramid built from final motion frame
srcDxPyrPyramid of Sobel derivative by X of srcPyr
srcDyPyrPyramid of Sobel derivative by Y of srcPyr
ptsInArray of initial subpixel coordinates of starting points, should contain 32F 2D elements
ptsOutOutput array of calculated final points, should contain 32F 2D elements
statusVecOutput array of int32 values indicating status of each feature, can be empty
winSizeSize of window for optical flow searching. Width and height ust be odd numbers. Suggested values are 5, 7 or 9
maxIterationsMaximum number of iterations to try

◆ warpPerspective2Plane()

void cv::fastcv::warpPerspective2Plane ( InputArray _src1,
InputArray _src2,
OutputArray _dst1,
OutputArray _dst2,
InputArray _M0,
Size dsize )

#include <opencv2/fastcv/warp.hpp>

Perspective warp two images using the same transformation. Bi-linear interpolation is used where applicable. For example, to warp a grayscale image and an alpha image at the same time, or warp two color channels.

Parameters
_src1First input 8-bit image. Size of buffer is src1Stride*srcHeight bytes.
_src2Second input 8-bit image. Size of buffer is src2Stride*srcHeight bytes.
_dst1First warped output image (correspond to src1). Size of buffer is dst1Stride*dstHeight bytes, type CV_8UC1
_dst2Second warped output image (correspond to src2). Size of buffer is dst2Stride*dstHeight bytes, type CV_8UC1
_M0The 3x3 perspective transformation matrix (inversed map)
dsizeThe output image size