Skip to content

Commit

Permalink
removed javacv and added native library loading
Browse files Browse the repository at this point in the history
  • Loading branch information
cansik committed Mar 23, 2020
1 parent 201b083 commit 68e8758
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 25 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'

// opencv
compile group: 'org.bytedeco', name: 'javacv', version: "$javaCvVersion"
compile group: 'org.bytedeco', name: 'opencv-platform', version: "4.1.2-$javaCvVersion"
compile group: 'org.bytedeco', name: 'openblas-platform', version: "0.3.7-$javaCvVersion"

Expand Down
50 changes: 26 additions & 24 deletions src/main/java/gab/opencv/OpenCV.java
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
/**
* ##library.name##
* ##library.sentence##
* ##library.url##
*
* Copyright ##copyright## ##author##
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
*
* @author ##author##
/*
##library.name##
##library.sentence##
##library.url##
Copyright ##copyright## ##author##
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
@author ##author##
* @modified ##date##
* @version ##library.prettyVersion## (##library.version##)
*/
Expand All @@ -47,6 +47,8 @@
import java.util.ArrayList;
import java.util.Collections;

import org.bytedeco.javacpp.Loader;
import org.bytedeco.opencv.opencv_java;
import org.opencv.bgsegm.BackgroundSubtractorMOG;
import org.opencv.core.Core;
import org.opencv.core.CvType;
Expand Down Expand Up @@ -396,7 +398,7 @@ private String getLibPath() {

private void initNative(){
if(nativeLoaded) return;
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
Loader.load(opencv_java.class);
nativeLoaded = true;
}

Expand Down

0 comments on commit 68e8758

Please # to comment.