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

22
LINES

< > BotCompany Repo | #1010060 // Test Felzenszwalb-Huttenlocher Segmenter [OK]

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

Uses 14971K of libraries. Click here for Pure Java version (4534L/31K/116K).

1  
!7
2  
3  
lib 1010061 // OpenIMAJ feature extraction (1.3.5)
4  
lib 1009074 // trove
5  
6  
import org.openimaj.image.segmentation.*;
7  
import org.openimaj.image.pixel.*;
8  
9  
static float sigma = 0.5f;
10  
11  
// 2500 is pretty good
12  
static float k = 2500f / 255f; // 5000f / 255f; // 20f / 255f; // 500f / 255f;
13  
14  
static int minSize = 50;
15  
16  
p {
17  
  MBFImage image = readMBF(#1002132);
18  
  FelzenszwalbHuttenlocherSegmenter segmenter = new(sigma, k, minSize);
19  
  L<ConnectedComponent> components = segmenter.segment(image);
20  
  print("Have " + n(components, "component"));
21  
  showMBF(SegmentationUtilities.renderSegments(image, components));
22  
}

Author comment

Began life as a copy of #1010058

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1010060
Snippet name: Test Felzenszwalb-Huttenlocher Segmenter [OK]
Eternal ID of this version: #1010060/15
Text MD5: 15b12dc293e10fa9c5518bfb8f69e3d0
Transpilation MD5: 1b15009a04cb2557f121cefaac2d958a
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:55:20
Source code size: 626 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 366 / 496
Version history: 14 change(s)
Referenced in: [show references]