Cannot run OpenCV samples on Tegra T4i device

asked 2014-05-27 09:22:27 -0600

greg gravatar image

Hello, for some reason I cannot run any of the OpenCV samples applications on my device. All sample apps fail to start with the following error:

Package not found - OpenCV library package was not found! Try to install it?

I did install the OpenCV manager through Playstore. The OpenCV manager reports:

Hardware: Tegra 4i
OS version: REL (4.3), API 18
Library version: 2.4.9.0 rev 1
Target hardware: Tegra

Relevant lines in the logcat:

I/OpenCVEngine/Service(16499): Service starting
I/OpenCVEngine/Service(16499): Engine binder component creating
D/OpenCVEngine/JNI(16499): Java_org_opencv_engine_BinderConnector_Init
I/OpenCVEngine/JNI(16499): Creating new component
I/OpenCVEngine/JNI(16499): New component created successfully
I/OpenCVEngine/Service(16499): Service started successfully
I/OpenCVEngine/Service(16499): Service onBind called for intent Intent { act=org.opencv.engine.BIND }
D/OpenCVManager/Helper(16757): Service connection created
D/OpenCVEngine(16499): OpenCVEngine::OnTransact(1,16)
D/OpenCVEngine(16499): OpenCVEngine OCVE_GET_ENGINE_VERSION request
D/OpenCVEngine(16499): OpenCVEngine::GetVersion()
V/nvaudio_hw(13242): nvaudio_out_get_latency: latency 85
D/OpenCVManager/Helper(16757): Trying to get library path
D/OpenCVEngine(16499): OpenCVEngine::OnTransact(2,16)
D/OpenCVEngine(16499): OpenCVEngine OCVE_GET_LIB_PATH_BY_VERSION request
D/OpenCVEngine(16499): OpenCVEngine::GetLibPathByVersion(2.4.3)
D/OpenCVEngine(16499): OpenCVEngine::GetLibPathByVersion(2.4.3) impl
D/JavaBasedPackageManager(16499): JavaBasedPackageManager::GetInstalledPackages() begin
V/nvaudio_hw(13242): nvaudio_out_get_latency: latency 85
D/dalvikvm(16499): GC_CONCURRENT freed 551K, 19% free 2694K/3316K, paused 1ms+1ms, total 9ms
D/dalvikvm(16499): WAIT_FOR_CONCURRENT_GC blocked 4ms
D/JavaBasedPackageManager(16499): Package info conversion
D/OpenCVEngine(16499): PackageInfo::PackageInfo("org.opencv.engine", "/data/app-lib/org.opencv.engine-1", "2.18")
D/OpenCVEngine(16499): Trying to load info library "/data/app-lib/org.opencv.engine-1/libopencv_info.so"
I/OpenCVEngine(16499): OpenCV package "org.opencv.lib_v24_armv7a_neon" revision "9.0.1" found
D/JavaBasedPackageManager(16499): JavaBasedPackageManager::GetInstalledPackages() end
D/CommonPackageManager(16499): Check version "2040300" compatibility with "2040900"
D/CommonPackageManager(16499): Compatible
D/CommonPackageManager(16499): !!! Calculating rating for ARM
D/CommonPackageManager(16499): Checking (0, 67108864) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 134217728) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 134217729) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 134217730) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 134217731) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 268435456) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 268435457) against (4,268435466)
D/CommonPackageManager(16499): Checking (2, 268435457) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 268435458) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 268435459) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 268435464) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 268435465) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 268435466) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 268435467) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 268435468) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 268435470) against (4,268435466)
D/CommonPackageManager(16499): Checking (0, 268435471) against (4,268435466)
D/CommonPackageManager(16499): Checking (3, 268435466) against (4,268435466)
D/CommonPackageManager(16499): Checking (4, 268435470) against (4,268435466)
D/CommonPackageManager(16499): Checking (5, 268435470) against (4,268435466)
D/CommonPackageManager(16499): Checking (6, 268435470) against (4,268435466 ...
(more)
edit retag flag offensive close merge delete

Comments

I looked at the code for CommonPackageManager.cpp and my (platform,cpu_id) is (4,268435466). The platform is correctly detected as PLATFORM_TEGRA4i and the bitmap for my cpu_id includes the following flags: ARCH_ARMv7 | FEATURES_HAS_VFPv3 | FEATURES_HAS_NEON.

However from the code I think the package manager expects my cpu_id to have the FEATURES_HAS_VFPv4 flag, which is not the case.

T4i has an ARM A9 core and from the spec I found on arm.com this chip seems to support VFPv3 only.

So I would be tempted to say that the code in CommonPackageManager.cpp is wrong for the T4i platform. Do the experts agree?

greg gravatar imagegreg ( 2014-05-27 11:02:32 -0600 )edit

From the CPU info:

cat /proc/cpuinfo
Processor       : ARMv7 Processor rev 1 (v7l)
processor       : 0
BogoMIPS        : 604.74    
processor       : 1
BogoMIPS        : 604.74    
processor       : 2
BogoMIPS        : 1366.01    
processor       : 3
BogoMIPS        : 2015.82    
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x4
CPU part        : 0xc09
CPU revision    : 1
Hardware        : Ceres
Revision        : 0000
Serial          : 069003e902440600

This is inconsistent with this line in CommonPackageManager.cpp:

result.push_back(std::pair<int, int>(PLATFORM_TEGRA4i, ARCH_ARMv7 | FEATURES_HAS_VFPv3 | FEATURES_HAS_VFPv4 | FEAT
greg gravatar imagegreg ( 2014-05-28 02:11:20 -0600 )edit