Uses 436K of libraries. Click here for Pure Java version (130L/2K/4K).
1 | !752 |
2 | |
3 | lib 1003792 // opencv-249 |
4 | |
5 | static File pathToOpenCV = userDir("dev/opencv-2.4.9_"); |
6 | |
7 | import org.opencv.core.Core; |
8 | import org.opencv.core.CvType; |
9 | import org.opencv.core.Mat; |
10 | |
11 | p { |
12 | print("Welcome to OpenCV " + Core.VERSION); |
13 | S libPath = System.getProperty("java.library.path"); |
14 | //libPath = new File(pathToOpenCV, "lib").getAbsolutePath() + File.pathSeparator + libPath; |
15 | print(libPath); |
16 | //System.setProperty("java.library.path", libPath); |
17 | |
18 | // fails!? |
19 | //System.loadLibrary(Core.NATIVE_LIBRARY_NAME); |
20 | |
21 | File lib = new File(pathToOpenCV, "lib/lib" + Core.NATIVE_LIBRARY_NAME + ".so"); |
22 | print("Looking for: " + lib.getAbsolutePath()); |
23 | Runtime.getRuntime().load(lib.getAbsolutePath()); |
24 | |
25 | |
26 | // TEST |
27 | |
28 | Mat m = Mat.eye(3, 3, CvType.CV_8UC1); |
29 | print("m = " + m.dump()); |
30 | } |
Began life as a copy of #1003793
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1003796 |
Snippet name: | Test OpenCV - Moved Dir |
Eternal ID of this version: | #1003796/1 |
Text MD5: | f27a5e1bb883c11d991daf3a0573e4be |
Transpilation MD5: | 54ad823d663adf25c30da432f5030ac7 |
Author: | stefan |
Category: | javax / opencv / native bindings |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-07-27 16:42:38 |
Source code size: | 822 bytes / 30 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 513 / 584 |
Referenced in: | [show references] |