Uses 436K of libraries. Click here for Pure Java version (102L/1K/4K).
1 | !752 |
2 | |
3 | lib 1003792 // opencv-249 |
4 | |
5 | import org.opencv.core.Core; |
6 | import org.opencv.core.CvType; |
7 | import org.opencv.core.Mat; |
8 | |
9 | p { |
10 | print("Welcome to OpenCV " + Core.VERSION); |
11 | S libPath = System.getProperty("java.library.path"); |
12 | libPath = "/home/stefan/tmp" + File.pathSeparator + libPath; |
13 | print(libPath); |
14 | System.setProperty("java.library.path", libPath); |
15 | |
16 | // fails!? |
17 | //System.loadLibrary(Core.NATIVE_LIBRARY_NAME); |
18 | |
19 | File lib = new File("/home/stefan/tmp/lib" + Core.NATIVE_LIBRARY_NAME + ".so"); |
20 | print("Looking for: " + lib.getAbsolutePath()); |
21 | Runtime.getRuntime().load(lib.getAbsolutePath()); |
22 | |
23 | // TEST |
24 | |
25 | Mat m = Mat.eye(3, 3, CvType.CV_8UC1); |
26 | print("m = " + m.dump()); |
27 | } |
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
ID | Author/Program | Comment | Date |
---|---|---|---|
1272 | stefan | Ah, ok, it fails now: libopencv_features2d.so.2.4: cannot open shared object file: No such file or directory | 2016-07-27 16:22:32 |
1271 | stefan | Crazy - doesn't it need the other libraries? | 2016-07-27 16:20:11 |
Snippet ID: | #1003794 |
Snippet name: | Test OpenCV - Venturous Single Library |
Eternal ID of this version: | #1003794/1 |
Text MD5: | fa8b00f326ec16675d65af57ed695355 |
Transpilation MD5: | 1e6c4a2f341e916c8df3fbe06df4bfd6 |
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:23:59 |
Source code size: | 725 bytes / 27 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 720 / 786 |
Referenced in: | [show references] |