![]() |
OpenCV
Open Source Computer Vision
|
Compatibility | OpenCV >= 4.11.0 |
This document scope is to guide the Developers to enable OpenCV Acceleration with FastCV for the Qualcomm chipsets with ARM64 architecture. Entablement of OpenCV with FastCV back-end on non-Qualcomm chipsets or Linux platforms other than Qualcomm Linux is currently out of scope.
FastCV provides two main features to computer vision application developers:
FastCV is released as a unified binary, a single binary containing two implementations of the algorithms:
FastCV library is Qualcomm proprietary and provides faster implementation of CV algorithms on various hardware as compared to other CV libraries.
OpenCV and FastCV integration is implemented in two ways:
Follow Wiki page for OpenCV Compilation : https://github.com/opencv/opencv/wiki/Custom-OpenCV-Android-SDK-and-AAR-package-build
Once the OpenCV repository code is cloned into the workspace, please add -DWITH_FASTCV=ON
flag to cmake vars as below to arm64 entry in opencv/platforms/android/default.config.py
or create new one with the option to enable FastCV HAL and/or extenstions compilation:
After installing the eSDK, set the ESDK_ROOT:
Add SDK tools and libraries to your environment:
If you encounter the following message:
just unset your host LD_LIBRARY_PATH
environment variable: unset LD_LIBRARY_PATH
.
Clone OpenCV Repositories:
Clone the OpenCV main and optionally opencv_contrib repositories into any directory (it does not need to be inside the SDK directory).
Build OpenCV
Create a build directory, navigate into it and build the project with CMake there:
If the FastCV library is updated, please replace the old FastCV libraries located at:
with the latest FastCV libraries downloaded in:
Validate
Push the OpenCV libraries, test binaries and test data on to the target. Execute the OpenCV conformance or performance tests. During runtime, If libwebp.so.7 lib is missing, find the lib in the below Path and push it on the target
FastCV based OpenCV HAL APIs list :
OpenCV module | OpenCV API | Underlying FastCV API for OpenCV acceleration |
---|---|---|
IMGPROC | medianBlur | fcvFilterMedian3x3u8_v3 |
sobel | fcvFilterSobel3x3u8s16 | |
fcvFilterSobel5x5u8s16 | ||
fcvFilterSobel7x7u8s16 | ||
boxFilter | fcvBoxFilter3x3u8_v3 | |
fcvBoxFilter5x5u8_v2 | ||
adaptiveThreshold | fcvAdaptiveThresholdGaussian3x3u8_v2 | |
fcvAdaptiveThresholdGaussian5x5u8_v2 | ||
fcvAdaptiveThresholdMean3x3u8_v2 | ||
fcvAdaptiveThresholdMean5x5u8_v2 | ||
pyrUp & pyrDown | fcvPyramidCreateu8_v4 | |
cvtColor | fcvColorRGB888toYCrCbu8_v3 | |
fcvColorRGB888ToHSV888u8 | ||
GaussianBlur | fcvFilterGaussian5x5u8_v3 | |
fcvFilterGaussian3x3u8_v4 | ||
cvWarpPerspective | fcvWarpPerspectiveu8_v5 | |
Canny | fcvFilterCannyu8 | |
CORE | lut | fcvTableLookupu8 |
norm | fcvHammingDistanceu8 | |
multiply | fcvElementMultiplyu8u16_v2 | |
transpose | fcvTransposeu8_v2 | |
fcvTransposeu16_v2 | ||
fcvTransposef32_v2 | ||
meanStdDev | fcvImageIntensityStats_v2 | |
flip | fcvFlipu8 | |
fcvFlipu16 | ||
fcvFlipRGB888u8 | ||
rotate | fcvRotateImageu8 | |
fcvRotateImageInterleavedu8 | ||
multiply | fcvElementMultiplyu8 | |
fcvElementMultiplys16 | ||
fcvElementMultiplyf32 | ||
addWeighted | fcvAddWeightedu8_v2 | |
subtract | fcvImageDiffu8f32_v2 |
FastCV based OpenCV Extensions APIs list :
OpenCV Extension APIs | Underlying FastCV API for OpenCV acceleration |
---|---|
matmuls8s32 | fcvMatrixMultiplys8s32 |
clusterEuclidean | fcvClusterEuclideanu8 |
FAST10 | fcvCornerFast10InMaskScoreu8 |
fcvCornerFast10InMasku8 | |
fcvCornerFast10Scoreu8 | |
fcvCornerFast10u8 | |
FFT | fcvFFTu8 |
IFFT | fcvIFFTf32 |
fillConvexPoly | fcvFillConvexPolyu8 |
houghLines | fcvHoughLineu8 |
moments | fcvImageMomentsu8 |
fcvImageMomentss32 | |
fcvImageMomentsf32 | |
runMSER | fcvMserInit |
fcvMserNN8Init | |
fcvMserExtu8_v3 | |
fcvMserExtNN8u8 | |
fcvMserNN8u8 | |
fcvMserRelease | |
remap | fcvRemapu8_v2 |
remapRGBA | fcvRemapRGBA8888BLu8 |
fcvRemapRGBA8888NNu8 | |
resizeDownBy2 | fcvScaleDownBy2u8_v2 |
resizeDownBy4 | fcvScaleDownBy4u8_v2 |
meanShift | fcvMeanShiftu8 |
fcvMeanShifts32 | |
fcvMeanShiftf32 | |
bilateralRecursive | fcvBilateralFilterRecursiveu8 |
thresholdRange | fcvFilterThresholdRangeu8_v2 |
bilateralFilter | fcvBilateralFilter5x5u8_v3 |
fcvBilateralFilter7x7u8_v3 | |
fcvBilateralFilter9x9u8_v3 | |
calcHist | fcvImageIntensityHistogram |
gaussianBlur | fcvFilterGaussian3x3u8_v4 |
fcvFilterGaussian5x5u8_v3 | |
fcvFilterGaussian5x5s16_v3 | |
fcvFilterGaussian5x5s32_v3 | |
fcvFilterGaussian11x11u8_v2 | |
filter2D | fcvFilterCorrNxNu8 |
fcvFilterCorrNxNu8s16 | |
fcvFilterCorrNxNu8f32 | |
sepFilter2D | fcvFilterCorrSepMxNu8 |
fcvFilterCorrSep9x9s16_v2 | |
fcvFilterCorrSep11x11s16_v2 | |
fcvFilterCorrSep13x13s16_v2 | |
fcvFilterCorrSep15x15s16_v2 | |
fcvFilterCorrSep17x17s16_v2 | |
fcvFilterCorrSepNxNs16 | |
sobel3x3u8 | fcvImageGradientSobelPlanars8_v2 |
sobel3x3u9 | fcvImageGradientSobelPlanars16_v2 |
sobel3x3u10 | fcvImageGradientSobelPlanars16_v3 |
sobel3x3u11 | fcvImageGradientSobelPlanarf32_v2 |
sobel3x3u12 | fcvImageGradientSobelPlanarf32_v3 |
sobel | fcvFilterSobel3x3u8_v2 |
fcvFilterSobel3x3u8s16 | |
fcvFilterSobel5x5u8s16 | |
fcvFilterSobel7x7u8s16 | |
DCT | fcvDCTu8 |
iDCT | fcvIDCTs16 |
sobelPyramid | fcvPyramidAllocate |
fcvPyramidAllocate_v2 | |
fcvPyramidAllocate_v3 | |
fcvPyramidSobelGradientCreatei8 | |
fcvPyramidSobelGradientCreatei16 | |
fcvPyramidSobelGradientCreatef32 | |
fcvPyramidDelete | |
fcvPyramidDelete_v2 | |
fcvPyramidCreatef32_v2 | |
fcvPyramidCreateu8_v4 | |
trackOpticalFlowLK | fcvTrackLKOpticalFlowu8_v3 |
fcvTrackLKOpticalFlowu8 | |
warpPerspective2Plane | fcv2PlaneWarpPerspectiveu8 |