bytedeco/javacv

Problems with linking, Image stitching

Open

#2,124 opened on Nov 7, 2023

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Java (1,583 forks)batch import
help wantedquestion

Repository metrics

Stars
 (6,985 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Greetings! I found this library the most convinient wa for image stitching since this function did not implemented in traditional org.opencv. Btw, I am writing an app for android

Meanwhile, I encountered the folowwing error with stitching while other functions work correctly: image

Probably it is connected with installation process. So my gradle:

plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
}

android {
    namespace 'com.digtp.minearologyscanner'
    compileSdk 34

    defaultConfig {
        applicationId "com.digtp.minearologyscanner"
        minSdk 28
        targetSdk 33
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    buildFeatures {
        viewBinding true
    }
}

configurations {
    javacpp
}

task javacppExtract(type: Copy) {
    dependsOn configurations.javacpp

    from { configurations.javacpp.collect { zipTree(it) } }
    include "lib/**"
    into "$buildDir/javacpp/"
    android.sourceSets.main.jniLibs.srcDirs += ["$buildDir/javacpp/lib/"]

    tasks.getByName('preBuild').dependsOn javacppExtract
}

dependencies {
    implementation 'androidx.core:core-ktx:1.12.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.10.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.7.5'
    implementation 'androidx.navigation:navigation-ui-ktx:2.7.5'
    implementation project(path: ':opencv')
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation group: 'org.bytedeco', name: 'javacv', version: '1.5.9'
    javacpp group: 'org.bytedeco', name: 'openblas-platform', version: '0.3.23-1.5.9'
    javacpp group: 'org.bytedeco', name: 'opencv-platform', version: '4.7.0-1.5.9'
    javacpp group: 'org.bytedeco', name: 'ffmpeg-platform', version: '6.0-1.5.9'
}

Contributor guide