Skip to content

Commit 9888c6e

Browse files
committed
code cleanup, removed debug statements
1 parent e949152 commit 9888c6e

1 file changed

Lines changed: 5 additions & 12 deletions

File tree

‎src/gab/opencv/OpenCV.java‎

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,6 @@ private void initNative(){
387387

388388
String osArch = System.getProperty("os.arch");
389389

390-
System.out.println("os.arch = " + osArch);
391-
392390
String nativeLibPath = getLibPath();
393391

394392
String path = null;
@@ -401,13 +399,9 @@ private void initNative(){
401399
path = nativeLibPath + "macosx" + bitsJVM;
402400
}
403401
if (PApplet.platform == PConstants.LINUX) { //platform Linux
404-
// attempt to detect arm architecture
405-
if (osArch.contains("arm")) {
406-
System.out.println("OS Architecture contains ARM");
407-
isArm = true;
408-
}
409-
410-
path = isArm ? nativeLibPath + "arm7" : nativeLibPath + "linux" + bitsJVM;
402+
// attempt to detect arm architecture - is it fair to assume linux for ARM devices?
403+
isArm = osArch.contains("arm");
404+
path = isArm ? nativeLibPath + "arm7" : nativeLibPath + "linux" + bitsJVM;
411405
}
412406

413407
// ensure the determined path exists
@@ -425,23 +419,22 @@ private void initNative(){
425419
// this check might be redundant now...
426420
if((PApplet.platform == PConstants.MACOSX && bitsJVM == 64) || (PApplet.platform == PConstants.WINDOWS) || (PApplet.platform == PConstants.LINUX)){
427421
try {
428-
System.out.println("Adding native libarary path: " + nativeLibPath);
429422
addLibraryPath(nativeLibPath);
430423
} catch (Exception e) {
431424
e.printStackTrace();
432425
}
433-
System.out.println(System.getProperty("java.library.path"));
434426
System.loadLibrary("opencv_java245");
435427
}
436428
else{
437429
System.err.println("Cannot load local version of opencv_java245 : Linux 32/64, Windows 32 bits or Mac Os 64 bits are only avaible");
438430
}
431+
432+
nativeLoaded = true;
439433
}
440434
}
441435

442436

443437
private void addLibraryPath(String path) throws Exception {
444-
System.out.println("Adding libarary path: " + path);
445438
String originalPath = System.getProperty("java.library.path");
446439

447440
// If this is an arm device running linux, Processing seems to include the linux32 dirs in the path,

0 commit comments

Comments
 (0)