-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from CodeLinaro/FastcvHAL_1stPost
Fastcv ext changes for Opencv Acceleration
- Loading branch information
Showing
29 changed files
with
51 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
set(the_description "FastCV extension module") | ||
ocv_define_module(fastcv opencv_core opencv_imgproc opencv_features2d opencv_video WRAP python java) | ||
|
||
if (FASTCV_DIR) | ||
if(NOT ARM AND NOT AARCH64) | ||
# the reason this warning is not fatal is to enable proper code analysis | ||
# in your favourite IDE | ||
message(WARNING "FastCV supports ARM platform only!") | ||
endif() | ||
if((ARM OR AARCH64) AND (ANDROID OR (UNIX AND NOT APPLE AND NOT IOS AND NOT XROS))) | ||
set(the_description "FastCV extension module") | ||
set(FCV_MODULE_HEADER_DIR "${CMAKE_CURRENT_BINARY_DIR}/inc") | ||
set(FCV_MODULE_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/libs") | ||
|
||
# here you can change the library to a specific one | ||
set(FASTCV_LIB "/libs/Android/lib64/libfastcvopt.so") | ||
set(FASTCV_LIB "${FCV_MODULE_LIB_DIR}/libfastcvopt.so") | ||
|
||
if((NOT EXISTS ${FCV_MODULE_HEADER_DIR}) OR (NOT EXISTS ${FCV_MODULE_LIB_DIR})) | ||
include("${CMAKE_CURRENT_SOURCE_DIR}/fastcv.cmake") | ||
download_fastcv("${CMAKE_CURRENT_BINARY_DIR}") | ||
endif() | ||
|
||
ocv_module_include_directories("${FASTCV_DIR}/inc") | ||
ocv_target_link_libraries(${the_module} LINK_PRIVATE "${FASTCV_DIR}/${FASTCV_LIB}") | ||
ocv_define_module(fastcv opencv_core opencv_imgproc opencv_features2d opencv_video WRAP python java) | ||
ocv_module_include_directories( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/include" | ||
${FCV_MODULE_HEADER_DIR}) | ||
ocv_target_link_libraries(${the_module} ${FASTCV_LIB}) | ||
ocv_target_compile_definitions(${the_module} PRIVATE FAST_CV_FOUND) | ||
else() | ||
message(FATAL_ERROR "FastCV supports ARM Platform on Android and Linux only!") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
function(download_fastcv root_dir) | ||
|
||
# Commit SHA in the opencv_3rdparty repo | ||
set(FASTCV_COMMIT "65f40fc8f7a6aac44936ae9538e69edede6c4b15") | ||
|
||
# Define actual FCV versions | ||
if(ANDROID) | ||
if(AARCH64) | ||
set(FCV_PACKAGE_NAME "fastcv_android_aarch64_2024_10_24.tgz") | ||
set(FCV_PACKAGE_HASH "8a259eea80064643bad20f72ba0b6066") | ||
else() | ||
set(FCV_PACKAGE_NAME "fastcv_android_arm32_2024_10_24.tgz") | ||
set(FCV_PACKAGE_HASH "04d89219c44d54166b2b7f8c0ed5143b") | ||
endif() | ||
elseif(UNIX AND NOT APPLE AND NOT IOS AND NOT XROS) | ||
message("FastCV: fastcv lib for Linux is not supported for now!") | ||
endif(ANDROID) | ||
|
||
# Download Package | ||
set(OPENCV_FASTCV_URL "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${FASTCV_COMMIT}/fastcv/") | ||
|
||
ocv_download( FILENAME ${FCV_PACKAGE_NAME} | ||
HASH ${FCV_PACKAGE_HASH} | ||
URL ${OPENCV_FASTCV_URL} | ||
DESTINATION_DIR ${root_dir} | ||
ID FASTCV | ||
STATUS res | ||
UNPACK | ||
RELATIVE_URL) | ||
|
||
if(NOT res) | ||
message("FastCV: package download failed! Please download FastCV manually and put it at ${root_dir}.") | ||
endif() | ||
|
||
endfunction() |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.