Android 如何解决OpenCv版本4.1.2中Imgproc的错误?
在我的项目中,Imgproc中出现错误。 我使用的是android studio版本3.5.3和OpenCv版本4.1.2。 这是我的毕业代码。 我想在我的项目中使用Imgproc,但是当我编写Imgproc时,我得到了一个错误Android 如何解决OpenCv版本4.1.2中Imgproc的错误?,android,opencv,opencv4android,Android,Opencv,Opencv4android,在我的项目中,Imgproc中出现错误。 我使用的是android studio版本3.5.3和OpenCv版本4.1.2。 这是我的毕业代码。 我想在我的项目中使用Imgproc,但是当我编写Imgproc时,我得到了一个错误 compileSdkVersion 29 buildToolsVersion "29.0.2" defaultConfig { applicationId "com.example.camscanner" minS
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.camscanner"
minSdkVersion 17
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} } }
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation project(path: ':scanlibrary')
}```
how i use Imgproc in my project
please Help.
你可以试试
在build.gradle
上添加一些依赖项:
dependencies {
...
implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '4.1.2-1.5.2'
implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '4.1.2-1.5.2', classifier: "android-arm"
implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '4.1.2-1.5.2', classifier: "android-arm64"
implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '4.1.2-1.5.2', classifier: "android-x86"
implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '4.1.2-1.5.2', classifier: "android-x86_64"
}
您可以使用org.bytedeco.javacpp.helper.opencv\u imgproc
或org.opencv.imgproc.imgproc
您将找到javadocs,您可以试试
在build.gradle
上添加一些依赖项:
dependencies {
...
implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '4.1.2-1.5.2'
implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '4.1.2-1.5.2', classifier: "android-arm"
implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '4.1.2-1.5.2', classifier: "android-arm64"
implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '4.1.2-1.5.2', classifier: "android-x86"
implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '4.1.2-1.5.2', classifier: "android-x86_64"
}
您可以使用org.bytedeco.javacpp.helper.opencv\u imgproc
或org.opencv.imgproc.imgproc
您将找到javadocs