Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

40
LINES

< > BotCompany Repo | #1004907 // Test OpenIMAJ [CannyEdgeDetector, WORKS]

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Uses 12233K of libraries. Click here for Pure Java version (1614L/11K/38K).

1  
!7
2  
3  
lib 1004905
4  
lib 1004906
5  
lib 1004908
6  
lib 1004909
7  
lib 1004910
8  
lib 1004911
9  
lib 1004912
10  
lib 1004913
11  
lib 1004914
12  
lib 1004915
13  
lib 1004919 // NotConvergedException
14  
lib 1004920
15  
16  
import org.openimaj.image.*;
17  
import org.openimaj.image.processing.edges.*;
18  
19  
p {
20  
  MBFImage image = ImageUtilities.readMBF(loadImageAsFile("#1002132"));
21  
  //DisplayUtilities.display(image);
22  
23  
  // set green and blue channels to black
24  
  MBFImage clone = image.clone();
25  
  /*for (int y=0; y<image.getHeight(); y++) {
26  
    for(int x=0; x<image.getWidth(); x++) {
27  
        clone.getBand(1).pixels[y][x] = 0;
28  
        clone.getBand(2).pixels[y][x] = 0;
29  
    }
30  
  }
31  
  DisplayUtilities.display(clone);*/
32  
33  
  // same thing, but faster
34  
  /*clone.getBand(1).fill(0f);
35  
  clone.getBand(2).fill(0f);
36  
  DisplayUtilities.display(clone);*/
37  
38  
  image.processInplace(new CannyEdgeDetector);
39  
  DisplayUtilities.display(image);
40  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004907
Snippet name: Test OpenIMAJ [CannyEdgeDetector, WORKS]
Eternal ID of this version: #1004907/4
Text MD5: c3aa26721bfb1bc77adc398ca49c111c
Transpilation MD5: 1e7f453a09f051b15584f279161c0d47
Author: stefan
Category: javax / imaging
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-01 20:04:30
Source code size: 912 bytes / 40 lines
Pitched / IR pitched: No / No
Views / Downloads: 633 / 768
Version history: 3 change(s)
Referenced in: [show references]