Giter Site home page Giter Site logo

Comments (8)

EmmanuelMess avatar EmmanuelMess commented on June 14, 2024 1

I am stuck, having these two issues: Build statically, missing cv::countNonZero(cv::_InputArray const&) and Building OpenCV statically in app fails β€œerror: undefined reference to 'ippicvsRound_64f'”. The time for this project has ended, but will update if some answers come back.

from native-opencv-android-template.

VlSomers avatar VlSomers commented on June 14, 2024

Sorry but I don't know how to do this. There's probably some ways to reduce apk size, but you'll have to search the web for more answers :-) If you find a solution, can you post the link here? Thank you and good luck for solving this!

from native-opencv-android-template.

EmmanuelMess avatar EmmanuelMess commented on June 14, 2024

You can use the static libs instead (from the sdk) and configure a few things, I will upload a project to GitHub and add a link.

from native-opencv-android-template.

EmmanuelMess avatar EmmanuelMess commented on June 14, 2024

Link: https://github.com/EmmanuelMess/Reduced-OpenCV-Android

from native-opencv-android-template.

VlSomers avatar VlSomers commented on June 14, 2024

Sorry for these issues, I hope you're going to find some answers!

from native-opencv-android-template.

ninh-huynh avatar ninh-huynh commented on June 14, 2024

I've found these instruction located in OpenCV-android-sdk/sdk/native/jni/OpenCVConfig.cmake.

# ===================================================================================
#  The OpenCV CMake configuration file
#
#             ** File generated automatically, do not modify **
#
#  Usage from an external project:
#    In your CMakeLists.txt, add these lines:
#
#    find_package(OpenCV REQUIRED)
#    include_directories(${OpenCV_INCLUDE_DIRS}) # Not needed for CMake >= 2.8.11
#    target_link_libraries(MY_TARGET_NAME ${OpenCV_LIBS})
#
#    Or you can search for specific OpenCV modules:
#
#    find_package(OpenCV REQUIRED core videoio)
#
#    If the module is found then OPENCV_<MODULE>_FOUND is set to TRUE.
#
#    This file will define the following variables:
#      - OpenCV_LIBS                     : The list of all imported targets for OpenCV modules.
#      - OpenCV_INCLUDE_DIRS             : The OpenCV include directories.
#      - OpenCV_ANDROID_NATIVE_API_LEVEL : Minimum required level of Android API.
#      - OpenCV_VERSION                  : The version of this OpenCV build: "4.5.0"
#      - OpenCV_VERSION_MAJOR            : Major version part of OpenCV_VERSION: "4"
#      - OpenCV_VERSION_MINOR            : Minor version part of OpenCV_VERSION: "5"
#      - OpenCV_VERSION_PATCH            : Patch version part of OpenCV_VERSION: "0"
#      - OpenCV_VERSION_STATUS           : Development status of this build: ""
#
# ===================================================================================

I've followed it and it work like a charm. Basically, you just need to declare the OpenCV modules that you use in the project inside find_package(). For example:

find_package(OpenCV REQUIRED core videoio)
target_link_libraries(MY_TARGET_NAME ${OpenCV_LIBS})

For a complete module's name, you can find in here

from native-opencv-android-template.

EmmanuelMess avatar EmmanuelMess commented on June 14, 2024

@kim-ninh What does that do? How much space is saved from those changes?

from native-opencv-android-template.

EmmanuelMess avatar EmmanuelMess commented on June 14, 2024

Fixed?

from native-opencv-android-template.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.